138 $this->scanCommand = $a_scancommand;
139 $this->cleanCommand = $a_cleancommand;
141 $this->type =
"simulate";
142 $this->scanZipFiles =
false;
170 $this->scanFilePath = $a_filepath;
171 $this->scanFileOrigName = $a_origname;
173 if ($a_origname ==
"infected.txt" or $a_origname ==
"cleanable.txt")
175 $this->scanFileIsInfected =
true;
177 "FILE INFECTED: [". $a_filepath.
"] (VIRUS: simulated)";
183 $this->scanFileIsInfected =
false;
184 $this->scanResult =
"";
215 $this->cleanFilePath = $a_filepath;
216 $this->cleanFileOrigName = $a_origname;
218 if ($a_origname ==
"cleanable.txt")
220 $this->cleanFileIsCleaned =
true;
222 "FILE CLEANED: [". $a_filepath.
"] (VIRUS: simulated)";
228 $this->cleanFileIsCleaned =
false;
230 "FILE NOT CLEANED: [". $a_filepath.
"] (VIRUS: simulated)";
253 $mess =
"Virus Scanner (". $this->type.
")";
254 if ($this->scanFileOrigName)
256 $mess .=
" (File " . $this->scanFileOrigName .
")";
258 $mess .=
": " . ereg_replace(
"(\r|\n)+",
"; ", $this->scanResult);
260 $this->log->write($mess);
270 $mess =
"Virus Cleaner (". $this->type.
")";
271 if ($this->cleanFileOrigName)
273 $mess .=
" (File ". $this->cleanFileOrigName.
")";
275 $mess .=
": " . ereg_replace(
"(\r|\n)+",
"; ", $this->cleanResult);
277 $this->log->write($mess);
310 if ($this->scanFileIsInfected)
319 if ($this->scanResult)
321 $ret .=
" ". $this->lng->txt(
"virus_scan_message")
323 . str_replace($this->scanFilePath, $this->scanFileOrigName,
324 nl2br($this->scanResult));
337 if ($this->cleanFileIsCleaned)
346 if ($this->cleanResult)
348 $ret .=
" ". $this->lng->txt(
"virus_clean_message")
350 . str_replace($this->cleanFilePath, $this->cleanFileOrigName,
351 nl2br($this->cleanResult));