ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
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. More...
Public Member Functions | |
__construct ($a_scancommand, $a_cleancommand) | |
Constructor public. More... | |
scanBuffer ($buffer) | |
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 More... | |
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 More... | |
fileCleaned () | |
returns wether file has been cleaned successfully or not More... | |
logScanResult () | |
write the result of the last scan to the log public More... | |
logCleanResult () | |
write the result of the last clean to the log public More... | |
getScanResult () | |
get the pure output of the external scan More... | |
getCleanResult () | |
get the pure output of the external scan More... | |
getScanMessage () | |
get a located message with the result from the last scan More... | |
getCleanMessage () | |
get a located message with the result from the last clean More... | |
getScanZipFiles () | |
get info if class can scan ZIP files More... | |
Protected Member Functions | |
scanFileFromBuffer ($buffer) | |
createBufferFile ($buffer) | |
removeBufferFile ($bufferFile) | |
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 14 of file class.ilVirusScanner.php.
ilVirusScanner::__construct | ( | $a_scancommand, | |
$a_cleancommand | |||
) |
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 |
Definition at line 233 of file class.ilVirusScanner.php.
References $cleanResult, and logCleanResult().
|
protected |
string | $buffer | (any data, binary) |
Definition at line 169 of file class.ilVirusScanner.php.
References ilUtil\ilTempnam().
Referenced by scanFileFromBuffer().
ilVirusScanner::fileCleaned | ( | ) |
returns wether file has been cleaned successfully or not
Definition at line 268 of file class.ilVirusScanner.php.
References $cleanFileIsCleaned.
ilVirusScanner::getCleanMessage | ( | ) |
get a located message with the result from the last clean
Definition at line 353 of file class.ilVirusScanner.php.
References $cleanFileOrigName, and $ret.
ilVirusScanner::getCleanResult | ( | ) |
get the pure output of the external scan
Definition at line 318 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 308 of file class.ilVirusScanner.php.
References $scanResult.
ilVirusScanner::getScanZipFiles | ( | ) |
get info if class can scan ZIP files
Definition at line 378 of file class.ilVirusScanner.php.
References $scanZipFiles.
ilVirusScanner::logCleanResult | ( | ) |
write the result of the last clean to the log public
Definition at line 292 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 277 of file class.ilVirusScanner.php.
Referenced by ilVirusScannerAntiVir\scanFile(), ilVirusScannerSophos\scanFile(), ilVirusScannerClamAV\scanFile(), and scanFile().
|
protected |
string | $bufferFile |
Definition at line 179 of file class.ilVirusScanner.php.
Referenced by scanFileFromBuffer().
ilVirusScanner::scanBuffer | ( | $buffer | ) |
string | $buffer | (any data, binary) |
Definition at line 148 of file class.ilVirusScanner.php.
References scanFileFromBuffer().
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 |
Definition at line 194 of file class.ilVirusScanner.php.
References $scanResult, and logScanResult().
Referenced by scanFileFromBuffer().
|
protected |
string | $buffer | (any data, binary) |
Definition at line 157 of file class.ilVirusScanner.php.
References createBufferFile(), removeBufferFile(), and scanFile().
Referenced by ilVirusScannerClamAV\scanBuffer(), and scanBuffer().
ilVirusScanner::$cleanCommand |
Definition at line 44 of file class.ilVirusScanner.php.
ilVirusScanner::$cleanFileIsCleaned |
Definition at line 86 of file class.ilVirusScanner.php.
Referenced by fileCleaned().
ilVirusScanner::$cleanFileOrigName |
Definition at line 72 of file class.ilVirusScanner.php.
Referenced by getCleanMessage().
ilVirusScanner::$cleanFilePath |
Definition at line 65 of file class.ilVirusScanner.php.
ilVirusScanner::$cleanResult |
Definition at line 100 of file class.ilVirusScanner.php.
Referenced by ilVirusScannerSophos\cleanFile(), cleanFile(), and getCleanResult().
ilVirusScanner::$ilias |
Definition at line 107 of file class.ilVirusScanner.php.
Referenced by __construct().
ilVirusScanner::$lng |
Definition at line 114 of file class.ilVirusScanner.php.
Referenced by __construct().
ilVirusScanner::$log |
Definition at line 121 of file class.ilVirusScanner.php.
Referenced by __construct().
ilVirusScanner::$scanCommand |
Definition at line 37 of file class.ilVirusScanner.php.
ilVirusScanner::$scanFileIsInfected |
Definition at line 79 of file class.ilVirusScanner.php.
ilVirusScanner::$scanFileOrigName |
Definition at line 58 of file class.ilVirusScanner.php.
Referenced by getScanMessage().
ilVirusScanner::$scanFilePath |
Definition at line 51 of file class.ilVirusScanner.php.
ilVirusScanner::$scanResult |
Definition at line 93 of file class.ilVirusScanner.php.
Referenced by getScanResult(), ilVirusScannerSophos\scanFile(), ilVirusScannerAntiVir\scanFile(), ilVirusScannerClamAV\scanFile(), and scanFile().
ilVirusScanner::$scanZipFiles |
Definition at line 30 of file class.ilVirusScanner.php.
Referenced by getScanZipFiles().
ilVirusScanner::$type |
Definition at line 22 of file class.ilVirusScanner.php.