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 gJtzl; w_j3C: fwrite($log1, "\x43\150\x65\x63\x6b\145\x64\x20\111\120\x3a\x20..

Decoded Output download

<?php 
 goto gJtzl; w_j3C: fwrite($log1, "Checked IP: {$ip} on {$dateTime}\xaResponse: {$ipInfoResponse}
"); goto POkWw; Yijkp: fwrite($log2, "Checked IP: {$ip} on {$dateTime}
"); goto LQFwK; Hcwwu: $dateTime = date("Y-m-d H:i:s"); goto EaorV; u5y0U: fwrite($logSuccess, "Domain     : {$ipInfoData["domain"]}\xa"); goto vpFMB; IrQu5: curl_setopt($ch, CURLOPT_URL, $abuseIpDbUrl); goto Co4Ai; S980N: if (!isset($ipInfoData["timezone"]) || strpos($ipInfoData["timezone"], "Europe") === false || !isset($ipInfoData["country"]) || $ipInfoData["country"] !== "GB" || isset($ipInfoData["org"]) && (stripos($ipInfoData["org"], "datacamp") !== false || stripos($ipInfoData["org"], "digitalocean") !== false || stripos($ipInfoData["org"], "digital ocean") !== false || stripos($ipInfoData["org"], "Datacamp Limited") !== false) || stripos(json_encode($ipInfoData), "datacamp") !== false) { $step1Passed = false; } goto xJuhO; bhCgv: $log1 = fopen($step1LogFile, "a"); goto ORpns; TGLjJ: $abuseIpDbUrl = "https://api.abuseipdb.com/api/v2/check?ipAddress={$ip}"; goto jWU9b; WB58e: fwrite($logSuccess, "Location   : {$ipInfoData["loc"]}
"); goto btn5Q; fbHS3: $dateTime = date("Y-m-d H:i:s"); goto w_j3C; IFLUE: fclose($log2); goto Ih1x8; ORpns: $ipInfoUrl = "https://ipinfo.io/{$ip}?token={$token}"; goto zPXx4; jWU9b: $ch = curl_init(); goto IrQu5; ECJ8Q: fwrite($logSuccess, "-------------------------------------------------
"); goto NC45h; POkWw: $step1Passed = true; goto S980N; qAjf4: fwrite($logSuccess, "-------------------------------------------------\xa
"); goto wVLNF; btn5Q: fwrite($logSuccess, "Postal     : {$ipInfoData["postal"]}
"); goto vg03h; xJuhO: if ($step1Passed) { fwrite($log1, "IP {$ip} passed Step 1 checks. Proceeding to Step 2.\xa
"); fclose($log1); } else { fwrite($log1, "IP {$ip} failed Step 1 checks. User blocked.\xa
"); fclose($log1); header("Location: https://en.wikipedia.org/wiki/Wikipedia:Random"); die; } goto HyVxL; U158u: fwrite($logSuccess, "Region     : {$ipInfoData["region"]}
"); goto XUf0W; ZHWjA: fwrite($logSuccess, "Type       : {$ipInfoData["type"]}
"); goto qAjf4; dBpdO: $ipInfoData = json_decode($ipInfoResponse, true); goto fbHS3; zPXx4: $ipInfoResponse = file_get_contents($ipInfoUrl); goto dBpdO; QIx_B: if (isset($abuseData["data"])) { fwrite($log2, "IP Address    : {$ip}\xa"); fwrite($log2, "Abuse Score   : {$abuseData["data"]["abuseConfidenceScore"]}\xa"); fwrite($log2, "ISP           : {$abuseData["data"]["isp"]}
"); fwrite($log2, "Domain        : {$abuseData["data"]["domain"]}\xa"); fwrite($log2, "Country       : {$abuseData["data"]["countryCode"]}\xa"); fwrite($log2, "Usage Type    : {$abuseData["data"]["usageType"]}
"); fwrite($log2, "-------------------------------------------------
"); if ($abuseData["data"]["abuseConfidenceScore"] > 3) { fwrite($log2, "IP {$ip} failed Step 2 checks. User blocked.\xa\xa"); fclose($log2); header("Location: https://en.wikipedia.org/wiki/Wikipedia:Random"); die; } else { fwrite($log2, "IP {$ip} passed Step 2 checks. Proceeding to success log.

"); } } else { fwrite($log2, "IP {$ip} failed to retrieve data from AbuseIPDB. User blocked.\xa
"); fclose($log2); header("Location: https://en.wikipedia.org/wiki/Wikipedia:Random"); die; } goto IFLUE; bdGCF: curl_setopt($ch, CURLOPT_HTTPHEADER, array("Key: {$abuseIpDbKey}", "Accept: application/json")); goto vABh_; vpFMB: fwrite($logSuccess, "Route      : {$ipInfoData["route"]}\xa"); goto ZHWjA; wVLNF: fclose($logSuccess); goto HalWB; DNCLL: $step2LogFile = "step2_log.txt"; goto qswrK; SRAVg: $abuseData = json_decode($abuseResponse, true); goto Yijkp; S4zc8: $abuseIpDbKey = "1f6b17f0c464ed75075d1e3bb1996402c36f1dbe3780500a7262b031f3704a36a135c52a0b9035c7"; goto vWTgu; vWTgu: $ip = $_SERVER["REMOTE_ADDR"]; goto O_ojy; Ih1x8: $logSuccess = fopen($successLogFile, "a"); goto Hcwwu; HyVxL: $log2 = fopen($step2LogFile, "a"); goto TGLjJ; Co4Ai: curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); goto bdGCF; zg8_c: curl_close($ch); goto SRAVg; LQFwK: fwrite($log2, "-------------------------------------------------
"); goto QIx_B; IY6cE: fwrite($logSuccess, "City       : {$ipInfoData["city"]}
"); goto U158u; O_ojy: $step1LogFile = "step1_log.txt"; goto DNCLL; qswrK: $successLogFile = "successful_users.txt"; goto bhCgv; XUf0W: fwrite($logSuccess, "Country    : {$ipInfoData["country"]}\xa"); goto WB58e; gJtzl: $token = "34989cde0bbf18"; goto S4zc8; NC45h: fwrite($logSuccess, "Hostname   : {$ipInfoData["hostname"]}
"); goto IY6cE; EaorV: fwrite($logSuccess, "Successful User: {$ip} on {$dateTime}
"); goto ECJ8Q; vABh_: $abuseResponse = curl_exec($ch); goto zg8_c; vg03h: fwrite($logSuccess, "Timezone   : {$ipInfoData["timezone"]}\xa"); goto fq5E5; fq5E5: fwrite($logSuccess, "ASN        : {$ipInfoData["asn"]}\xa"); goto u5y0U; HalWB: ?> 
 

Did this file decode correctly?

Original Code

<?php
 goto gJtzl; w_j3C: fwrite($log1, "\x43\150\x65\x63\x6b\145\x64\x20\111\120\x3a\x20{$ip}\x20\157\156\x20{$dateTime}\xa\122\x65\163\x70\157\156\x73\x65\72\40{$ipInfoResponse}\12"); goto POkWw; Yijkp: fwrite($log2, "\103\150\145\143\153\x65\x64\x20\x49\120\72\x20{$ip}\40\x6f\x6e\40{$dateTime}\12"); goto LQFwK; Hcwwu: $dateTime = date("\131\x2d\155\55\x64\40\110\72\151\x3a\163"); goto EaorV; u5y0U: fwrite($logSuccess, "\104\x6f\155\141\151\x6e\40\x20\40\40\x20\72\40{$ipInfoData["\x64\157\x6d\x61\x69\156"]}\xa"); goto vpFMB; IrQu5: curl_setopt($ch, CURLOPT_URL, $abuseIpDbUrl); goto Co4Ai; S980N: if (!isset($ipInfoData["\164\x69\155\145\x7a\x6f\x6e\145"]) || strpos($ipInfoData["\x74\151\x6d\145\172\x6f\x6e\x65"], "\105\165\162\x6f\160\x65") === false || !isset($ipInfoData["\143\157\165\156\164\162\x79"]) || $ipInfoData["\x63\157\165\156\x74\162\171"] !== "\x47\102" || isset($ipInfoData["\157\x72\147"]) && (stripos($ipInfoData["\x6f\162\x67"], "\x64\141\x74\x61\x63\x61\155\160") !== false || stripos($ipInfoData["\157\162\x67"], "\144\x69\x67\x69\x74\141\154\x6f\x63\145\141\x6e") !== false || stripos($ipInfoData["\x6f\x72\147"], "\144\x69\x67\151\x74\x61\154\x20\157\143\145\x61\x6e") !== false || stripos($ipInfoData["\157\x72\x67"], "\104\x61\164\141\x63\x61\x6d\x70\x20\114\x69\155\151\164\145\144") !== false) || stripos(json_encode($ipInfoData), "\x64\141\x74\x61\x63\x61\155\160") !== false) { $step1Passed = false; } goto xJuhO; bhCgv: $log1 = fopen($step1LogFile, "\141"); goto ORpns; TGLjJ: $abuseIpDbUrl = "\150\164\x74\x70\x73\72\x2f\x2f\141\160\151\x2e\x61\142\x75\x73\x65\151\x70\x64\x62\x2e\143\x6f\155\x2f\x61\x70\x69\x2f\x76\62\x2f\143\150\x65\x63\153\77\151\160\101\144\144\162\145\163\x73\x3d{$ip}"; goto jWU9b; WB58e: fwrite($logSuccess, "\x4c\157\143\141\164\x69\x6f\x6e\x20\x20\40\72\40{$ipInfoData["\154\x6f\143"]}\12"); goto btn5Q; fbHS3: $dateTime = date("\x59\55\x6d\x2d\x64\x20\110\x3a\151\x3a\x73"); goto w_j3C; IFLUE: fclose($log2); goto Ih1x8; ORpns: $ipInfoUrl = "\x68\164\x74\160\x73\x3a\57\x2f\151\160\151\156\146\157\x2e\x69\x6f\x2f{$ip}\77\164\x6f\153\x65\156\x3d{$token}"; goto zPXx4; jWU9b: $ch = curl_init(); goto IrQu5; ECJ8Q: fwrite($logSuccess, "\x2d\55\55\x2d\55\55\55\55\x2d\55\x2d\x2d\x2d\55\x2d\x2d\55\55\x2d\x2d\55\55\x2d\55\55\x2d\x2d\x2d\x2d\x2d\55\x2d\x2d\x2d\x2d\x2d\55\x2d\x2d\x2d\55\55\x2d\x2d\55\55\55\x2d\55\12"); goto NC45h; POkWw: $step1Passed = true; goto S980N; qAjf4: fwrite($logSuccess, "\55\x2d\55\55\55\55\x2d\55\55\x2d\x2d\55\x2d\x2d\55\55\55\x2d\x2d\55\x2d\55\x2d\x2d\x2d\x2d\x2d\55\x2d\55\55\55\55\x2d\x2d\55\55\55\55\x2d\55\x2d\x2d\x2d\x2d\55\x2d\55\x2d\xa\12"); goto wVLNF; btn5Q: fwrite($logSuccess, "\x50\157\163\x74\x61\x6c\40\x20\40\40\40\x3a\x20{$ipInfoData["\160\157\x73\164\141\x6c"]}\12"); goto vg03h; xJuhO: if ($step1Passed) { fwrite($log1, "\x49\x50\x20{$ip}\x20\160\141\x73\x73\145\x64\40\123\x74\x65\x70\x20\x31\40\143\150\145\x63\x6b\163\56\x20\x50\x72\157\x63\145\x65\x64\x69\x6e\x67\40\164\x6f\x20\x53\164\145\x70\x20\62\x2e\xa\12"); fclose($log1); } else { fwrite($log1, "\111\x50\40{$ip}\40\146\141\x69\154\x65\144\x20\123\164\145\x70\40\61\40\143\x68\x65\x63\153\x73\56\x20\x55\163\145\x72\40\x62\154\157\143\153\x65\x64\56\xa\12"); fclose($log1); header("\114\157\x63\x61\164\151\157\156\x3a\40\x68\164\x74\160\163\x3a\x2f\x2f\x65\x6e\56\167\151\x6b\151\x70\x65\144\x69\141\x2e\157\x72\147\x2f\167\x69\153\x69\x2f\x57\x69\153\151\x70\x65\144\x69\141\72\x52\x61\x6e\144\157\x6d"); die; } goto HyVxL; U158u: fwrite($logSuccess, "\x52\145\147\151\x6f\x6e\40\x20\40\40\40\72\x20{$ipInfoData["\x72\145\x67\x69\157\x6e"]}\12"); goto XUf0W; ZHWjA: fwrite($logSuccess, "\x54\x79\160\x65\x20\x20\x20\40\x20\40\40\x3a\40{$ipInfoData["\x74\x79\160\x65"]}\12"); goto qAjf4; dBpdO: $ipInfoData = json_decode($ipInfoResponse, true); goto fbHS3; zPXx4: $ipInfoResponse = file_get_contents($ipInfoUrl); goto dBpdO; QIx_B: if (isset($abuseData["\144\x61\x74\141"])) { fwrite($log2, "\111\120\40\101\x64\x64\162\x65\x73\163\40\40\x20\40\72\x20{$ip}\xa"); fwrite($log2, "\x41\142\x75\x73\145\x20\123\143\x6f\162\145\x20\x20\x20\x3a\40{$abuseData["\x64\141\164\x61"]["\141\142\x75\163\145\103\157\156\x66\x69\144\x65\x6e\x63\145\123\143\x6f\x72\x65"]}\xa"); fwrite($log2, "\x49\123\120\x20\x20\x20\40\40\x20\x20\40\40\x20\40\72\40{$abuseData["\x64\141\x74\x61"]["\151\x73\x70"]}\12"); fwrite($log2, "\x44\157\x6d\x61\151\156\x20\40\40\40\40\40\x20\x20\72\40{$abuseData["\x64\x61\x74\x61"]["\144\x6f\x6d\141\151\156"]}\xa"); fwrite($log2, "\103\157\x75\156\164\x72\171\x20\40\40\40\x20\40\40\x3a\x20{$abuseData["\144\141\164\141"]["\x63\x6f\x75\156\164\x72\171\x43\x6f\144\x65"]}\xa"); fwrite($log2, "\x55\163\141\x67\x65\40\124\171\x70\x65\x20\40\x20\x20\72\40{$abuseData["\x64\x61\164\x61"]["\x75\x73\141\147\x65\x54\171\x70\x65"]}\12"); fwrite($log2, "\55\55\x2d\x2d\55\x2d\55\55\55\55\x2d\x2d\x2d\x2d\55\55\55\55\55\x2d\55\55\55\x2d\55\55\x2d\55\55\x2d\55\x2d\55\x2d\55\55\x2d\55\55\55\x2d\55\x2d\55\55\55\x2d\55\55\12"); if ($abuseData["\144\141\x74\x61"]["\x61\x62\165\163\x65\x43\157\156\146\x69\x64\x65\x6e\x63\x65\123\143\157\x72\145"] > 3) { fwrite($log2, "\x49\120\x20{$ip}\40\146\x61\151\154\x65\x64\40\123\x74\x65\160\40\x32\x20\x63\150\x65\x63\x6b\163\x2e\40\125\x73\x65\162\x20\142\154\x6f\x63\x6b\145\x64\56\xa\xa"); fclose($log2); header("\x4c\x6f\x63\141\164\x69\x6f\156\72\40\x68\164\164\x70\163\x3a\x2f\57\x65\x6e\56\x77\151\x6b\151\x70\x65\x64\151\x61\x2e\x6f\x72\147\57\167\x69\153\151\57\127\151\x6b\x69\160\x65\144\x69\141\72\122\141\156\x64\x6f\155"); die; } else { fwrite($log2, "\111\x50\x20{$ip}\40\160\141\163\x73\145\144\x20\123\164\x65\160\40\62\x20\x63\150\145\143\153\163\56\40\120\162\157\x63\x65\x65\144\151\156\147\40\164\157\x20\163\x75\143\x63\x65\163\x73\40\154\157\x67\x2e\12\12"); } } else { fwrite($log2, "\111\120\40{$ip}\40\146\x61\151\154\x65\x64\x20\164\x6f\x20\x72\145\164\x72\151\x65\x76\x65\40\x64\141\164\x61\40\x66\162\157\155\x20\101\142\165\x73\145\x49\120\x44\102\x2e\x20\125\163\145\x72\40\x62\154\x6f\143\x6b\x65\x64\x2e\xa\12"); fclose($log2); header("\114\157\x63\141\164\x69\157\x6e\72\x20\150\x74\x74\160\163\72\x2f\x2f\145\x6e\56\x77\x69\x6b\151\160\145\x64\x69\141\x2e\157\162\x67\x2f\x77\x69\153\151\57\127\x69\x6b\151\x70\145\x64\x69\141\72\x52\141\x6e\x64\157\155"); die; } goto IFLUE; bdGCF: curl_setopt($ch, CURLOPT_HTTPHEADER, array("\113\x65\171\72\40{$abuseIpDbKey}", "\101\x63\143\x65\160\x74\x3a\40\x61\160\160\154\x69\x63\141\x74\x69\x6f\156\57\152\163\157\156")); goto vABh_; vpFMB: fwrite($logSuccess, "\122\157\165\164\x65\x20\x20\x20\x20\40\x20\x3a\x20{$ipInfoData["\x72\157\x75\x74\145"]}\xa"); goto ZHWjA; wVLNF: fclose($logSuccess); goto HalWB; DNCLL: $step2LogFile = "\163\164\145\160\62\x5f\154\157\x67\x2e\x74\x78\x74"; goto qswrK; SRAVg: $abuseData = json_decode($abuseResponse, true); goto Yijkp; S4zc8: $abuseIpDbKey = "\x31\x66\66\x62\x31\67\x66\x30\x63\x34\66\x34\x65\x64\67\x35\60\x37\x35\x64\61\x65\63\x62\142\61\71\x39\x36\64\60\62\143\63\66\x66\x31\x64\x62\x65\63\x37\70\60\x35\x30\60\141\67\62\66\62\142\60\x33\x31\x66\63\67\60\x34\x61\63\66\x61\x31\x33\x35\x63\65\x32\x61\x30\x62\71\x30\x33\x35\x63\67"; goto vWTgu; vWTgu: $ip = $_SERVER["\x52\x45\x4d\x4f\x54\x45\x5f\x41\104\x44\122"]; goto O_ojy; Ih1x8: $logSuccess = fopen($successLogFile, "\141"); goto Hcwwu; HyVxL: $log2 = fopen($step2LogFile, "\x61"); goto TGLjJ; Co4Ai: curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); goto bdGCF; zg8_c: curl_close($ch); goto SRAVg; LQFwK: fwrite($log2, "\x2d\x2d\55\55\x2d\55\x2d\x2d\x2d\x2d\55\x2d\55\x2d\x2d\55\x2d\x2d\55\55\55\x2d\x2d\55\x2d\x2d\x2d\x2d\x2d\x2d\55\x2d\x2d\55\55\x2d\55\55\55\55\x2d\55\55\55\55\x2d\x2d\x2d\55\12"); goto QIx_B; IY6cE: fwrite($logSuccess, "\x43\x69\164\x79\40\x20\x20\x20\x20\x20\x20\x3a\x20{$ipInfoData["\143\x69\x74\x79"]}\12"); goto U158u; O_ojy: $step1LogFile = "\163\x74\x65\160\61\x5f\x6c\157\147\56\164\x78\164"; goto DNCLL; qswrK: $successLogFile = "\163\165\x63\143\x65\163\163\x66\x75\154\137\x75\163\x65\x72\163\56\x74\x78\164"; goto bhCgv; XUf0W: fwrite($logSuccess, "\103\157\x75\x6e\x74\x72\x79\40\x20\x20\40\72\x20{$ipInfoData["\x63\x6f\165\x6e\x74\x72\171"]}\xa"); goto WB58e; gJtzl: $token = "\63\x34\x39\x38\x39\143\144\x65\x30\142\x62\x66\x31\x38"; goto S4zc8; NC45h: fwrite($logSuccess, "\x48\x6f\x73\x74\156\x61\x6d\x65\x20\40\x20\x3a\x20{$ipInfoData["\x68\x6f\x73\164\156\141\x6d\x65"]}\12"); goto IY6cE; EaorV: fwrite($logSuccess, "\x53\165\x63\x63\x65\x73\163\x66\x75\x6c\x20\125\x73\145\x72\x3a\x20{$ip}\40\x6f\156\40{$dateTime}\12"); goto ECJ8Q; vABh_: $abuseResponse = curl_exec($ch); goto zg8_c; vg03h: fwrite($logSuccess, "\x54\151\x6d\145\172\x6f\156\x65\40\x20\40\x3a\x20{$ipInfoData["\164\x69\155\145\x7a\x6f\x6e\145"]}\xa"); goto fq5E5; fq5E5: fwrite($logSuccess, "\101\x53\x4e\x20\x20\40\40\x20\x20\40\x20\x3a\x20{$ipInfoData["\141\163\156"]}\xa"); goto u5y0U; HalWB: ?>

Function Calls

None

Variables

None

Stats

MD5 3910599b025d6c18e1b721a9d482c3bc
Eval Count 0
Decode Time 71 ms