<?php
require_once "scanner.php";
$scanner = new malware_scanner;
// Setting the path to start scan ..
$scanner->path = "/var/www/mycmd";
// Setting list of signatures ..
$scanner->signatures = Array("/Hello\,I\'m\-virus\!/");
// Try to chmod() when fail to read or write ..
$scanner->auto_chmod = TRUE;
// Don't scan files have .pdf extension ..
$scanner->set_condition("file", "/\.pdf$/", FALSE);
// Start the scan ..
$scanner->scan();
// Print detailed log ..
var_dump($scanner->log);
print "<hr />";
// Print list of infected files ..
var_dump($scanner->infected);
print "<hr />";
// Print list of repaired files ..
var_dump($scanner->repaired);
print "<hr />";
// Print list of errors ..
var_dump($scanner->errors);
?>
|