14 require_once
"class.ilVirusScanner.php";
26 $this->type =
"sophos";
27 $this->scanZipFiles =
true;
38 function scanFile($a_filepath, $a_origname =
"")
50 $this->scanFilePath = $a_filepath;
51 $this->scanFileOrigName = $a_origname;
55 $cmd = $this->scanCommand .
" " . $a_filepath.
" 2>&1";
57 $this->scanResult = implode(
"\n",
$out);
62 if (ereg(
"FILE INFECTED", $this->scanResult))
64 $this->scanFileIsInfected =
true;
70 $this->scanFileIsInfected =
false;
76 $this->log->write(
"ERROR (Virus Scanner failed): "
78 .
"; COMMAMD=" .
$cmd);
84 $cmd = $this->cleanCommand .
" -ss -archive " . $a_filepath .
" 2>&1";
86 $this->scanResult = implode(
"\n",
$out).
" [".
$ret.
"]";
95 $this->scanFileIsCleaned =
false;
100 $this->scanFileIsInfected =
true;
106 $this->ilias->raiseError($this->lng->txt(
"virus_scan_error").
" "
107 . $this->lng->txt(
"virus_scan_message").
" "
109 $this->ilias->error_obj->WARNING);
133 $this->cleanFilePath = $a_filepath;
134 $this->cleanFileOrigName = $a_origname;
143 $cmd = $this->cleanCommand .
" -di -nc -ss -eec -archive " . $a_filepath .
" 2>&1";
145 $this->cleanResult = implode(
"\n",
$out).
" [".
$ret.
"]";
163 $this->cleanFileIsCleaned =
true;
168 $this->cleanFileIsCleaned =
false;