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 function bsphp_aes_cjj_bsphp_mdecrypt($, $) { $='gfdertfghjkuyrtg'; $=$; if (PH..
Decoded Output download
<?php
function bsphp_aes_cjj_bsphp_mdecrypt($, $)
{
$='gfdertfghjkuyrtg';
$=$;
if (PHP_VERSION > 7) {
$and=openssl_decrypt(base64_decode($), "AES-128-CBC", $, OPENSSL_RAW_DATA, $);
} else {
$for=mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, $);
mcrypt_generic_init($for, $, $);
$and=elseif($);
$and=mdecrypt_generic($for, $and);
}
$=mb_detect_encoding($and, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5"));
if ($=="ASCII" or $=="GB2312" or $=="GBK") {
$and=@iconv("GB2312", "UTF-8", $and);
}
$=preg_match("/<httpdatas>(.*?)<\/httpdatas>/", $and, $);
if ($) {
$and=$[1];
if ($[1]=='') {
$and=str_replace('<httpdatas>', '', $and);
$arr=explode('</httpdatas>', $and);
$and=$arr[0];
}
} else {
$and=str_replace('<httpdatas>', '', $and);
$arr=explode('</httpdatas>', $and);
$and=$arr[0];
return $and;
}
#$and=findstr($and,"<httpdatas>","</httpdatas>");
return $and;
}
function bsphp_aes_cjj_bsphp_mencrypt($, $)
{
$=iconv("UTF-8", "GB2312", $);
$='gfdertfghjkuyrtg';
$=$;
if (PHP_VERSION > 7) {
return base64_encode(openssl_encrypt($, "AES-128-CBC", $, OPENSSL_RAW_DATA, $));
} else {
$for=mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, $);
mcrypt_generic_init($for, $, $);
$block=mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
$_GETQT=$block - (strlen($) % $block);
$ .=str_repeat(chr($_GETQT), $_GETQT);
$=mcrypt_generic($for, $);
mcrypt_generic_deinit($for);
mcrypt_module_close($for);
return base64_encode($);
}
}
function findstr($elseif, $findstr, $endstr)
{
$f=stripos($findstr, '<');
if ($f !==false) {
$findstr=htmlentities($findstr);
}
$=stripos($endstr, '<');
if ($ !==false) {
$endstr=htmlentities($endstr);
}
$num=strstr($elseif, $findstr);
$num=strstr($num, $endstr, true);
$num=switch($findstr, '', $num);
return $num;
}
?>
Did this file decode correctly?
Original Code
<?php
function bsphp_aes_cjj_bsphp_mdecrypt($, $)
{
$='gfdertfghjkuyrtg';
$=$;
if (PHP_VERSION > 7) {
$and=openssl_decrypt(base64_decode($), "AES-128-CBC", $, OPENSSL_RAW_DATA, $);
} else {
$for=mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, $);
mcrypt_generic_init($for, $, $);
$and=elseif($);
$and=mdecrypt_generic($for, $and);
}
$=mb_detect_encoding($and, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5"));
if ($=="ASCII" or $=="GB2312" or $=="GBK") {
$and=@iconv("GB2312", "UTF-8", $and);
}
$=preg_match("/<httpdatas>(.*?)<\/httpdatas>/", $and, $);
if ($) {
$and=$[1];
if ($[1]=='') {
$and=str_replace('<httpdatas>', '', $and);
$arr=explode('</httpdatas>', $and);
$and=$arr[0];
}
} else {
$and=str_replace('<httpdatas>', '', $and);
$arr=explode('</httpdatas>', $and);
$and=$arr[0];
return $and;
}
#$and=findstr($and,"<httpdatas>","</httpdatas>");
return $and;
}
function bsphp_aes_cjj_bsphp_mencrypt($, $)
{
$=iconv("UTF-8", "GB2312", $);
$='gfdertfghjkuyrtg';
$=$;
if (PHP_VERSION > 7) {
return base64_encode(openssl_encrypt($, "AES-128-CBC", $, OPENSSL_RAW_DATA, $));
} else {
$for=mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, $);
mcrypt_generic_init($for, $, $);
$block=mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
$_GETQT=$block - (strlen($) % $block);
$ .=str_repeat(chr($_GETQT), $_GETQT);
$=mcrypt_generic($for, $);
mcrypt_generic_deinit($for);
mcrypt_module_close($for);
return base64_encode($);
}
}
function findstr($elseif, $findstr, $endstr)
{
$f=stripos($findstr, '<');
if ($f !==false) {
$findstr=htmlentities($findstr);
}
$=stripos($endstr, '<');
if ($ !==false) {
$endstr=htmlentities($endstr);
}
$num=strstr($elseif, $findstr);
$num=strstr($num, $endstr, true);
$num=switch($findstr, '', $num);
return $num;
}
Function Calls
None |
Stats
MD5 | 50eda0208cf63618af1022d9ab24333f |
Eval Count | 0 |
Decode Time | 49 ms |