11 require_once
"Services/VirusScanner/classes/class.ilVirusScanner.php";
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 $a_filepath = realpath($a_filepath);
54 $this->scanResult = implode(
"\n",
$out);
57 if (preg_match(
'/ALERT:/', $this->scanResult)) {
58 $this->scanFileIsInfected =
true;
62 $this->scanFileIsInfected =
false;
67 $this->log->write(
"ERROR (Virus Scanner failed): " 69 .
"; 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
static escapeShellCmd($a_arg)
escape shell cmd
__construct($a_scancommand, $a_cleancommand)
Constructor public.
static execQuoted($cmd, $args=null)
exec command and fix spaces on windows
Base class for the interface to an external virus scanner This class is abstract and needs to be exte...
static escapeShellArg($a_arg)
__construct(Container $dic, ilPlugin $plugin)