158 $this->scanCommand = $a_scancommand;
159 $this->cleanCommand = $a_cleancommand;
161 $this->type =
"simulate";
162 $this->scanZipFiles =
false;
190 $this->scanFilePath = $a_filepath;
191 $this->scanFileOrigName = $a_origname;
193 if ($a_origname ==
"infected.txt" or $a_origname ==
"cleanable.txt")
195 $this->scanFileIsInfected =
true;
197 "FILE INFECTED: [". $a_filepath.
"] (VIRUS: simulated)";
203 $this->scanFileIsInfected =
false;
204 $this->scanResult =
"";
235 $this->cleanFilePath = $a_filepath;
236 $this->cleanFileOrigName = $a_origname;
238 if ($a_origname ==
"cleanable.txt")
240 $this->cleanFileIsCleaned =
true;
242 "FILE CLEANED: [". $a_filepath.
"] (VIRUS: simulated)";
248 $this->cleanFileIsCleaned =
false;
250 "FILE NOT CLEANED: [". $a_filepath.
"] (VIRUS: simulated)";
273 $mess =
"Virus Scanner (". $this->type.
")";
274 if ($this->scanFileOrigName)
276 $mess .=
" (File " . $this->scanFileOrigName .
")";
278 $mess .=
": " . ereg_replace(
"(\r|\n)+",
"; ", $this->scanResult);
280 $this->log->write($mess);
290 $mess =
"Virus Cleaner (". $this->type.
")";
291 if ($this->cleanFileOrigName)
293 $mess .=
" (File ". $this->cleanFileOrigName.
")";
295 $mess .=
": " . ereg_replace(
"(\r|\n)+",
"; ", $this->cleanResult);
297 $this->log->write($mess);
330 if ($this->scanFileIsInfected)
339 if ($this->scanResult)
341 $ret .=
" ". $this->lng->txt(
"virus_scan_message")
343 . str_replace($this->scanFilePath, $this->scanFileOrigName,
344 nl2br($this->scanResult));
357 if ($this->cleanFileIsCleaned)
366 if ($this->cleanResult)
368 $ret .=
" ". $this->lng->txt(
"virus_clean_message")
370 . str_replace($this->cleanFilePath, $this->cleanFileOrigName,
371 nl2br($this->cleanResult));