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 gotoJRu84;JRu84:header("\x41\143\x63\145\163\x73\55\x43\157\156\164\162\x6f\154\x2d..
Decoded Output download
<?php
gotoJRu84;JRu84:header("Access-Control-Allow-Headers: *");gotoJAqwg;Ck1Oj:switch($_SERVER["REQUEST_METHOD"]){case"GET":$data=empty($data)?$_GET:$data;break;case"POST":$data=empty($data)?$_POST:$data;break;case"PUT":$data=empty($data)?$_PUT:$data;break;case"DELETE":$data=empty($data)?$_REQUEST:$data;break;default:}gotoejuUf;ejuUf:if(!empty($data)){if(isset($data["host"])){$url=$data["host"];}$url=empty($url)?$_REQUEST["host"]:$url;if(isset($data["dataType"])){$dataType=$data["dataType"];}$dataType=empty($dataType)?$_REQUEST["dataType"]:$dataType;$host=$url;unset($data["host"]);$data_string='';if($dataType!="json"){foreach($dataas$key=>$value){$data_string.=$key."=".urlencode($value)."&";}}$data_string=rtrim($data_string,"&");$headers=getallheaders();$request_headers=array();if($dataType=="json"){array_push($request_headers,"Content-Type:application/json");array_push($request_headers,"Accept:application/json");}$hasAuthorizationHeader=!empty($headers[$authorizationToken]);if($hasAuthorizationHeader){array_push($request_headers,"{$authorizationToken}:".$headers[$authorizationToken]);}$hasPostmarkToken=!empty($headers[$postmarkToken]);if($hasPostmarkToken){array_push($request_headers,"{$postmarkToken}:".$headers[$postmarkToken]);}$hasGetResponseToken=!empty($headers[$getResponseToken]);if($hasGetResponseToken){array_push($request_headers,"{$getResponseToken}:".$headers[$getResponseToken]);}$connection=curl_init();curl_setopt($connection,CURLOPT_RETURNTRANSFER,1);if(!empty($request_headers)){curl_setopt($connection,CURLOPT_HTTPHEADER,$request_headers);}switch($_SERVER["REQUEST_METHOD"]){case"GET":$query_string=http_build_query($data);$url.=!empty($query_string)?"?".$query_string:'';curl_setopt($connection,CURLOPT_CUSTOMREQUEST,"GET");break;case"POST":curl_setopt($connection,CURLOPT_POST,count($data));if($dataType=="json"){curl_setopt($connection,CURLOPT_POSTFIELDS,$json);}else{curl_setopt($connection,CURLOPT_POSTFIELDS,$data_string);}break;case"DELETE":curl_setopt($connection,CURLOPT_CUSTOMREQUEST,"DELETE");if($dataType=="json"){curl_setopt($connection,CURLOPT_POSTFIELDS,$json);}else{curl_setopt($connection,CURLOPT_POSTFIELDS,$data_string);}break;}curl_setopt($connection,CURLOPT_URL,$url);$result=curl_exec($connection);curl_close($connection);echo$result;}else{echo$data."no data was submitted to proxy.";}gotoQpI1M;JL6aG:$getResponseToken="X-Auth-Token";gotoJ2b_m;hZfUp:if(empty($data)){parse_str($json,$data);}gotoCk1Oj;younb:$authorizationToken="Authorization";gotocq5_B;J2b_m:$json=file_get_contents("php://input");gotoc1g5J;WrUD4:$data=json_decode($htmlDecode,true);gotohZfUp;JAqwg:header("Access-Control-Allow-Origin: *");gotoE_qWS;E_qWS:header("Access-Control-Allow-Credentials: true");gotoyounb;cq5_B:$postmarkToken="X-Postmark-Server-Token";gotoJL6aG;c1g5J:$htmlDecode=html_entity_decode($json);gotoWrUD4;QpI1M:?>
Did this file decode correctly?
Original Code
<?php
gotoJRu84;JRu84:header("\x41\143\x63\145\163\x73\55\x43\157\156\164\162\x6f\154\x2d\101\x6c\154\x6f\x77\55\x48\145\x61\x64\x65\162\163\x3a\40\52");gotoJAqwg;Ck1Oj:switch($_SERVER["\x52\x45\x51\x55\x45\123\x54\x5f\115\x45\x54\x48\117\x44"]){case"\x47\x45\x54":$data=empty($data)?$_GET:$data;break;case"\120\x4f\x53\x54":$data=empty($data)?$_POST:$data;break;case"\x50\125\x54":$data=empty($data)?$_PUT:$data;break;case"\104\x45\114\105\x54\x45":$data=empty($data)?$_REQUEST:$data;break;default:}gotoejuUf;ejuUf:if(!empty($data)){if(isset($data["\x68\x6f\x73\x74"])){$url=$data["\150\157\x73\164"];}$url=empty($url)?$_REQUEST["\x68\157\163\x74"]:$url;if(isset($data["\x64\x61\164\141\124\x79\x70\x65"])){$dataType=$data["\144\x61\164\x61\124\x79\x70\145"];}$dataType=empty($dataType)?$_REQUEST["\144\141\x74\141\124\x79\160\x65"]:$dataType;$host=$url;unset($data["\x68\x6f\x73\164"]);$data_string='';if($dataType!="\x6a\x73\157\x6e"){foreach($dataas$key=>$value){$data_string.=$key."\75".urlencode($value)."\x26";}}$data_string=rtrim($data_string,"\46");$headers=getallheaders();$request_headers=array();if($dataType=="\x6a\x73\157\x6e"){array_push($request_headers,"\x43\x6f\x6e\x74\145\x6e\164\55\x54\x79\160\145\x3a\141\160\160\x6c\x69\143\141\164\x69\157\x6e\57\152\x73\157\156");array_push($request_headers,"\101\x63\x63\145\x70\x74\x3a\x61\160\160\x6c\151\143\x61\x74\x69\x6f\156\x2f\152\163\157\x6e");}$hasAuthorizationHeader=!empty($headers[$authorizationToken]);if($hasAuthorizationHeader){array_push($request_headers,"{$authorizationToken}\72".$headers[$authorizationToken]);}$hasPostmarkToken=!empty($headers[$postmarkToken]);if($hasPostmarkToken){array_push($request_headers,"{$postmarkToken}\x3a".$headers[$postmarkToken]);}$hasGetResponseToken=!empty($headers[$getResponseToken]);if($hasGetResponseToken){array_push($request_headers,"{$getResponseToken}\72".$headers[$getResponseToken]);}$connection=curl_init();curl_setopt($connection,CURLOPT_RETURNTRANSFER,1);if(!empty($request_headers)){curl_setopt($connection,CURLOPT_HTTPHEADER,$request_headers);}switch($_SERVER["\x52\x45\x51\125\105\123\124\x5f\115\x45\124\110\117\104"]){case"\107\x45\x54":$query_string=http_build_query($data);$url.=!empty($query_string)?"\77".$query_string:'';curl_setopt($connection,CURLOPT_CUSTOMREQUEST,"\107\105\124");break;case"\120\117\123\x54":curl_setopt($connection,CURLOPT_POST,count($data));if($dataType=="\x6a\x73\x6f\x6e"){curl_setopt($connection,CURLOPT_POSTFIELDS,$json);}else{curl_setopt($connection,CURLOPT_POSTFIELDS,$data_string);}break;case"\104\x45\114\105\124\105":curl_setopt($connection,CURLOPT_CUSTOMREQUEST,"\x44\105\114\x45\124\x45");if($dataType=="\152\x73\x6f\x6e"){curl_setopt($connection,CURLOPT_POSTFIELDS,$json);}else{curl_setopt($connection,CURLOPT_POSTFIELDS,$data_string);}break;}curl_setopt($connection,CURLOPT_URL,$url);$result=curl_exec($connection);curl_close($connection);echo$result;}else{echo$data."\156\x6f\40\x64\141\x74\x61\x20\x77\x61\163\x20\163\165\x62\155\x69\164\164\x65\144\40\x74\157\40\160\162\x6f\170\171\x2e";}gotoQpI1M;JL6aG:$getResponseToken="\x58\x2d\x41\165\x74\x68\55\124\157\x6b\x65\x6e";gotoJ2b_m;hZfUp:if(empty($data)){parse_str($json,$data);}gotoCk1Oj;younb:$authorizationToken="\x41\x75\164\150\x6f\x72\x69\172\141\x74\151\157\156";gotocq5_B;J2b_m:$json=file_get_contents("\x70\x68\x70\x3a\57\x2f\151\x6e\160\165\164");gotoc1g5J;WrUD4:$data=json_decode($htmlDecode,true);gotohZfUp;JAqwg:header("\101\143\x63\145\163\163\x2d\x43\157\156\164\x72\x6f\x6c\x2d\101\x6c\x6c\x6f\167\x2d\117\x72\x69\147\151\x6e\x3a\40\52");gotoE_qWS;E_qWS:header("\x41\x63\x63\145\x73\x73\55\x43\x6f\156\164\162\157\154\x2d\101\x6c\154\x6f\x77\55\x43\x72\145\x64\x65\x6e\x74\151\x61\154\163\72\x20\164\x72\x75\x65");gotoyounb;cq5_B:$postmarkToken="\x58\55\120\157\163\x74\155\141\162\153\55\123\145\x72\x76\x65\162\55\x54\157\x6b\x65\x6e";gotoJL6aG;c1g5J:$htmlDecode=html_entity_decode($json);gotoWrUD4;QpI1M:?>
Function Calls
None |
Stats
MD5 | 6d3ff3e06d1aada8a98dfccbb6bf1fa0 |
Eval Count | 0 |
Decode Time | 58 ms |