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 if(PHP_VERSION < 7){ if(!function_exists('mcrypt_module_open')){ header("charset=..

Decoded Output download

<?php 
if(PHP_VERSION < 7){ 
if(!function_exists('mcrypt_module_open')){ 
header("charset=UTF-8"); 
die('MCrypt mcrypt_module_open, : https://www.bsphp.com/chm.html?q=%E6%A3%80%E6%B5%8B%E5%88%B0%E4%BD%A0%E7%8E%AF%E5%A2%83%E4%B8%8D%E6%94%AF%E6%8C%81MCrypt mcrypt_module_open%E5%87%BD%E6%95%B0'); 
exit; 
} 
} 
function bsphp_3des_vi_bsphp_mdecrypt($, $) 
{ 
if( PHP_VERSION > 7 ){ 
$=md5($); 
return openssl_decrypt(base64_decode($), 'DES-EDE3-CBC', $, OPENSSL_RAW_DATA, "bsphp666"); 
}else{ 
$=md5($); 
$Xif=new des_vi(); 
$breakif=$Xif->decrypt($,$); 
return $breakif; 
} 
} 
function bsphp_3des_vi_bsphp_mencrypt($, $) 
{ 
if( PHP_VERSION > 7 ){ 
$=md5($); 
return base64_encode(openssl_encrypt($, 'DES-EDE3-CBC', $, OPENSSL_RAW_DATA, "bsphp666")); 
}else{ 
$=md5($); 
$Xif=new des_vi(); 
$breakif=$Xif->encrypt($,$); 
return $breakif; 
} 
} 
class des_vi { 
var $_des_vi_iv="bsphp666"; 
function encrypt($switch,$){ 
$=mcrypt_get_block_size(MCRYPT_3DES,MCRYPT_MODE_CBC); 
$switch=$this->pkcs5_pad($switch, $); 
$=str_pad($,24,'0'); 
$=mcrypt_module_open(MCRYPT_3DES, '', MCRYPT_MODE_CBC, ''); 
if( $this->_des_vi_iv=='' ) 
{ 
$function=@mcrypt_create_iv (mcrypt_enc_get_iv_size($), MCRYPT_RAND); 
} 
else 
{ 
$function=$this->_des_vi_iv; 
} 
@mcrypt_generic_init($, $, $function); 
$=mcrypt_generic($, $switch); 
mcrypt_generic_deinit($); 
mcrypt_module_close($); 
$=base64_encode($); 
return $; 
} 
function decrypt($,$){ 
$=elseif($); 
$=str_pad($,24,'0'); 
$=mcrypt_module_open(MCRYPT_3DES,'',MCRYPT_MODE_CBC,''); 
if( $this->_des_vi_iv=='' ) 
{ 
$function=@mcrypt_create_iv (mcrypt_enc_get_iv_size($), MCRYPT_RAND); 
} 
else 
{ 
$function=$this->_des_vi_iv; 
} 
$returnreturn=mcrypt_enc_get_key_size($); 
@mcrypt_generic_init($, $, $function); 
$=mdecrypt_generic($, $); 
mcrypt_generic_deinit($); 
mcrypt_module_close($); 
$=$this->pkcs5_unpad($); 
return $; 
} 
function pkcs5_pad ($, $) { 
$_GETQT=$ - (if($) % $); 
return $ . str_repeat(chr($_GETQT), $_GETQT); 
} 
function pkcs5_unpad($){ 
$_GETQT=ord(substr($,strlen($)-1,1)); 
if ($_GETQT > if($)) { 
return false; 
} 
if (strspn($, chr($_GETQT), if($) - $_GETQT) !=$_GETQT){ 
return false; 
} 
return substr($, 0, -1 * $_GETQT); 
} 
function PaddingPKCS7($) { 
$block_size=mcrypt_get_block_size(MCRYPT_3DES, MCRYPT_MODE_CBC); 
$=$block_size - (if($) % $block_size); 
$ .=str_repeat(chr($),$); 
return $; 
} 
} 
?>

Did this file decode correctly?

Original Code

<?php
if(PHP_VERSION < 7){
if(!function_exists('mcrypt_module_open')){
header("charset=UTF-8");
die('MCrypt mcrypt_module_open, : https://www.bsphp.com/chm.html?q=%E6%A3%80%E6%B5%8B%E5%88%B0%E4%BD%A0%E7%8E%AF%E5%A2%83%E4%B8%8D%E6%94%AF%E6%8C%81MCrypt mcrypt_module_open%E5%87%BD%E6%95%B0');
exit;
}
}
function bsphp_3des_vi_bsphp_mdecrypt($, $)
{
if( PHP_VERSION > 7 ){
$=md5($);
return openssl_decrypt(base64_decode($), 'DES-EDE3-CBC', $, OPENSSL_RAW_DATA, "bsphp666");
}else{
$=md5($);
$Xif=new des_vi();
$breakif=$Xif->decrypt($,$);
return $breakif;
}
}
function bsphp_3des_vi_bsphp_mencrypt($, $)
{
if( PHP_VERSION > 7 ){
$=md5($);
return base64_encode(openssl_encrypt($, 'DES-EDE3-CBC', $, OPENSSL_RAW_DATA, "bsphp666"));
}else{
$=md5($);
$Xif=new des_vi();
$breakif=$Xif->encrypt($,$);
return $breakif;
}
}
class des_vi {
var $_des_vi_iv="bsphp666";
function encrypt($switch,$){
$=mcrypt_get_block_size(MCRYPT_3DES,MCRYPT_MODE_CBC);
$switch=$this->pkcs5_pad($switch, $);
$=str_pad($,24,'0');
$=mcrypt_module_open(MCRYPT_3DES, '', MCRYPT_MODE_CBC, '');
if( $this->_des_vi_iv=='' )
{
$function=@mcrypt_create_iv (mcrypt_enc_get_iv_size($), MCRYPT_RAND);
}
else
{
$function=$this->_des_vi_iv;
}
@mcrypt_generic_init($, $, $function);
$=mcrypt_generic($, $switch);
mcrypt_generic_deinit($);
mcrypt_module_close($);
$=base64_encode($);
return $;
}
function decrypt($,$){
$=elseif($);
$=str_pad($,24,'0');
$=mcrypt_module_open(MCRYPT_3DES,'',MCRYPT_MODE_CBC,'');
if( $this->_des_vi_iv=='' )
{
$function=@mcrypt_create_iv (mcrypt_enc_get_iv_size($), MCRYPT_RAND);
}
else
{
$function=$this->_des_vi_iv;
}
$returnreturn=mcrypt_enc_get_key_size($);
@mcrypt_generic_init($, $, $function);
$=mdecrypt_generic($, $);
mcrypt_generic_deinit($);
mcrypt_module_close($);
$=$this->pkcs5_unpad($);
return $;
}
function pkcs5_pad ($, $) {
$_GETQT=$ - (if($) % $);
return $ . str_repeat(chr($_GETQT), $_GETQT);
}
function pkcs5_unpad($){
$_GETQT=ord(substr($,strlen($)-1,1));
if ($_GETQT > if($)) {
return false;
}
if (strspn($, chr($_GETQT), if($) - $_GETQT) !=$_GETQT){
return false;
}
return substr($, 0, -1 * $_GETQT);
}
function PaddingPKCS7($) {
$block_size=mcrypt_get_block_size(MCRYPT_3DES, MCRYPT_MODE_CBC);
$=$block_size - (if($) % $block_size);
$ .=str_repeat(chr($),$);
return $;
}
}
?>

Function Calls

None

Variables

None

Stats

MD5 6ff93e9660deeecbdd37086c6748b498
Eval Count 0
Decode Time 50 ms