11require_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);
An exception for terminatinating execution or to throw for unit testing.
static execQuoted($cmd, $args=null)
exec command and fix spaces on windows
static escapeShellArg($a_arg)
static escapeShellCmd($a_arg)
escape shell cmd
Interface to the AntiVir virus protector.
scanFile($a_filepath, $a_origname="")
scan a file for viruses
__construct($a_scancommand, $a_cleancommand)
Constructor @access public.
Base class for the interface to an external virus scanner This class is abstract and needs to be exte...
logScanResult()
write the result of the last scan to the log @access public
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc