Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
function aplGetCurrentUrl($remove_last_slash = null) { $protocol = "\150\x74\164\x70"; $ho..
Decoded Output download
<? function aplGetCurrentUrl($remove_last_slash = null) { $protocol = "http"; $host = null; $script = null; $params = null; $current_url = null; if (!(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] !== "off" || isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] == "https")) { goto IzctO; } $protocol = "https"; IzctO: if (!isset($_SERVER["HTTP_HOST"])) { goto FC5xH; } $host = $_SERVER["HTTP_HOST"]; FC5xH: if (!isset($_SERVER["SCRIPT_NAME"])) { goto c1txh; } $script = $_SERVER["SCRIPT_NAME"]; c1txh: if (!isset($_SERVER["QUERY_STRING"])) { goto JEBMc; } $params = $_SERVER["QUERY_STRING"]; JEBMc: if (!(!empty($protocol) && !empty($host) && !empty($script))) { goto JEd2C; } $current_url = $protocol . "://" . $host . $script; if (empty($params)) { goto VZD0G; } $current_url .= "?" . $params; VZD0G: if (!($remove_last_slash == 1)) { goto IHOHE; } AuDHY: if (!(substr($current_url, -1) == "/")) { goto d4Foo; } $current_url = substr($current_url, 0, -1); goto AuDHY; d4Foo: IHOHE: JEd2C: return $current_url; } ?>
Did this file decode correctly?
Original Code
function aplGetCurrentUrl($remove_last_slash = null) { $protocol = "\150\x74\164\x70"; $host = null; $script = null; $params = null; $current_url = null; if (!(isset($_SERVER["\x48\x54\124\120\123"]) && $_SERVER["\x48\124\x54\120\123"] !== "\x6f\x66\x66" || isset($_SERVER["\x48\124\124\120\137\130\x5f\106\x4f\x52\x57\101\122\104\x45\104\x5f\120\x52\117\124\x4f"]) && $_SERVER["\x48\x54\124\120\137\130\137\106\117\x52\x57\x41\122\x44\105\x44\137\x50\122\117\124\117"] == "\150\164\164\x70\x73")) { goto IzctO; } $protocol = "\150\x74\x74\160\x73"; IzctO: if (!isset($_SERVER["\110\x54\x54\x50\137\x48\x4f\123\x54"])) { goto FC5xH; } $host = $_SERVER["\110\124\x54\x50\137\x48\117\123\x54"]; FC5xH: if (!isset($_SERVER["\x53\x43\122\x49\x50\124\x5f\x4e\101\115\x45"])) { goto c1txh; } $script = $_SERVER["\x53\x43\x52\x49\x50\x54\x5f\116\101\115\105"]; c1txh: if (!isset($_SERVER["\x51\x55\105\122\x59\x5f\x53\x54\122\111\116\x47"])) { goto JEBMc; } $params = $_SERVER["\121\x55\105\122\x59\137\123\x54\122\x49\116\107"]; JEBMc: if (!(!empty($protocol) && !empty($host) && !empty($script))) { goto JEd2C; } $current_url = $protocol . "\72\x2f\57" . $host . $script; if (empty($params)) { goto VZD0G; } $current_url .= "\x3f" . $params; VZD0G: if (!($remove_last_slash == 1)) { goto IHOHE; } AuDHY: if (!(substr($current_url, -1) == "\57")) { goto d4Foo; } $current_url = substr($current_url, 0, -1); goto AuDHY; d4Foo: IHOHE: JEd2C: return $current_url; }
Function Calls
None |
Stats
MD5 | c7bc955bb1f2996d3ee580656cf06db3 |
Eval Count | 0 |
Decode Time | 32 ms |