|
| __construct (string $scan_command, string $clean_command) |
|
| scanFile (string $file_path, string $org_name="") |
|
| __construct (string $scan_command, string $clean_command) |
|
| options (string $service) |
|
| getRequest (string $method, string $service, array $body=[], array $headers=[]) |
|
| send (string $request) |
|
| getLastSocketError () |
|
| respMod (string $service, array $body=[], array $headers=[]) |
|
| reqMod (string $service, array $body=[], array $headers=[]) |
|
| __construct (string $scan_command, string $clean_command) |
|
| scanBuffer (string $buffer) |
|
| scanFile (string $file_path, string $org_name="") |
|
| logScanResult () |
|
| cleanFile (string $file_path, string $org_name="") |
|
| logCleanResult () |
|
| fileCleaned () |
|
| getScanResult () |
|
| getCleanResult () |
|
| getScanMessage () |
|
| getCleanMessage () |
|
| getScanZipFiles () |
|
◆ __construct()
ilVirusScannerICapRemoteAvClient::__construct |
( |
string |
$scan_command, |
|
|
string |
$clean_command |
|
) |
| |
◆ analyseHeader()
ilVirusScannerICapRemoteAvClient::analyseHeader |
( |
array |
$header | ) |
|
|
protected |
Definition at line 57 of file class.ilVirusScannerICapRemoteAvClient.php.
References $parts.
Referenced by scanFile().
60 if (array_key_exists(self::HEADER, $header)) {
61 $header = $header[self::HEADER];
62 if (array_key_exists(self::HEADER_VIOLATION_FOUND, $header) && $header[self::HEADER_VIOLATION_FOUND] > 0) {
66 self::HEADER_INFECTION_FOUND,
68 ) && $header[self::HEADER_INFECTION_FOUND] !==
'') {
69 $infection_split = explode(
";", $header[self::HEADER_INFECTION_FOUND]);
70 foreach ($infection_split as $infection) {
71 $parts = explode(
"=", $infection);
76 $this->log->warning(trim(
$parts[0]) .
': ' . trim(
$parts[1]));
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
◆ scanFile()
ilVirusScannerICapRemoteAvClient::scanFile |
( |
string |
$file_path, |
|
|
string |
$org_name = "" |
|
) |
| |
Definition at line 33 of file class.ilVirusScannerICapRemoteAvClient.php.
References $results, and analyseHeader().
36 $file_path = realpath($file_path);
37 if (is_readable($file_path)) {
41 'req-hdr' =>
"POST /test HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n",
42 'req-body' => file_get_contents($file_path)
46 $return_string = sprintf(
'Virus found in file "%s"!', $file_path);
47 $this->log->warning($return_string);
50 $return_string = sprintf(
'File "%s" not found or not readable.', $file_path);
51 $this->log->warning($return_string);
53 $this->log->info(sprintf(
'No virus found in file "%s".', $file_path));
54 return $return_string;
analyseHeader(array $header)
◆ HEADER
const ilVirusScannerICapRemoteAvClient::HEADER = 'headers' |
|
private |
◆ HEADER_INFECTION_FOUND
const ilVirusScannerICapRemoteAvClient::HEADER_INFECTION_FOUND = 'X-Infection-Found' |
|
private |
◆ HEADER_VIOLATION_FOUND
const ilVirusScannerICapRemoteAvClient::HEADER_VIOLATION_FOUND = 'X-Violations-Found' |
|
private |
The documentation for this class was generated from the following file: