Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
Namespaces | |
namespace | antivirus_clamav |
| |
namespace | antivirus_clamav\privacy |
| |
Classes | |
class | antivirus_clamav\privacy\provider |
Privacy Subsystem for antivirus_clamav implementing null_provider. More... | |
class | antivirus_clamav\scanner |
Class implementing ClamAV antivirus. More... | |
class | antivirus_clamav_pathtounixsocket_setting |
Admin setting for unix socket path, adds verification. More... | |
class | antivirus_clamav_runningmethod_setting |
Admin setting for running, adds verification. More... | |
class | antivirus_clamav_socket_setting |
Abstract socket checking class. More... | |
class | antivirus_clamav_tcpsockethost_setting |
Admin setting for Internet domain socket host, adds verification. More... | |
Functions | |
antivirus_clamav::scan_data_execute_socket ($data, $type) | |
Scan data socket. | |
antivirus_clamav::scan_data_execute_unixsocket ($data) | |
Scan data using Unix domain socket. | |
antivirus_clamav::scan_file_execute_unixsocket ($file) | |
Scan file using Unix domain socket. | |
xmldb_antivirus_clamav_upgrade ($oldversion) | |
Run all ClamAV plugin upgrade steps between the current DB version and the current version on disk. | |
antivirus_clamav\scan_data_execute_socket | ( | $data, | |
$type ) |
Scan data socket.
We are running INSTREAM command and passing data stream in chunks. The format of the chunk is: <length><data> where <length> is the size of the following data in bytes expressed as a 4 byte unsigned integer in network byte order and <data> is the actual chunk. Streaming is terminated by sending a zero-length chunk. Do not exceed StreamMaxLength as defined in clamd.conf, otherwise clamd will reply with INSTREAM size limit exceeded and close the connection.
string | $data | The variable containing the data to scan. |
string | $type | Either 'tcpsocket' or 'unixsocket' |
int | Scanning result constant. |
antivirus_clamav\scan_data_execute_unixsocket | ( | $data | ) |
Scan data using Unix domain socket.
string | $data | The variable containing the data to scan. |
int | Scanning result constant. |
antivirus_clamav\scan_file_execute_unixsocket | ( | $file | ) |
Scan file using Unix domain socket.
string | $file | Full path to the file. |
int | Scanning result constant. |