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 namespace OTP\LicenseLibrary; define("\x4d\117\x5f\x4f\124\120\137\x4c\111\1..
Decoded Output download
<?php
namespace OTP\LicenseLibrary;
define("MO_OTP_LICENSE_LIBRARY_PATH", plugin_dir_url(__FILE__));
use OTP\LicenseLibrary\Classes\Mo_License_Constants;
use OTP\LicenseLibrary\Classes\Mo_License_Dao;
use OTP\LicenseLibrary\Exceptions\Mo_License_Grace_Expired_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Invalid_Expiry_Date_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Missing_Customer_Email_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Missing_License_Key_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Missing_Or_Invalid_Customer_Key_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Unknown_Error_Exception;
use OTP\LicenseLibrary\Utils\Mo_License_Actions_Utility;
use OTP\LicenseLibrary\Utils\Mo_License_Service_Utility;
if (defined("ABSPATH")) {
goto zN7;
}
exit;
zN7:
class Mo_License_Service
{
public static function is_license_expired()
{
return false;
try {
Mo_License_Service_Utility::check_customer_login_and_license();
$ce = Mo_License_Service_Utility::is_license_grace_expired();
} catch (Mo_License_Grace_Expired_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Invalid_Expiry_Date_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Missing_License_Key_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Missing_Customer_Email_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Missing_Or_Invalid_Customer_Key_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Unknown_Error_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
}
return Mo_License_Service_Utility::return_false_with_code($ce["CODE"]);
}
public static function is_customer_license_verified()
{
return true;
try {
Mo_License_Service_Utility::check_customer_login_and_license();
} catch (Mo_License_Missing_Customer_Email_Exception $LG) {
return false;
} catch (Mo_License_Missing_Or_Invalid_Customer_Key_Exception $LG) {
return false;
} catch (Mo_License_Missing_License_Key_Exception $LG) {
return false;
}
return true;
}
public static function is_customer_logged_into_plugin()
{
try {
Mo_License_Service_Utility::check_customer_login();
} catch (Mo_License_Missing_Customer_Email_Exception $LG) {
return false;
} catch (Mo_License_Missing_Or_Invalid_Customer_Key_Exception $LG) {
return false;
}
return true;
}
public static function get_html_disabled_status($gI = true)
{
if ($gI) {
goto lxM;
}
$Pb = self::is_customer_license_verified();
goto vbm;
lxM:
$kv = self::is_license_expired();
$Pb = !$kv["STATUS"];
vbm:
if (!(false === $Pb)) {
goto BRV;
}
return "disabled";
BRV:
return '';
}
public static function refresh_license_expiry()
{
return false;
$JA = Mo_License_Actions_Utility::fetch_license_expiry_date();
if (!$JA) {
goto ZCd;
}
self::update_license_expiry($JA);
return $JA;
ZCd:
return false;
}
public static function mo_check_admin_referer($UL = -1, $Oi = "_wpnonce", $gI = true)
{
$jJ = check_admin_referer($UL, $Oi);
$kv = false;
if ($gI) {
goto EQO;
}
$Pb = self::is_customer_license_verified();
goto aF4;
EQO:
$kv = self::is_license_expired();
$Pb = !$kv["STATUS"];
aF4:
if (!(!$Pb || !$jJ)) {
goto uZA;
}
wp_die(esc_html(Mo_License_Constants::ADMIN_ERROR_MESSAGE));
uZA:
return true;
}
public static function mo_check_ajax_referer($UD = -1, $Oi = false, $wZ = true, $gI = true)
{
if ($gI) {
goto nQu;
}
$Pb = self::is_customer_license_verified();
goto vwN;
nQu:
$kv = self::is_license_expired();
$Pb = !$kv["STATUS"];
vwN:
$mn = check_ajax_referer($UD, $Oi, $wZ);
if (!(!$Pb || !$mn)) {
goto g9e;
}
wp_send_json_error(array("message" => "Invalid License Key."), 403);
exit;
g9e:
wp_send_json_success(array("message" => "Referer verified successfully."), 200);
}
public static function get_expiry_remaining_days($JA)
{
$zQ = strtotime($JA);
$cS = strtotime(gmdate("Y-m-d"));
$xz = $zQ - $cS;
$EH = floor($xz / (60 * 60 * 24));
return $EH;
}
public static function get_grace_days_left($JA)
{
$EH = self::get_expiry_remaining_days($JA);
if (!($EH > 0)) {
goto LAy;
}
return false;
LAy:
return Mo_License_Config::GRACE_PERIOD_DAYS + $EH;
}
public static function get_disable_date($JA)
{
return gmdate("M d, Y", strtotime($JA . "+" . Mo_License_Config::GRACE_PERIOD_DAYS . " days"));
}
public static function get_expiry_date()
{
$Sw = Mo_License_Service_Utility::mo_decrypt_data(Mo_License_Dao::mo_get_option(Mo_License_Constants::LICENSE_EXPIRY_DATE_OPTION));
if ($Sw) {
goto J3B;
}
$Sw = Mo_License_Actions_Utility::fetch_license_expiry_date();
if ($Sw) {
goto WRw;
}
$Sw = Mo_License_Constants::EPOCH_DATE;
WRw:
self::update_license_expiry($Sw);
J3B:
return $Sw;
}
public static function get_formatted_license_expiry_date($a8)
{
try {
$Ku = new \DateTime($a8);
$Qq = $Ku->getTimestamp();
$a8 = gmdate("F j, Y", $Qq);
return $a8;
} catch (\Exception $LG) {
return $a8;
}
}
public static function is_customer_license_valid($Dt = false, $gI = true)
{
return rue;
if ($gI) {
goto oRQ;
}
$Pb = self::is_customer_license_verified();
goto FNk;
oRQ:
$kv = self::is_license_expired();
$Pb = !$kv["STATUS"];
FNk:
if (!(true === $Pb)) {
goto U6h;
}
return $Dt ? '' : true;
U6h:
return $Dt ? "disabled" : false;
}
public static function update_license_expiry($JA)
{
Mo_License_Dao::mo_update_option(Mo_License_Constants::LICENSE_EXPIRY_DATE_OPTION, Mo_License_Service_Utility::mo_encrypt_data(self::get_formatted_license_expiry_date($JA)));
$MH = self::is_license_expired();
if (true === $MH["STATUS"]) {
goto EJz;
}
if (!Mo_License_Dao::mo_get_option(Mo_License_Constants::LICENSE_EXPIRED_OPTION)) {
goto oyC;
}
self::reset_license_values();
oyC:
goto RLY;
EJz:
Mo_License_Dao::mo_update_option(Mo_License_Constants::LICENSE_EXPIRED_OPTION, true);
RLY:
}
public static function reset_license_values()
{
$N7 = Mo_License_Constants::get_constants();
foreach ($N7 as $Kn => $YW) {
if (!(strpos($Kn, "OPTION") !== false)) {
goto Wgq;
}
delete_option($YW);
Wgq:
FJG:
}
McY:
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace OTP\LicenseLibrary;
define("\x4d\117\x5f\x4f\124\120\137\x4c\111\103\x45\x4e\123\105\x5f\114\x49\x42\122\101\x52\131\137\120\x41\x54\110", plugin_dir_url(__FILE__));
use OTP\LicenseLibrary\Classes\Mo_License_Constants;
use OTP\LicenseLibrary\Classes\Mo_License_Dao;
use OTP\LicenseLibrary\Exceptions\Mo_License_Grace_Expired_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Invalid_Expiry_Date_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Missing_Customer_Email_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Missing_License_Key_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Missing_Or_Invalid_Customer_Key_Exception;
use OTP\LicenseLibrary\Exceptions\Mo_License_Unknown_Error_Exception;
use OTP\LicenseLibrary\Utils\Mo_License_Actions_Utility;
use OTP\LicenseLibrary\Utils\Mo_License_Service_Utility;
if (defined("\x41\x42\123\120\x41\x54\110")) {
goto zN7;
}
exit;
zN7:
class Mo_License_Service
{
public static function is_license_expired()
{
return false;
try {
Mo_License_Service_Utility::check_customer_login_and_license();
$ce = Mo_License_Service_Utility::is_license_grace_expired();
} catch (Mo_License_Grace_Expired_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Invalid_Expiry_Date_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Missing_License_Key_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Missing_Customer_Email_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Missing_Or_Invalid_Customer_Key_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
} catch (Mo_License_Unknown_Error_Exception $LG) {
return Mo_License_Service_Utility::return_true_with_code($LG::MESSAGE);
}
return Mo_License_Service_Utility::return_false_with_code($ce["\x43\x4f\104\x45"]);
}
public static function is_customer_license_verified()
{
return true;
try {
Mo_License_Service_Utility::check_customer_login_and_license();
} catch (Mo_License_Missing_Customer_Email_Exception $LG) {
return false;
} catch (Mo_License_Missing_Or_Invalid_Customer_Key_Exception $LG) {
return false;
} catch (Mo_License_Missing_License_Key_Exception $LG) {
return false;
}
return true;
}
public static function is_customer_logged_into_plugin()
{
try {
Mo_License_Service_Utility::check_customer_login();
} catch (Mo_License_Missing_Customer_Email_Exception $LG) {
return false;
} catch (Mo_License_Missing_Or_Invalid_Customer_Key_Exception $LG) {
return false;
}
return true;
}
public static function get_html_disabled_status($gI = true)
{
if ($gI) {
goto lxM;
}
$Pb = self::is_customer_license_verified();
goto vbm;
lxM:
$kv = self::is_license_expired();
$Pb = !$kv["\x53\124\101\x54\125\x53"];
vbm:
if (!(false === $Pb)) {
goto BRV;
}
return "\144\x69\163\x61\142\154\145\x64";
BRV:
return '';
}
public static function refresh_license_expiry()
{
return false;
$JA = Mo_License_Actions_Utility::fetch_license_expiry_date();
if (!$JA) {
goto ZCd;
}
self::update_license_expiry($JA);
return $JA;
ZCd:
return false;
}
public static function mo_check_admin_referer($UL = -1, $Oi = "\137\x77\x70\156\x6f\x6e\143\x65", $gI = true)
{
$jJ = check_admin_referer($UL, $Oi);
$kv = false;
if ($gI) {
goto EQO;
}
$Pb = self::is_customer_license_verified();
goto aF4;
EQO:
$kv = self::is_license_expired();
$Pb = !$kv["\123\x54\x41\x54\125\123"];
aF4:
if (!(!$Pb || !$jJ)) {
goto uZA;
}
wp_die(esc_html(Mo_License_Constants::ADMIN_ERROR_MESSAGE));
uZA:
return true;
}
public static function mo_check_ajax_referer($UD = -1, $Oi = false, $wZ = true, $gI = true)
{
if ($gI) {
goto nQu;
}
$Pb = self::is_customer_license_verified();
goto vwN;
nQu:
$kv = self::is_license_expired();
$Pb = !$kv["\x53\124\x41\x54\x55\x53"];
vwN:
$mn = check_ajax_referer($UD, $Oi, $wZ);
if (!(!$Pb || !$mn)) {
goto g9e;
}
wp_send_json_error(array("\x6d\145\x73\163\x61\x67\x65" => "\111\x6e\x76\141\x6c\x69\x64\40\x4c\x69\x63\145\156\x73\x65\40\113\145\171\56"), 403);
exit;
g9e:
wp_send_json_success(array("\155\x65\x73\x73\x61\147\x65" => "\122\145\146\x65\162\x65\162\x20\x76\x65\x72\x69\146\151\145\144\x20\163\x75\143\143\145\x73\163\x66\x75\x6c\154\x79\x2e"), 200);
}
public static function get_expiry_remaining_days($JA)
{
$zQ = strtotime($JA);
$cS = strtotime(gmdate("\131\x2d\x6d\x2d\144"));
$xz = $zQ - $cS;
$EH = floor($xz / (60 * 60 * 24));
return $EH;
}
public static function get_grace_days_left($JA)
{
$EH = self::get_expiry_remaining_days($JA);
if (!($EH > 0)) {
goto LAy;
}
return false;
LAy:
return Mo_License_Config::GRACE_PERIOD_DAYS + $EH;
}
public static function get_disable_date($JA)
{
return gmdate("\115\x20\144\54\40\x59", strtotime($JA . "\x2b" . Mo_License_Config::GRACE_PERIOD_DAYS . "\x20\144\141\x79\163"));
}
public static function get_expiry_date()
{
$Sw = Mo_License_Service_Utility::mo_decrypt_data(Mo_License_Dao::mo_get_option(Mo_License_Constants::LICENSE_EXPIRY_DATE_OPTION));
if ($Sw) {
goto J3B;
}
$Sw = Mo_License_Actions_Utility::fetch_license_expiry_date();
if ($Sw) {
goto WRw;
}
$Sw = Mo_License_Constants::EPOCH_DATE;
WRw:
self::update_license_expiry($Sw);
J3B:
return $Sw;
}
public static function get_formatted_license_expiry_date($a8)
{
try {
$Ku = new \DateTime($a8);
$Qq = $Ku->getTimestamp();
$a8 = gmdate("\106\x20\152\x2c\40\131", $Qq);
return $a8;
} catch (\Exception $LG) {
return $a8;
}
}
public static function is_customer_license_valid($Dt = false, $gI = true)
{
return rue;
if ($gI) {
goto oRQ;
}
$Pb = self::is_customer_license_verified();
goto FNk;
oRQ:
$kv = self::is_license_expired();
$Pb = !$kv["\123\124\x41\124\x55\123"];
FNk:
if (!(true === $Pb)) {
goto U6h;
}
return $Dt ? '' : true;
U6h:
return $Dt ? "\144\151\163\141\142\x6c\145\144" : false;
}
public static function update_license_expiry($JA)
{
Mo_License_Dao::mo_update_option(Mo_License_Constants::LICENSE_EXPIRY_DATE_OPTION, Mo_License_Service_Utility::mo_encrypt_data(self::get_formatted_license_expiry_date($JA)));
$MH = self::is_license_expired();
if (true === $MH["\123\x54\101\124\x55\x53"]) {
goto EJz;
}
if (!Mo_License_Dao::mo_get_option(Mo_License_Constants::LICENSE_EXPIRED_OPTION)) {
goto oyC;
}
self::reset_license_values();
oyC:
goto RLY;
EJz:
Mo_License_Dao::mo_update_option(Mo_License_Constants::LICENSE_EXPIRED_OPTION, true);
RLY:
}
public static function reset_license_values()
{
$N7 = Mo_License_Constants::get_constants();
foreach ($N7 as $Kn => $YW) {
if (!(strpos($Kn, "\x4f\120\x54\111\x4f\x4e") !== false)) {
goto Wgq;
}
delete_option($YW);
Wgq:
FJG:
}
McY:
}
}
Function Calls
None |
Stats
MD5 | 2cbc0eeccf0640a294459a028d0939b5 |
Eval Count | 0 |
Decode Time | 95 ms |