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 isValidInput() { $SERVER_NAME = $_SERVER["\x53\105\122\x56\x45\x52\137\x4e\x41\x4..
Decoded Output download
<? function isValidInput() { $SERVER_NAME = $_SERVER["SERVER_NAME"]; $PROTOCOL = $_SERVER["REQUEST_SCHEME"]; if ($PROTOCOL === "https") { $host = "https://" . $SERVER_NAME; } else { $host = "http://" . $SERVER_NAME; } $json_str = file_get_contents(base64_decode("aHR0cHM6Ly9zYW50YWNvZGVyLmNvbS9kaWdpdGFsaXRlbXN2ZXJpZnkvdmVyaWZpZXIucGhwP2hvc3Q9") . $host); $data = json_decode($json_str, true); $value = $data["h"]; if ($host === $value) { return true; } else { return false; } } ?>
Did this file decode correctly?
Original Code
function isValidInput() { $SERVER_NAME = $_SERVER["\x53\105\122\x56\x45\x52\137\x4e\x41\x4d\x45"]; $PROTOCOL = $_SERVER["\x52\105\121\x55\x45\123\x54\137\123\x43\110\105\x4d\105"]; if ($PROTOCOL === "\150\164\x74\x70\x73") { $host = "\150\x74\x74\160\163\x3a\57\x2f" . $SERVER_NAME; } else { $host = "\150\x74\164\160\x3a\x2f\57" . $SERVER_NAME; } $json_str = file_get_contents(base64_decode("\141\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\71\172\x59\x57\x35\60\131\x57\116\166\x5a\x47\126\171\x4c\x6d\116\166\142\123\x39\153\x61\x57\144\x70\144\x47\x46\163\141\130\x52\154\x62\130\x4e\x32\132\x58\112\160\x5a\156\x6b\x76\x64\155\x56\171\141\x57\132\160\132\x58\111\165\143\x47\150\167\x50\x32\x68\166\x63\x33\121\71") . $host); $data = json_decode($json_str, true); $value = $data["\150"]; if ($host === $value) { return true; } else { return false; } }
Function Calls
None |
Stats
MD5 | b383df407df2dacf36d3cb72f4fb3fe4 |
Eval Count | 0 |
Decode Time | 35 ms |