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 aplValidateIntegerValue($number, $min_value = 0, $max_value = INF) { $result ..
Decoded Output download
<? function aplValidateIntegerValue($number, $min_value = 0, $max_value = INF)
{
$result = false;
if (!(!is_float($number) && filter_var($number, FILTER_VALIDATE_INT, array("options" => array("min_range" => $min_value, "max_range" => $max_value))) !== false)) {
goto FQcAr;
}
$result = true;
FQcAr:
return $result;
}
function aplValidateRawDomain($url)
{
$result = false;
if (empty($url)) {
goto wDD01;
}
if (preg_match("/^[a-z0-9-.]+\.[a-z\.]{2,7}$/", strtolower($url))) {
goto mB5xB;
}
$result = false;
goto bqeHh;
mB5xB:
$result = true;
bqeHh:
wDD01:
return $result;
}
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 xZipm;
}
$protocol = "https";
xZipm:
if (!isset($_SERVER["HTTP_HOST"])) {
goto COfUG;
}
$host = $_SERVER["HTTP_HOST"];
COfUG:
if (!isset($_SERVER["SCRIPT_NAME"])) {
goto Y45ao;
}
$script = $_SERVER["SCRIPT_NAME"];
Y45ao:
if (!isset($_SERVER["QUERY_STRING"])) {
goto KfmwO;
}
$params = $_SERVER["QUERY_STRING"];
KfmwO:
if (!(!empty($protocol) && !empty($host) && !empty($script))) {
goto K97gf;
}
$current_url = $protocol . "://" . $host . $script;
if (empty($params)) {
goto BoTdO;
}
$current_url .= "?" . $params;
BoTdO:
if (!($remove_last_slash == 1)) {
goto uEWsh;
}
QWFE2:
if (!(substr($current_url, -1) == "/")) {
goto EF0lb;
}
$current_url = substr($current_url, 0, -1);
goto QWFE2;
EF0lb:
uEWsh:
K97gf:
return $current_url;
} ?>
Did this file decode correctly?
Original Code
function aplValidateIntegerValue($number, $min_value = 0, $max_value = INF)
{
$result = false;
if (!(!is_float($number) && filter_var($number, FILTER_VALIDATE_INT, array("\157\x70\164\x69\157\x6e\x73" => array("\x6d\x69\156\x5f\x72\141\x6e\147\145" => $min_value, "\x6d\x61\x78\x5f\162\x61\x6e\x67\x65" => $max_value))) !== false)) {
goto FQcAr;
}
$result = true;
FQcAr:
return $result;
}
function aplValidateRawDomain($url)
{
$result = false;
if (empty($url)) {
goto wDD01;
}
if (preg_match("\x2f\x5e\133\141\x2d\172\60\55\71\x2d\56\x5d\x2b\134\56\x5b\x61\x2d\172\134\56\135\x7b\62\x2c\x37\x7d\x24\57", strtolower($url))) {
goto mB5xB;
}
$result = false;
goto bqeHh;
mB5xB:
$result = true;
bqeHh:
wDD01:
return $result;
}
function aplGetCurrentUrl($remove_last_slash = null)
{
$protocol = "\x68\164\x74\160";
$host = null;
$script = null;
$params = null;
$current_url = null;
if (!(isset($_SERVER["\110\124\x54\120\123"]) && $_SERVER["\110\124\124\120\123"] !== "\157\x66\x66" || isset($_SERVER["\x48\x54\124\x50\x5f\x58\137\106\117\x52\x57\101\122\104\105\104\x5f\120\x52\117\x54\117"]) && $_SERVER["\110\124\124\120\137\130\137\x46\x4f\122\127\101\x52\x44\105\x44\137\x50\122\x4f\124\117"] == "\x68\164\x74\160\x73")) {
goto xZipm;
}
$protocol = "\x68\x74\x74\x70\163";
xZipm:
if (!isset($_SERVER["\x48\x54\124\x50\x5f\110\x4f\x53\x54"])) {
goto COfUG;
}
$host = $_SERVER["\110\x54\x54\120\x5f\x48\x4f\123\124"];
COfUG:
if (!isset($_SERVER["\x53\x43\122\111\x50\124\137\116\101\x4d\105"])) {
goto Y45ao;
}
$script = $_SERVER["\123\x43\122\111\120\124\137\x4e\x41\115\105"];
Y45ao:
if (!isset($_SERVER["\x51\125\x45\122\x59\137\x53\x54\122\111\x4e\107"])) {
goto KfmwO;
}
$params = $_SERVER["\121\125\x45\x52\x59\x5f\123\x54\x52\x49\116\x47"];
KfmwO:
if (!(!empty($protocol) && !empty($host) && !empty($script))) {
goto K97gf;
}
$current_url = $protocol . "\x3a\57\x2f" . $host . $script;
if (empty($params)) {
goto BoTdO;
}
$current_url .= "\77" . $params;
BoTdO:
if (!($remove_last_slash == 1)) {
goto uEWsh;
}
QWFE2:
if (!(substr($current_url, -1) == "\57")) {
goto EF0lb;
}
$current_url = substr($current_url, 0, -1);
goto QWFE2;
EF0lb:
uEWsh:
K97gf:
return $current_url;
}
Function Calls
None |
Stats
MD5 | b46c263552e6875c465e39d069b8a70a |
Eval Count | 0 |
Decode Time | 36 ms |