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 /** * This file is a part of the miniorange-saml-20-single-sign-on plugin. * ..

Decoded Output download

<?php 
/** 
 * This file is a part of the miniorange-saml-20-single-sign-on plugin. 
 * 
 * @link https://plugins.miniorange.com/ 
 * @author miniOrange 
 * @package miniorange-saml-20-single-sign-on 
 */ 
 
 
namespace MOSAML\LicenseLibrary\Utils; 
 
use MOSAML\LicenseLibrary\Classes\Mo_AESEncryption; 
use MOSAML\LicenseLibrary\Classes\Mo_License_Dao; 
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Grace_Expired_Exception; 
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Invalid_Expiry_Date_Exception; 
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Missing_Customer_Email_Exception; 
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Missing_License_Key_Exception; 
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Missing_Or_Invalid_Customer_Key_Exception; 
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Unknown_Error_Exception; 
use MOSAML\LicenseLibrary\Classes\Mo_License_Constants; 
use MOSAML\LicenseLibrary\Mo_License_Config; 
use MOSAML\LicenseLibrary\Mo_License_Service; 
if (defined("ABSPATH")) { 
    goto JJ; 
} 
exit; 
JJ: 
class Mo_License_Service_Utility 
{ 
    public static function check_customer_login() 
    { 
        $uo = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_EMAIL_OPTION); 
        $KD = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_KEY_OPTION); 
        if (!$uo) { 
            goto Wq; 
        } 
        if (!$KD || !is_numeric(trim($KD))) { 
            goto gr; 
        } 
        goto K4; 
        Wq: 
        throw new Mo_License_Missing_Customer_Email_Exception(); 
        goto K4; 
        gr: 
        throw new Mo_License_Missing_Or_Invalid_Customer_Key_Exception(); 
        K4: 
    } 
    public static function check_customer_login_and_license() 
    { 
        self::check_customer_login(); 
        $pO = Mo_License_Dao::mo_get_option(Mo_License_Config::LICENSE_KEY_OPTION); 
        if ($pO) { 
            goto tl; 
        } 
        throw new Mo_License_Missing_License_Key_Exception(); 
        tl: 
    } 
    public static function is_license_grace_expired() 
    { 
        $FP = self::mo_decrypt_data(Mo_License_Dao::mo_get_option(Mo_License_Constants::LICENSE_EXPIRY_DATE_OPTION)); 
        if ($FP) { 
            goto Gq; 
        } 
        throw new Mo_License_Invalid_Expiry_Date_Exception(); 
        Gq: 
        try { 
            $T5 = gmdate("Y-m-d", strtotime($FP)); 
            $Iz = strtotime("+" . Mo_License_Config::GRACE_PERIOD_DAYS . " days", strtotime($FP)); 
            $q9 = gmdate("Y-m-d", $Iz); 
            $U3 = new \DateTime(); 
            $U3 = $U3->format("Y-m-d"); 
        } catch (\Exception $XJ) { 
            throw new Mo_License_Unknown_Error_Exception(); 
        } 
        if ($U3 > $q9) { 
            goto m2; 
        } 
        if ($U3 > $T5) { 
            goto on; 
        } 
        goto B7; 
        m2: 
        throw new Mo_License_Grace_Expired_Exception(); 
        goto B7; 
        on: 
        return self::return_false_with_code("LICENSE_IN_GRACE"); 
        B7: 
        return self::return_false_with_code("LICENSE_VALID"); 
    } 
    public static function return_true_with_code($UB) 
    { 
        return array("STATUS" => true, "CODE" => $UB); 
    } 
    public static function return_false_with_code($UB) 
    { 
        return array("STATUS" => false, "CODE" => $UB); 
    } 
    public static function mo_decrypt_data($jQ) 
    { 
        $ns = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_TOKEN_OPTION); 
        $ib = Mo_AESEncryption::decrypt_data($jQ, $ns); 
        return $ib; 
    } 
    public static function mo_encrypt_data($jQ) 
    { 
        $ns = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_TOKEN_OPTION); 
        $Jq = Mo_AESEncryption::encrypt_data($jQ, $ns); 
        return $Jq; 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * This file is a part of the miniorange-saml-20-single-sign-on plugin.
 *
 * @link https://plugins.miniorange.com/
 * @author miniOrange
 * @package miniorange-saml-20-single-sign-on
 */


namespace MOSAML\LicenseLibrary\Utils;

use MOSAML\LicenseLibrary\Classes\Mo_AESEncryption;
use MOSAML\LicenseLibrary\Classes\Mo_License_Dao;
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Grace_Expired_Exception;
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Invalid_Expiry_Date_Exception;
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Missing_Customer_Email_Exception;
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Missing_License_Key_Exception;
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Missing_Or_Invalid_Customer_Key_Exception;
use MOSAML\LicenseLibrary\Exceptions\Mo_License_Unknown_Error_Exception;
use MOSAML\LicenseLibrary\Classes\Mo_License_Constants;
use MOSAML\LicenseLibrary\Mo_License_Config;
use MOSAML\LicenseLibrary\Mo_License_Service;
if (defined("\101\x42\123\120\x41\x54\110")) {
    goto JJ;
}
exit;
JJ:
class Mo_License_Service_Utility
{
    public static function check_customer_login()
    {
        $uo = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_EMAIL_OPTION);
        $KD = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_KEY_OPTION);
        if (!$uo) {
            goto Wq;
        }
        if (!$KD || !is_numeric(trim($KD))) {
            goto gr;
        }
        goto K4;
        Wq:
        throw new Mo_License_Missing_Customer_Email_Exception();
        goto K4;
        gr:
        throw new Mo_License_Missing_Or_Invalid_Customer_Key_Exception();
        K4:
    }
    public static function check_customer_login_and_license()
    {
        self::check_customer_login();
        $pO = Mo_License_Dao::mo_get_option(Mo_License_Config::LICENSE_KEY_OPTION);
        if ($pO) {
            goto tl;
        }
        throw new Mo_License_Missing_License_Key_Exception();
        tl:
    }
    public static function is_license_grace_expired()
    {
        $FP = self::mo_decrypt_data(Mo_License_Dao::mo_get_option(Mo_License_Constants::LICENSE_EXPIRY_DATE_OPTION));
        if ($FP) {
            goto Gq;
        }
        throw new Mo_License_Invalid_Expiry_Date_Exception();
        Gq:
        try {
            $T5 = gmdate("\x59\55\x6d\55\144", strtotime($FP));
            $Iz = strtotime("\x2b" . Mo_License_Config::GRACE_PERIOD_DAYS . "\x20\144\x61\171\163", strtotime($FP));
            $q9 = gmdate("\131\55\x6d\55\144", $Iz);
            $U3 = new \DateTime();
            $U3 = $U3->format("\131\x2d\x6d\55\x64");
        } catch (\Exception $XJ) {
            throw new Mo_License_Unknown_Error_Exception();
        }
        if ($U3 > $q9) {
            goto m2;
        }
        if ($U3 > $T5) {
            goto on;
        }
        goto B7;
        m2:
        throw new Mo_License_Grace_Expired_Exception();
        goto B7;
        on:
        return self::return_false_with_code("\x4c\x49\103\105\116\123\105\x5f\x49\116\137\107\122\101\x43\105");
        B7:
        return self::return_false_with_code("\x4c\111\x43\x45\x4e\x53\x45\x5f\126\101\x4c\x49\x44");
    }
    public static function return_true_with_code($UB)
    {
        return array("\123\x54\x41\124\125\x53" => true, "\103\x4f\104\105" => $UB);
    }
    public static function return_false_with_code($UB)
    {
        return array("\123\124\101\124\125\123" => false, "\103\117\x44\105" => $UB);
    }
    public static function mo_decrypt_data($jQ)
    {
        $ns = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_TOKEN_OPTION);
        $ib = Mo_AESEncryption::decrypt_data($jQ, $ns);
        return $ib;
    }
    public static function mo_encrypt_data($jQ)
    {
        $ns = Mo_License_Dao::mo_get_option(Mo_License_Config::CUSTOMER_TOKEN_OPTION);
        $Jq = Mo_AESEncryption::encrypt_data($jQ, $ns);
        return $Jq;
    }
}

Function Calls

None

Variables

None

Stats

MD5 31c974f2c4a46b4f6a4a90e8ffc5c725
Eval Count 0
Decode Time 101 ms