去除holasionweb.com恶意代码方法

<< 返回前篇

这是我在:http://stackoverflow.com/questions/2798745/how-can-i-remove-an-iframe-virus-from-all-of-php-files-on-my-website 找到的解决方法.

注意,本方法不保证在使用后,网站出现问题!去除代码前先备份之前的数据与文件!

1、建立一个php文件,名字为clrea.php。

2、将如下代码拷贝至文件,并保存。上传至网站根目录

3、上传完毕后,用浏览器访问该文件,该文件会执行相应的批量去代码操作。

操作前先做好备份!!
代码如下,或直接下载我保存的php文件

Site clean up by <a href="http://sucuri.net">http://sucuri.net</a><br />
This script will clean the malware from this attack:
<a href="http://sucuri.net/malware/entry/MW:MROBH:1">http://sucuri.net/malware/entry/MW:MROBH:1</a>
<br /><br />
If you need help, contact [email protected] or visit us at <a href="http://sucuri.net/index.php?page=nbi">

http://sucuri.net/index.php?page=nbi</a>

<br />
<br />
<?php

$dir = "./";

$rmcode = `find $dir -name "*.php" -type f |xargs sed -i ‘s#<?php /\*\*/ eval(base64_decode("aWY.*?>##g’ 2>&1`;
echo "Malware removed.<br />\n";
$emptyline = `find $dir -name "*.php" -type f | xargs sed -i ‘/./,$!d’ 2>&1`;
echo "Empty lines removed.<br />\n";
?>
<br />
Completed.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)
<< 返回前篇

留下回复