public static function page_PreScan($params) { // Check for extra security plugins if (!defined('ABSPATH') || strlen(ABSPATH) < 8) { $scan_path = dirname(__FILE__); $scan_path = str_replace(DIRSEP . 'wp-content' . DIRSEP . 'plugins' . DIRSEP . 'wp-antivirus-site-protection', DIRSEP, $scan_path); //echo TEST; } else { $scan_path = ABSPATH; } $tmp_htaccess = $scan_path . DIRSEP . 'wp-content' . DIRSEP . 'plugins' . DIRSEP . '.htaccess'; if (file_exists($tmp_htaccess)) { unlink($tmp_htaccess); } if (intval($params['scans']) == 30) { $txt = 'Congratulation. One more step to protect your website. Click START SCANNER button and get your security report.'; self::ShowMessage($txt); } ?> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php if (intval($params['scans']) == 0 || $params['membership'] == 'free') { ?> <p class="avp_attention msg_box msg_error msg_icon">Your version of antivirus has limits. Some features are disabled and available in PRO version only. Get PRO version. <a href="https://www.siteguarding.com/en/buy-service/antivirus-site-protection?domain=<?php echo urlencode(get_site_url()); ?> &email=<?php echo urlencode(get_option('admin_email')); ?> " target="_blank">Upgrade to PRO version</a>.</p> <?php } ?> <div class="divTable"> <div class="divRow"> <div class="divCell"> <p> You have: <b><?php echo ucwords($params['membership']); ?> version</b> (ver. <?php echo SGAntiVirus_module::$antivirus_version; ?> )<br /> Available Scans: <?php echo $params['scans']; ?> <br /> Valid till: <?php echo $params['exp_date'] . " "; if ($params['exp_date'] < date("Y-m-d")) { echo '<span class="label_red">Expired</span>'; } if ($params['exp_date'] < date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 7, date("Y"))) && $params['exp_date'] >= date("Y-m-d")) { echo '<span class="label_red">Will Expired Soon</span>'; } ?> <br /> Google Blacklist Status: <?php if ($params['blacklist']['google'] != 'ok') { echo '<span class="label_red">Blacklisted [' . $params['blacklist']['google'] . ']</span> [<a href="https://www.siteguarding.com/en/services/malware-removal-service" target="_blank">Remove From Blacklist</a>]'; } else { echo '<span class="label_green">Not blacklisted</span>'; } ?> <br /> File Change Monitoring: <?php if ($params['filemonitoring']['status'] == 0) { echo '<span class="label_red">Disabled</span> [<a href="https://www.siteguarding.com/en/protect-your-website" target="_blank">Subscribe</a>]'; } else { echo '<span class="label_green">' . $params['filemonitoring']['plan'] . '</span> [' . $params['filemonitoring']['exp_date'] . ']'; } ?> <br /> Website Firewall: <?php if (!SGAntiVirus_module::CheckFirewall()) { echo '<span class="label_red">Not Installed</span> [<a href="https://www.siteguarding.com/en/buy-service/security-package-premium" target="_blank">Subscribe</a>]'; } else { echo '<span class="label_green">Installed</span>'; } ?> <br /> <?php if (count($params['reports']) > 0) { if ($params['last_scan_files_counters']['main'] == 0 && $params['last_scan_files_counters']['heuristic'] == 0) { echo 'Website Status: <span class="label_green">Clean</span>'; } if ($params['last_scan_files_counters']['main'] > 0) { echo 'Website Status: <span class="label_red">Infected</span> [<a href="https://www.siteguarding.com/en/services/malware-removal-service" target="_blank">Clean My Website</a>]'; } else { if ($params['last_scan_files_counters']['heuristic'] > 0) { echo 'Website Status: <span class="label_red">Review is required</span> [<a href="https://www.siteguarding.com/en/services/malware-removal-service" target="_blank">Review My Website</a>]'; } } } else { echo 'Website Status: <span class="label_red">Never Analyzed</span>'; } ?> </p> <?php if ($params['membership'] == 'pro') { $account_type_txt = 'You have PRO version'; } else { $account_type_txt = 'Get PRO version of WP Antivirus Site Protection'; } ?> <p class="avp_getpro"><a href="https://www.siteguarding.com/en/buy-service/antivirus-site-protection?domain=<?php echo urlencode(get_site_url()); ?> &email=<?php echo urlencode(get_option('admin_email')); ?> " target="_blank"><?php echo $account_type_txt; ?> </a></p> <div class="mod-box"><div> <h3 class="apv_header">Antivirus Scanner</h3> <p>To start the scan process click "Start Scanner" button.</p> <p>Scanner will automatically collect and analyze the files of your website. The scanning process can take up to 10 mins (it depends of speed of your server and amount of the files to analyze). The copy of the report we will send by email for your records.</p> <?php wp_nonce_field('name_254f4bd3ea8d'); ?> <p class="submit startscanner"> <input type="submit" name="submit" id="submit" class="button button-primary" value="Start Scanner"> </p> <input name="allow_scan" type="hidden" id="allow_scan" value="1"> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="StartScan"/> </form> <p class="msg_alert"><b>Please note:</b> Some other security plugins can block Antivirus scanning process. Disable them or <a href="https://www.siteguarding.com/en/contacts" target="_blank">contact SiteGuarding.com support</a> for more information.</p> <p><b>Found suspicious file on your website?</b> Analyze it for free with our online tool antivirus. <a target="_blank" href="https://www.siteguarding.com/en/website-antivirus">Click here</a></p> <h3 class="apv_header">Extra Options</h3> <div class="divTable avpextraoption"> <div class="divRow"> <div class="divCell avpextraoption_txt">Your website got hacked and blacklisted by Google? This is really bad, you are going to lose your visitors. We will help you to clean your website and remove from all blacklists.</div> <div class="divCell"> <form method="post" action="https://www.siteguarding.com/en/services/malware-removal-service"> <input type="submit" name="submit" id="submit" class="button button-primary" value="Clean My Website"> </form> </div> </div> <div class="divRow"><div class="divCell"> </div><div class="divCell"></div><div class="divCell"></div><div class="divCell"></div></div> <div class="divRow"> <div class="divCell avpextraoption_txt">Found suspicious files on your website? Send us request for free analyze. Our security experts will review your files and explain what to do.</div> <div class="divCell"> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php if ($params['membership'] == 'pro') { ?> <input type="submit" name="submit" id="submit" class="button button-primary" value="Send Files For Analyze"> <?php } else { ?> <input type="button" class="button button-primary" value="Send Files For Analyze" onclick="javascript:alert('Available in PRO version only. Please Upgrade to PRO version.');"> <?php } ?> <?php wp_nonce_field('name_254f4bd3ea8d'); ?> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="SendFilesForAnalyze"/> </form> </div> </div> <div class="divRow"><div class="divCell"> </div><div class="divCell"></div><div class="divCell"></div><div class="divCell"></div></div> <div class="divRow"> <div class="divCell avpextraoption_txt">Remove viruses from your website with one click.<br><span class="msg_alert">Please note: Hackers can inject malware codes inside of the normal files. We advice to send request to SiteGuarding.com for file review and analyze.</span></div> <div class="divCell"> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php if ($params['membership'] == 'pro') { ?> <input type="submit" name="submit" id="submit" class="button button-primary" value="Quarantine malware" onclick="return confirm('Before use this feature, please make sure that you have sent the files for analyze and got reply from SiteGuarding.com\nMove files to quarantine?')"> <?php } else { ?> <input type="button" class="button button-primary" value="Quarantine malware" onclick="javascript:alert('Available in PRO version only. Please Upgrade to PRO version.');"> <?php } ?> <?php wp_nonce_field('name_254f4bd3ea8d'); ?> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="QuarantineFiles"/> </form> </div> </div> <div class="divRow"><div class="divCell"> </div><div class="divCell"></div><div class="divCell"></div><div class="divCell"></div></div> <div class="divRow"> <div class="divCell avpextraoption_txt">Select Security Package for Your Website. Server-side scanning & file change monitoring. Daily analyze of all the changes on your website. Malware removal from already hacked website and much more</div> <div class="divCell"> <form method="post" action="https://www.siteguarding.com/en/protect-your-website"> <input type="submit" name="submit" id="submit" class="button button-primary" value="Select Security Package"> </form> </div> </div> </div> <h3 class="howitworks">Do you need clean and protected website? Please learn how it works.</h3> <p class="howitworks"><a href="https://www.siteguarding.com/en/protect-your-website" target="_blank">Our security packages</a> cover all your needs. Focus on your business and leave security to us.</p> <p class="center"> <iframe src="https://player.vimeo.com/video/140200465" width="100%" height="430" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe> </p> <form class="howitworks" method="post" action="https://www.siteguarding.com/en/protect-your-website"> <p class="submit startscanner"> <input type="submit" name="submit" class="button button-primary greenbg" value="Protect My Website"> </p> </form> <?php if ($params['membership'] != 'pro') { ?> <p><span class="msg_box msg_error">Quarantine & Malware Removal feature is disabled. Available in PRO version only. <a href="https://www.siteguarding.com/en/buy-service/antivirus-site-protection?domain=<?php echo urlencode(get_site_url()); ?> &email=<?php echo urlencode(get_option('admin_email')); ?> " target="_blank">Upgrade to PRO version</a></span></p> <?php } if (($params['last_scan_files_counters']['main'] > 0 || $params['last_scan_files_counters']['heuristic'] > 0) && $params['membership'] != 'free') { ?> <br /><h3>Latest Scan Result</h3> <?php } if (count($params['last_scan_files']['main'])) { // Check files foreach ($params['last_scan_files']['main'] as $k => $tmp_file) { if (!file_exists(ABSPATH . '/' . $tmp_file)) { unset($params['last_scan_files']['main'][$k]); } } if (count($params['last_scan_files']['main']) > 0) { ?> <div class="avp_latestfiles_block"> <h4>Action is required</h4> <?php foreach ($params['last_scan_files']['main'] as $tmp_file) { echo '<p>' . $tmp_file . '</p>'; } ?> <br /> <div class="divTable"> <div class="divRow"> <div class="divCell"> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php if ($params['membership'] == 'pro') { ?> <input type="submit" name="submit" id="submit" class="button button-primary" value="Send Files to SiteGuarding.com"> <?php } else { ?> <input type="button" class="button button-primary" value="Send Files to SiteGuarding.com" onclick="javascript:alert('Available in PRO version only. Please Upgrade to PRO version.');"> <?php } ?> <?php wp_nonce_field('name_254f4bd3ea8d'); ?> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="SendFilesForAnalyze"/> </form> </div> <div class="divCell"> </div> <div class="divCell"> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php if ($params['membership'] == 'pro') { ?> <input type="submit" name="submit" id="submit" class="button button-primary" value="Quarantine & Remove malware" onclick="return confirm('Before use this feature, please make sure that you have sent the files for analyze and got reply from SiteGuarding.com\nMove files to quarantine?')"> <?php } else { ?> <input type="button" class="button button-primary" value="Quarantine & Remove malware" onclick="javascript:alert('Available in PRO version only. Please Upgrade to PRO version.');"> <?php } ?> <?php wp_nonce_field('name_254f4bd3ea8d'); ?> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="QuarantineFiles"/> <input type="hidden" name="filelist" value="main"/> </form> </div></div></div> * Please note: Hackers can inject malware codes inside of the normal files. If you delete these files, website can stop to work or will be not stable. We advice to send request to SiteGuarding.com for file review and analyze. </div> <?php } } if (count($params['last_scan_files']['heuristic'])) { // Check files foreach ($params['last_scan_files']['heuristic'] as $k => $tmp_file) { if (!file_exists(ABSPATH . '/' . $tmp_file)) { unset($params['last_scan_files']['heuristic'][$k]); } } if (count($params['last_scan_files']['heuristic']) > 0) { ?> <div class="avp_latestfiles_block"> <h4>Review is required</h4> <?php foreach ($params['last_scan_files']['heuristic'] as $tmp_file) { echo '<p>' . $tmp_file . '</p>'; } ?> <br /> <?php if ($params['whitelist_filters_enabled'] == 1) { ?> <span class="msg_box msg_warning">White List is enabled.</span><br /><br /> <?php } ?> <div class="divTable"> <div class="divRow"> <div class="divCell"> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php wp_nonce_field('name_254f4bd3ea8d'); if ($params['membership'] == 'pro') { ?> <input type="submit" name="submit" id="submit" class="button button-primary" value="Send Files to SiteGuarding.com"> <?php } else { ?> <input type="button" class="button button-primary" value="Send Files to SiteGuarding.com" onclick="javascript:alert('Available in PRO version only. Please Upgrade to PRO version.');"> <?php } ?> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="SendFilesForAnalyze"/> </form> </div> <div class="divCell"> </div> <div class="divCell"> <form method="post" action="admin.php?page=plgavp_Antivirus"> <?php if ($params['membership'] == 'pro') { ?> <input type="submit" name="submit" id="submit" class="button button-primary" value="Quarantine & Remove malware" onclick="return confirm('Before use this feature, please make sure that you have sent the files for analyze and got reply from SiteGuarding.com\nMove files to quarantine?')"> <?php } else { ?> <input type="button" class="button button-primary" value="Quarantine & Remove malware" onclick="javascript:alert('Available in PRO version only. Please Upgrade to PRO version.');"> <?php } ?> <?php wp_nonce_field('name_254f4bd3ea8d'); ?> <input type="hidden" name="page" value="plgavp_Antivirus"/> <input type="hidden" name="action" value="QuarantineFiles"/> <input type="hidden" name="filelist" value="heuristic"/> </form> </div></div></div> * Please note: Hackers can inject malware codes inside of the normal files. If you delete these files, website can stop to work or will be not stable. We advice to send request to SiteGuarding.com for file review and analyze. </div> <?php } } ?> <img class="imgpos" alt="WP Antivirus Site Protection" src="<?php echo plugins_url('images/', __FILE__) . 'mid_box.png'; ?> " width="110" height="70"> </div></div> <div class="mod-box"><div> <h3 class="apv_header">Latest Reports</h3> <?php $reports = $params['reports']; //print_r($params); if (count($reports)) { ?> <p> <?php foreach ($reports as $report_info) { ?> <a href="<?php echo $report_info['report_link']; ?> " target="_blank">Click to view report for <?php echo $report_info['domain']; ?> . Date: <?php echo $report_info['date']; ?> </a><br /> <?php } ?> </p> <?php } else { ?> <p>You don't have any available report yet. Please scan your website.</p> <?php } ?> <img class="imgpos" alt="WP Antivirus Site Protection" src="<?php echo plugins_url('images/', __FILE__) . 'left_box.png'; ?> " width="110" height="70"> </div></div> <?php self::HelpBlock(); ?> </div> <?php if ($params['membership'] != 'pro') { ?> <div class="divCell divCellReka"> <div class="RekaBlock"> <a href="https://www.siteguarding.com/en/website-extensions"> <img class="effect7" src="<?php echo plugins_url('images/rek1.png', __FILE__); ?> " /> </a> </div> <div class="RekaBlock"> <a href="http://www.safetybis.com/"> <img class="effect7" src="<?php echo plugins_url('images/rek2.png', __FILE__); ?> " /> </a> </div> <div class="RekaBlock"> <a href="https://www.siteguarding.com/en/prices"> <img class="effect7" src="<?php echo plugins_url('images/rek3.png', __FILE__); ?> " /> </a> </div> <div class="RekaBlock"> <a href="https://www.siteguarding.com/en/sitecheck"> <img class="effect7" src="<?php echo plugins_url('images/rek4.png', __FILE__); ?> " /> </a> </div> <div class="RekaBlock"> <a href="https://www.siteguarding.com/en/buy-service/antivirus-site-protection"> <img class="effect7" src="<?php echo plugins_url('images/rek5.png', __FILE__); ?> " /> </a> </div> <div class="RekaBlock"> Remove these ads?<br /> <a href="https://www.siteguarding.com/en/buy-service/antivirus-site-protection">Upgrade to PRO version</a> </div> </div> <?php } ?> </div> </div> <?php }
<?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;