11 require_once
"Services/VirusScanner/classes/class.ilVirusScanner.php";
22 parent::__construct($a_scancommand, $a_cleancommand);
23 $this->type =
"antivir";
24 $this->scanZipFiles =
true;
34 public function scanFile($a_filepath, $a_origname =
"")
46 $this->scanFilePath = $a_filepath;
47 $this->scanFileOrigName = $a_origname;
50 $cmd = $this->scanCommand .
" " . $a_filepath .
" ";
52 $this->scanResult = implode(
"\n",
$out);
55 if (preg_match(
'/ALERT:/', $this->scanResult)) {
56 $this->scanFileIsInfected =
true;
60 $this->scanFileIsInfected =
false;
65 $this->log->write(
"ERROR (Virus Scanner failed): " 67 .
"; COMMAMD=" . $cmd);
Interface to the AntiVir virus protector.
scanFile($a_filepath, $a_origname="")
scan a file for viruses
logScanResult()
write the result of the last scan to the log public
__construct($a_scancommand, $a_cleancommand)
Constructor public.
Base class for the interface to an external virus scanner This class is abstract and needs to be exte...