12 require_once
"Services/VirusScanner/classes/class.ilVirusScanner.php";
24 $this->type =
"antivir";
25 $this->scanZipFiles =
true;
35 public function scanFile($a_filepath, $a_origname =
"")
47 $this->scanFilePath = $a_filepath;
48 $this->scanFileOrigName = $a_origname;
51 $a_filepath = realpath($a_filepath);
55 $this->scanResult = implode(
"\n",
$out);
58 if (preg_match(
'/ALERT:/', $this->scanResult)) {
59 $this->scanFileIsInfected =
true;
63 $this->scanFileIsInfected =
false;
68 $this->log->write(
"ERROR (Virus Scanner failed): " 70 .
"; 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)