예제 #1
0
}
if (isset($joomlaFolders)) {
    foreach ($joomlaFolders as $value) {
        if (!isset($skipFolders)) {
            $skipFolders = array($value . "/tmp/");
        } else {
            array_push($skipFolders, $value . "/tmp/");
        }
        array_push($skipFolders, $value . "/log/");
        array_push($skipFolders, $value . "/cache/");
        array_push($skipFolders, $value . "/administrator/cache/");
    }
}
$dbconfig = new Dbconfig($host, $database, $user, $password);
$scan = new Scan($dbconfig, $domain);
if ($scan->Connect()) {
    // check to see if last scan completed correctly
    if ($alreadyRunning === false) {
        $scan->scanFiles($path, $skipFolders, $processExtensions, $skipExtensions);
    }
    set_time_limit(30);
    $scan->emailResults($email, $emailinterval, $alreadyRunning);
    $scan->deleteOldTestedRecords();
    $scan = NULL;
} else {
    $text = "Error in running hashscan.php for this domain, consult logfile";
    $mailed = mail($email, "WebMonitor: ERROR SCANNING " . $domain, $text);
}
unset($appStatus);
Logfile::writeWhen("Closing Logfile");
Logfile::close();