// Error module is not loaded exit; } $license_info = SGAntiVirus::GetLicenseInfo(get_site_url(), $access_key); $session_report_key = md5($domain . '-' . rand(1, 1000) . '-' . time()); SGAntiVirus_module::MembershipFile($license_info['membership'], $license_info['scans'], $params['show_protectedby']); // Prepare scan $_POST['scan_path'] = ABSPATH; $_POST['access_key'] = $access_key; $_POST['do_evristic'] = $params['do_evristic']; $_POST['domain'] = get_site_url(); $_POST['email'] = get_option('admin_email'); $_POST['session_report_key'] = $session_report_key; $_POST['membership'] = $license_info['membership']; // Start scan SGAntiVirus_module::scan(false, false); } exit; } // Remote request malware files if (isset($_GET['task']) && $_GET['task'] == 'get_malware_files') { error_reporting(0); $access_key = trim($_GET['access_key']); $params = plgwpavp_GetExtraParams(); if ($params['access_key'] == $access_key) { include_once dirname(__FILE__) . DIRSEP . 'sgantivirus.class.php'; if (!class_exists('SGAntiVirus_module')) { // Error module is not loaded echo 'Error module is not loaded'; exit; }
<?php include_once dirname(__FILE__) . '/sgantivirus.class.php'; error_reporting(0); $action = $_REQUEST['action']; switch ($action) { // Start Scan AJAX case 'StartScan_AJAX': SGAntiVirus_module::scan(); break; // Get Scan Progress AJAX // Get Scan Progress AJAX case 'GetScanProgress_AJAX': echo SGAntiVirus_module::readProgress(); break; // Get Report AJAX // Get Report AJAX case 'GetScanReport_AJAX': echo SGAntiVirus_module::getReportText(); break; } exit;