ILIAS
Release_3_10_x_branch Revision 61812
|
Base class for the interface to an external virus scanner. More...
Public Member Functions | |
ilVirusScanner ($a_scancommand, $a_cleancommand) | |
Constructor public. | |
scanFile ($a_filepath, $a_origname="") | |
scan a file for viruses | |
cleanFile ($a_filepath, $a_origname="") | |
clean an infected file | |
fileCleaned () | |
returns wether file has been cleaned successfully or not | |
logScanResult () | |
write the result of the last scan to the log | |
logCleanResult () | |
write the result of the last clean to the log | |
getScanResult () | |
get the pure output of the external scan | |
getCleanResult () | |
get the pure output of the external scan | |
getScanMessage () | |
get a located message with the result from the last scan | |
getCleanMessage () | |
get a located message with the result from the last clean | |
getScanZipFiles () | |
get info if class can scan ZIP files |
Base class for the interface to an external virus scanner.
This class is abstract and needs to be extended for actual scanners Only scanFile() and cleanFile() need to be redefined Child Constructors should call ilVirusScanner() Scan and Clean are independent and may work on different files Logging and message generation are generic
Definition at line 38 of file class.ilVirusScanner.php.
ilVirusScanner::cleanFile | ( | $a_filepath, | |
$a_origname = "" |
|||
) |
clean an infected file
needs to be redefined in child classes here it simulates a clean "cleanable.txt" is expected to be cleanable
string | path of file to check |
string | original name of the file to clean |
Reimplemented in ilVirusScannerSophos.
Definition at line 222 of file class.ilVirusScanner.php.
References $cleanResult, and logCleanResult().
ilVirusScanner::fileCleaned | ( | ) |
returns wether file has been cleaned successfully or not
Definition at line 261 of file class.ilVirusScanner.php.
References $cleanFileIsCleaned.
ilVirusScanner::getCleanMessage | ( | ) |
get a located message with the result from the last clean
Definition at line 355 of file class.ilVirusScanner.php.
References $cleanFileOrigName, and $ret.
ilVirusScanner::getCleanResult | ( | ) |
get the pure output of the external scan
Definition at line 317 of file class.ilVirusScanner.php.
References $cleanResult.
ilVirusScanner::getScanMessage | ( | ) |
get a located message with the result from the last scan
Definition at line 328 of file class.ilVirusScanner.php.
References $ret, and $scanFileOrigName.
ilVirusScanner::getScanResult | ( | ) |
get the pure output of the external scan
Definition at line 306 of file class.ilVirusScanner.php.
References $scanResult.
ilVirusScanner::getScanZipFiles | ( | ) |
get info if class can scan ZIP files
Definition at line 382 of file class.ilVirusScanner.php.
References $scanZipFiles.
ilVirusScanner::ilVirusScanner | ( | $a_scancommand, | |
$a_cleancommand | |||
) |
Constructor public.
Definition at line 151 of file class.ilVirusScanner.php.
References $ilias, $lng, and $log.
Referenced by ilVirusScannerAntiVir\ilVirusScannerAntivir(), ilVirusScannerClamAV\ilVirusScannerClamAV(), and ilVirusScannerSophos\ilVirusScannerSophos().
ilVirusScanner::logCleanResult | ( | ) |
write the result of the last clean to the log
public
Definition at line 288 of file class.ilVirusScanner.php.
Referenced by ilVirusScannerSophos\cleanFile(), and cleanFile().
ilVirusScanner::logScanResult | ( | ) |
write the result of the last scan to the log
public
Definition at line 271 of file class.ilVirusScanner.php.
Referenced by ilVirusScannerAntiVir\scanFile(), ilVirusScannerSophos\scanFile(), ilVirusScannerClamAV\scanFile(), and scanFile().
ilVirusScanner::scanFile | ( | $a_filepath, | |
$a_origname = "" |
|||
) |
scan a file for viruses
needs to be redefined in child classes here it simulates a scan "infected.txt" or "cleanable.txt" are expected to be infected
string | path of file to scan |
string | original name of the file to scan |
Reimplemented in ilVirusScannerAntiVir, ilVirusScannerClamAV, and ilVirusScannerSophos.
Definition at line 177 of file class.ilVirusScanner.php.
References $scanResult, and logScanResult().
ilVirusScanner::$cleanCommand |
Definition at line 68 of file class.ilVirusScanner.php.
ilVirusScanner::$cleanFileIsCleaned |
Definition at line 110 of file class.ilVirusScanner.php.
Referenced by fileCleaned().
ilVirusScanner::$cleanFileOrigName |
Definition at line 96 of file class.ilVirusScanner.php.
Referenced by getCleanMessage().
ilVirusScanner::$cleanFilePath |
Definition at line 89 of file class.ilVirusScanner.php.
ilVirusScanner::$cleanResult |
Definition at line 124 of file class.ilVirusScanner.php.
Referenced by ilVirusScannerSophos\cleanFile(), cleanFile(), and getCleanResult().
ilVirusScanner::$ilias |
Definition at line 131 of file class.ilVirusScanner.php.
Referenced by ilVirusScanner().
ilVirusScanner::$lng |
Definition at line 138 of file class.ilVirusScanner.php.
Referenced by ilVirusScanner().
ilVirusScanner::$log |
Definition at line 145 of file class.ilVirusScanner.php.
Referenced by ilVirusScanner().
ilVirusScanner::$scanCommand |
Definition at line 61 of file class.ilVirusScanner.php.
ilVirusScanner::$scanFileIsInfected |
Definition at line 103 of file class.ilVirusScanner.php.
ilVirusScanner::$scanFileOrigName |
Definition at line 82 of file class.ilVirusScanner.php.
Referenced by getScanMessage().
ilVirusScanner::$scanFilePath |
Definition at line 75 of file class.ilVirusScanner.php.
ilVirusScanner::$scanResult |
Definition at line 117 of file class.ilVirusScanner.php.
Referenced by getScanResult(), ilVirusScannerSophos\scanFile(), ilVirusScannerClamAV\scanFile(), ilVirusScannerAntiVir\scanFile(), and scanFile().
ilVirusScanner::$scanZipFiles |
Definition at line 54 of file class.ilVirusScanner.php.
Referenced by getScanZipFiles().
ilVirusScanner::$type |
Definition at line 46 of file class.ilVirusScanner.php.