Update 'sc.php'

This commit is contained in:
Malin
2016-11-06 12:30:55 +01:00
parent 842a0ecca9
commit 9b0d4b06c7

77
sc.php
View File

@@ -510,84 +510,7 @@ system($GLOBALS["findcmd"].' -type f -perm 0000 -exec ls -al');
echo "Finding All Directories With Chmod Set To 0000<br /><br />";
system($GLOBALS["findcmd"].' -type d -perm 0000 -exec ls -al');
}
/*
function sucuri()
{
$myresults = wp_remote_get("http://sitecheck.sucuri.net/scanner/?serialized&fromwp&scan=".home_url(), array("timeout" => 180));
if(is_wp_error($myresults))
{
print_r($myresults);
return;
}
$res = unserialize($myresults['body']);
echo '<div class="wrap">';
echo '<h2>Sucuri SiteCheck Malware Scanner</h2>';
if(!isset($res['MALWARE']['WARN']))
{
echo '<h3><img style="position:relative;top:5px" height="22" width="22" src="
'.site_url().'/wp-content/plugins/sucuri-scanner/images/ok.png" /> &nbsp;
No malware was identified</h3>';
echo "<p><strong>Malware:</strong> No.</p>";
echo "<p><strong>Malicious javascript:</strong> No.</p>";
echo "<p><strong>Malicious iframes:</strong> No.</p>";
echo "<p><strong>Suspicious redirections (htaccess):</strong> No.</p>";
echo "<p><strong>Blackhat SEO Spam:</strong> No.</p>";
echo "<p><strong>Anomaly detection:</strong> Clean.</p>";
}
else
{
echo '<h3><img style="position:relative;top:5px" height="22" width="22" src="
'.site_url().'/wp-content/plugins/sucuri-scanner/images/ok.png" /> &nbsp;
Site compromised (malware was identified)</h3>';
foreach($res['MALWARE']['WARN'] as $malres)
{
if(!is_array($malres))
{
echo htmlspecialchars($malres);
}
else
{
$mwdetails = explode("\n", htmlspecialchars($malres[1]));
echo htmlspecialchars($malres[0])."\n<br />". substr($mwdetails[0], 1)."<br />\n";
}
}
echo "<br />";
}
echo '<i>More details here <a href="http://sitecheck.sucuri.net/scanner/?&scan='.home_url().'">http://sitecheck.sucuri.net/scanner/?&scan='.home_url().'</a></i>';
echo "<hr />\n";
if(isset($res['BLACKLIST']['WARN']))
{
echo '<h3><img style="position:relative;top:5px" height="22" width="22" src="
'.site_url().'/wp-content/plugins/sucuri-scanner/images/warn.png" /> &nbsp;
Site blacklisted</h3>';
}
else
{
echo '<h3><img style="position:relative;top:5px" height="22" width="22" src="
'.site_url().'/wp-content/plugins/sucuri-scanner/images/ok.png" /> &nbsp;
Site blacklist-free</h3>';
}
foreach($res['BLACKLIST']['INFO'] as $blres)
{
echo "<b>CLEAN: </b>".htmlspecialchars($blres[0])." <a href=''>".htmlspecialchars($blres[1])."</a><br />";
}
if(isset($res['BLACKLIST']['WARN']))
{
foreach($res['BLACKLIST']['WARN'] as $blres)
{
echo "<b>WARN: </b>".htmlspecialchars($blres[0])." <a href=''>".htmlspecialchars($blres[1])."</a><br />";
}
}
*/
function trimblanklines($str) {
return preg_replace('`\A[ \t]*\r?\n|\r?\n[ \t]*\Z`','',$str);
}