if ($_COOKIE['selected_language'] != "" and @is_dir(ROOT_DIR . '/language/' . $_COOKIE['selected_language'])) { $selected_language = $_COOKIE['selected_language']; } } if (file_exists(ROOT_DIR . '/language/' . $selected_language . '/adminpanel.lng')) { require_once ROOT_DIR . '/language/' . $selected_language . '/adminpanel.lng'; } else { die("Language file not found"); } $config['charset'] = $lang['charset'] != '' ? $lang['charset'] : $config['charset']; require_once ENGINE_DIR . '/modules/sitelogin.php'; if ($member_id['user_group'] != 1) { die("error"); } require_once ENGINE_DIR . '/classes/antivirus.class.php'; $antivirus = new antivirus(); if ($_REQUEST['folder'] == "lokal") { if ($antivirus->snap) { $antivirus->scan_files(ROOT_DIR, false, true); } else { $antivirus->scan_files(ROOT_DIR . "/backup", false); $antivirus->scan_files(ROOT_DIR . "/engine", false); $antivirus->scan_files(ROOT_DIR . "/language", false); $antivirus->scan_files(ROOT_DIR . "/templates", false); $antivirus->scan_files(ROOT_DIR . "/uploads", false); $antivirus->scan_files(ROOT_DIR . "/upgrade", false); $antivirus->scan_files(ROOT_DIR, false); } } elseif ($_REQUEST['folder'] == "snap") { $antivirus->scan_files(ROOT_DIR, true, true); $filecontents = "";
} $db->free(); reset($arr); $tables = ""; while (list($key, $val) = each($arr)) { $tables .= ", `" . $db->safesql($val) . "`"; } $tables = substr($tables, 1); $query = "OPTIMIZE TABLE "; $query .= $tables; $db->query($query); die("done"); } elseif ($cronmode == "antivirus") { @(include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng'); require_once ENGINE_DIR . '/classes/antivirus.class.php'; $antivirus = new antivirus(); $antivirus->scan_files(ROOT_DIR . "/backup"); $antivirus->scan_files(ROOT_DIR . "/engine"); $antivirus->scan_files(ROOT_DIR . "/language"); $antivirus->scan_files(ROOT_DIR . "/templates"); $antivirus->scan_files(ROOT_DIR . "/uploads"); $antivirus->scan_files(ROOT_DIR . "/upgrade"); $antivirus->scan_files(ROOT_DIR); if (count($antivirus->bad_files)) { $found_files = ""; foreach ($antivirus->bad_files as $idx => $data) { if ($data['type']) { $type = $lang['anti_modified']; } else { $type = $lang['anti_not']; }
} $db->free(); reset($arr); $tables = ""; while (list($key, $val) = each($arr)) { $tables .= ", `" . $db->safesql($val) . "`"; } $tables = substr($tables, 1); $query = "OPTIMIZE TABLE "; $query .= $tables; $db->query($query); die("done"); } elseif ($cronmode == "antivirus") { @(include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng'); require_once ENGINE_DIR . '/classes/antivirus.class.php'; $antivirus = new antivirus(); $antivirus->scan_files(ROOT_DIR, false, true); if (count($antivirus->bad_files)) { $found_files = ""; foreach ($antivirus->bad_files as $idx => $data) { if ($data['type']) { $type = $lang['anti_modified']; } else { $type = $lang['anti_not']; } $found_files .= "\n{$data['file_path']} {$type}\n"; } include_once ENGINE_DIR . '/classes/mail.class.php'; $mail = new dle_mail($config); $message = $lang['anti_message_1'] . "\n{$found_files}\n{$lang['anti_message_2']}\n\n{$lang['lost_mfg']} " . $config['http_home_url']; $mail->send($config['admin_mail'], $lang['anti_subj'], $message);
<?php /* Appointment: Антивирус File: antivirus.php */ if (!defined('MOZG')) { die('Hacking attempt!'); } if ($_GET['act'] == 'start') { require_once ENGINE_DIR . '/classes/antivirus.php'; $antivirus = new antivirus(); if ($_REQUEST['folder'] == "lokal") { $antivirus->scan_files(ROOT_DIR . "/backup", false, true); $antivirus->scan_files(ROOT_DIR . "/system", false, true); $antivirus->scan_files(ROOT_DIR . "/lang", false, true); $antivirus->scan_files(ROOT_DIR . "/min", false, true); $antivirus->scan_files(ROOT_DIR . "/templates", false, false); $antivirus->scan_files(ROOT_DIR . "/uploads", false, true); $antivirus->scan_files(ROOT_DIR . "/antibot", false, true); $antivirus->scan_files(ROOT_DIR, false, true); } elseif ($_REQUEST['folder'] == "snap") { $antivirus->scan_files(ROOT_DIR . "/backup", true); $antivirus->scan_files(ROOT_DIR . "/system", true); $antivirus->scan_files(ROOT_DIR . "/lang", true); $antivirus->scan_files(ROOT_DIR . "/min", true); $antivirus->scan_files(ROOT_DIR . "/templates", true); $antivirus->scan_files(ROOT_DIR . "/uploads", true); $antivirus->scan_files(ROOT_DIR . "/antibot", true); $antivirus->scan_files(ROOT_DIR, true); $filecontents = "";