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 class Mo_Directory_Sync_Utility { public static function is_extension_ins..
Decoded Output download
<?php
class Mo_Directory_Sync_Utility
{
public static function is_extension_installed($mF)
{
if (in_array($mF, get_loaded_extensions())) {
goto fN;
}
return false;
goto TE;
fN:
return true;
TE:
}
public static function is_curl_installed()
{
if (in_array("curl", get_loaded_extensions())) {
goto co;
}
return 0;
goto GB;
co:
return 1;
GB:
}
public static function check_empty_or_null($J5)
{
if (!(!isset($J5) || empty($J5))) {
goto jm;
}
return true;
jm:
return false;
}
public static function decrypt($J5)
{
if (Mo_Directory_Sync_Utility::is_extension_installed("openssl")) {
goto GW;
}
return;
GW:
$Nj = get_option("mo_ldap_local_customer_token");
$Ao = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $Nj, base64_decode($J5), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND)), "\x0");
return trim($Ao, "\0..\32");
}
public static function get_hashed_password($PY, $OO)
{
if ($OO == "ssha") {
goto V5;
}
if ($OO == "md5") {
goto b6;
}
return $PY;
goto Wq;
b6:
return self::hash_md5($PY);
Wq:
goto bY;
V5:
return self::hash_ssha($PY);
bY:
}
public function hash_ssha($PY)
{
$Kn = sha1(rand());
$Kn = substr($Kn, 0, 4);
$UA = base64_encode(sha1($PY . $Kn, true) . $Kn);
return "{SSHA}" . $UA;
}
public function hash_md5($PY)
{
$Tw = "{MD5}" . base64_encode(pack("H*", md5($PY)));
return $Tw;
}
}
?>
Did this file decode correctly?
Original Code
<?php
class Mo_Directory_Sync_Utility
{
public static function is_extension_installed($mF)
{
if (in_array($mF, get_loaded_extensions())) {
goto fN;
}
return false;
goto TE;
fN:
return true;
TE:
}
public static function is_curl_installed()
{
if (in_array("\143\x75\x72\x6c", get_loaded_extensions())) {
goto co;
}
return 0;
goto GB;
co:
return 1;
GB:
}
public static function check_empty_or_null($J5)
{
if (!(!isset($J5) || empty($J5))) {
goto jm;
}
return true;
jm:
return false;
}
public static function decrypt($J5)
{
if (Mo_Directory_Sync_Utility::is_extension_installed("\x6f\x70\145\x6e\x73\163\x6c")) {
goto GW;
}
return;
GW:
$Nj = get_option("\155\x6f\x5f\x6c\144\141\160\x5f\154\x6f\x63\x61\154\x5f\143\x75\163\164\157\x6d\145\x72\137\164\x6f\153\145\x6e");
$Ao = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $Nj, base64_decode($J5), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND)), "\x0");
return trim($Ao, "\0\x2e\x2e\32");
}
public static function get_hashed_password($PY, $OO)
{
if ($OO == "\x73\163\150\x61") {
goto V5;
}
if ($OO == "\x6d\x64\x35") {
goto b6;
}
return $PY;
goto Wq;
b6:
return self::hash_md5($PY);
Wq:
goto bY;
V5:
return self::hash_ssha($PY);
bY:
}
public function hash_ssha($PY)
{
$Kn = sha1(rand());
$Kn = substr($Kn, 0, 4);
$UA = base64_encode(sha1($PY . $Kn, true) . $Kn);
return "\173\x53\x53\x48\101\x7d" . $UA;
}
public function hash_md5($PY)
{
$Tw = "\173\115\104\x35\x7d" . base64_encode(pack("\x48\x2a", md5($PY)));
return $Tw;
}
}
Function Calls
None |
Stats
MD5 | c7e878f13a515533d531901b901f7def |
Eval Count | 0 |
Decode Time | 83 ms |