Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

const MODULE_DIR = "\x4d\151\x6e\151\117\162\x61\156\x67\x65\x5f\117\101\165\x74\x68";..

Decoded Output download

<?      const MODULE_DIR = "MiniOrange_OAuth"; 
    const MODULE_TITLE = "OAuth Client"; 
    const MODULE_MULTISITE = "::multisite_settings"; 
    const MODULE_BASE = "::OAuth"; 
    const MODULE_OAUTHSETTINGS = "::oauth_settings"; 
    const MODULE_SIGNIN = "::signin_settings"; 
    const MODULE_ATTR = "::attr_settings"; 
    const MODULE_FAQ = "::faq_settings"; 
    const MODULE_ACCOUNT = "::account_settings"; 
    const MODULE_SUPPORT = "::support"; 
    const MODULE_UPGRADE = "::upgrade"; 
    const MODULE_IMAGES = "::images/"; 
    const MODULE_CERTS = "::certs/"; 
    const MODULE_CSS = "::css/"; 
    const MODULE_JS = "::js/"; 
    const LOGIN_ADMIN_OPT = "oauthLoginAdminUser"; 
    const TEST_CONFIG_OPT = "testConfig"; 
    const SELECTED_PROVIDER = "selected_provider"; 
    const APP_NAME = "appName"; 
    const CLIENT_ID = "clientID"; 
    const CLIENT_SECRET = "clientSecret"; 
    const SCOPE = "scope"; 
    const AUTHORIZE_URL = "authorizeURL"; 
    const ACCESSTOKEN_URL = "accessTokenURL"; 
    const GETUSERINFO_URL = "getUserInfoURL"; 
    const ENDSESSION_URL = "endSessionURL"; 
    const DEFAULT_POST_LOGOUT = "default_post_logout"; 
    const OAUTH_LOGOUT_URL = "oauthLogoutURL"; 
    const ID_TOKEN = "id_token"; 
    const STATE = "state"; 
    const TEST_RELAYSTATE = "testvalidate"; 
    const MAP_MAP_BY = "amAccountMatcher"; 
    const DEFAULT_MAP_BY = "email"; 
    const DEFAULT_GROUP = "General"; 
    const SEND_HEADER = "header"; 
    const SEND_BODY = "body"; 
    const NAME_ID = "nameId"; 
    const IDP_NAME = "identityProviderName"; 
    const X509CERT = "certificate"; 
    const JWKS_URL = "jwks_url"; 
    const RESPONSE_SIGNED = "responseSigned"; 
    const ASSERTION_SIGNED = "assertionSigned"; 
    const ISSUER = "oauthIssuer"; 
    const DB_FIRSTNAME = "firstname"; 
    const USER_NAME = "username"; 
    const DB_LASTNAME = "lastname"; 
    const CUSTOMER_KEY = "customerKey"; 
    const CUSTOMER_EMAIL = "email"; 
    const CUSTOMER_PHONE = "phone"; 
    const CUSTOMER_NAME = "cname"; 
    const CUSTOMER_FNAME = "customerFirstName"; 
    const CUSTOMER_LNAME = "customerLastName"; 
    const OAUTH_CKL = "ckl"; 
    const OAUTH_LK = "lk"; 
    const SHOW_ADMIN_LINK = "showadminlink"; 
    const SHOW_CUSTOMER_LINK = "showcustomerlink"; 
    const REG_STATUS = "registrationStatus"; 
    const API_KEY = "apiKey"; 
    const TOKEN = "token"; 
    const BUTTON_TEXT = "buttonText"; 
    const OTP_TYPE = "otpType"; 
    const IS_TEST = "isTest"; 
    const ENDPOINT_URL = "endpoint_url"; 
    const AUTO_CREATE_ADMIN = "mo_oauth_auto_create_admin"; 
    const AUTO_CREATE_CUSTOMER = "mo_oauth_auto_create_customer"; 
    const MAP_EMAIL = "amEmail"; 
    const DEFAULT_MAP_EMAIL = "email"; 
    const MAP_USERNAME = "amUsername"; 
    const DEFAULT_MAP_USERN = "username"; 
    const MAP_FIRSTNAME = "amFirstName"; 
    const DEFAULT_MAP_FN = "firstName"; 
    const MAP_LASTNAME = "amLastName"; 
    const DEFAULT_MAP_LN = "lastName"; 
    const MAP_DEFAULT_ROLE = "defaultRole"; 
    const DEFAULT_ROLE = "Administrators"; 
    const MAP_GROUP = "group"; 
    const UNLISTED_ROLE = "unlistedRole"; 
    const CREATEIFNOTMAP = "createUserIfRoleNotMapped"; 
    const AUTO_REDIRECT = "autoRedirect"; 
    const B2B_AUTO_REDIRECT = "b2bautoRedirect"; 
    const AUTO_REDIRECT_APP = "autoRedirect_App"; 
    const DEFAULT_PROVIDER_ROLE = "defaultProviderRole"; 
    const DEFAULT_MAP_CN = "country"; 
    const DEFAULT_MAP_CITY = "city"; 
    const DEFAULT_MAP_PHONE = "phone2"; 
    const DEFAULT_MAP_ADD = "streetaddress"; 
    const DEFAULT_MAP_STATE = "state2"; 
    const DEFAULT_MAP_ZIP = "zipcode"; 
    const CUSTOM_MAPPED = "customAttributeMapping"; 
    const MAP_COUNTRY_BILLING = "ambillingCountry"; 
    const MAP_CITY_BILLING = "ambillingCity"; 
    const MAP_ADDRESS_BILLING = "ambillingAddress"; 
    const MAP_PHONE_BILLING = "ambillingPhone"; 
    const MAP_STATE_BILLING = "ambillingState"; 
    const MAP_ZIPCODE_BILLING = "ambillingZipcode"; 
    const MAP_COUNTRY_SHIPPING = "amshippingCountry"; 
    const MAP_CITY_SHIPPING = "amshippingCity"; 
    const MAP_ADDRESS_SHIPPING = "amshippingAddress"; 
    const MAP_PHONE_SHIPPING = "amshippingPhone"; 
    const MAP_STATE_SHIPPING = "amshippingState"; 
    const MAP_ZIPCODE_SHIPPING = "amshippingZipcode"; 
    const ALL_PAGE_AUTO_REDIRECT = "allPageAutoRedirect"; 
    const LOGOUT_AUTO_REDIRECT = "logoutAutoRedirect"; 
    const LOGOUT_AUTO_REDIRECT_URL = "logoutAutoRedirectUrl"; 
    const BACKDOOR = "backdoor"; 
    const OAuth_SSO_FALSE = "oauth_sso"; 
    const MAP_DEFAULT_GROUP = "defaultGroup"; 
    const GROUPS_MAPPED = "oauthCustomerRoleMapping"; 
    const ROLES_MAPPED = "oauthAdminRoleMapping"; 
    const COLUMN_ENTITY = "entity_id"; 
    const OAUTH_LOGIN_URL = "mooauth/actions/sendAuthorizationRequest"; 
    const IMAGE_RIGHT = "right.png"; 
    const IMAGE_WRONG = "wrong.png"; 
    const TXT_ID = "miniorange/oauth/transactionID"; 
    const CALLBACK_URL = "mooauth/actions/ReadAuthorizationResponse"; 
    const CODE = "code"; 
    const GRANT_TYPE = "authorization_code"; 
    const OAUTH = "OAUTH"; 
    const HTTP_REDIRECT = "HttpRedirect"; 
    const OTP_TYPE_EMAIL = "email"; 
    const OTP_TYPE_PHONE = "sms"; 
    const STATUS_VERIFY_LOGIN = "MO_VERIFY_CUSTOMER"; 
    const STATUS_COMPLETE_LOGIN = "MO_VERIFIED"; 
    const STATUS_VERIFY_EMAIL = "MO_OTP_EMAIL_VALIDATE"; 
    const DEFAULT_CUSTOMER_KEY = "16555"; 
    const DEFAULT_API_KEY = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq"; 
    const HOSTNAME = "https://login.xecurify.com"; 
    const AREA_OF_INTEREST = "Magento 2.0 OAuth Client Plugin"; 
    const VERSION = "v6.0.1"; 
    const WEBSITE_COUNT = "website count"; 
    const WEBSITE_IDS = "website ids"; 
    const WEBSITES_LIMIT = "websites limit"; 
    const NO_OF_SP = "no_of_sp"; 
    const IDP_COUNT = "idp_count"; 
    const OAUTH_CONFIG_STATUS = "oauth_config_status"; 
    const ENABLE_DEBUG_LOG = "debug_log_oauth_allInclusive"; 
    const LOG_FILE_TIME = "log_file_time"; 
    const SEND_EMAIL = "send_email"; 
    const ADMINEMAIL = "admin_email"; 
    const LICENSE_PLAN = "magento_oauth_standard_plan"; 
    const PLAN_VERIFIED = "plan_verified"; 
 
 
 const LICENSE_PLAN = "magento_oauth_standard_plan"; 
  private static function callAPI($zt, $Zf = array(), $RT = array("Content-Type: application/json")) 
    { 
        $mg = new MoCurl(); 
        $Pr = ["CURLOPT_FOLLOWLOCATION" => true, "CURLOPT_ENCODING" => '', "CURLOPT_RETURNTRANSFER" => true, "CURLOPT_AUTOREFERER" => true, "CURLOPT_TIMEOUT" => 0, "CURLOPT_MAXREDIRS" => 10]; 
        $VP = in_array("Content-Type: application/x-www-form-urlencoded", $RT) ? !empty($Zf) ? http_build_query($Zf) : '' : (!empty($Zf) ? json_encode($Zf) : ''); 
        $on = !empty($VP) ? "POST" : "GET"; 
        $mg->setConfig($Pr); 
        $mg->write($on, $zt, "1.1", $RT, $VP); 
        $GR = $mg->read(); 
        $mg->close(); 
        return $GR; 
    } 
 private static function createAuthHeader($Hb, $XA) 
    { 
        $Fn = round(microtime(true) * 1000); 
        $Fn = number_format($Fn, 0, '', ''); 
        $bE = $Hb . $Fn . $XA; 
        $yH = hash("sha512", $bE); 
        $kD = ["Content-Type: application/json", "Customer-Key: {$Hb}", "Timestamp: {$Fn}", "Authorization: {$yH}"]; 
        return $kD; 
    } 
public static function ccl($Hb, $XA) 
    { 
        $zt = OAuthConstants::HOSTNAME . "/moas/rest/customer/license"; 
        $VU = array("customerId" => $Hb, "applicationName" => OAuthConstants::LICENSE_PLAN); 
        $yH = self::createAuthHeader($Hb, $XA); 
        $X4 = self::callAPI($zt, $VU, $yH); 
        return $X4; 
    } 
 
public function execute() 
    { 
        $this->checkIfRequiredFieldsEmpty(array("lk" => $this->REQUEST)); 
        $MS = $this->REQUEST["lk"]; 
        $Lk = json_decode($this->oauthUtility->ccl(), true); 
        $this->oauthUtility->log_debug("license keys result " . json_encode($Lk)); 
        if (!(isset($Lk["status"]) && $Lk["status"] == "SUCCESS")) { 
            goto x6; 
        } 
        if (isset($Lk["noOfSubsites"])) { 
            goto tB; 
        } 
        if ($this->oauthUtility->check_versi(3)) { 
            goto py; 
        } 
        if ($this->oauthUtility->check_versi(2)) { 
            goto yJ; 
        } 
        $qe = 1; 
        goto Ny; 
        py: 
        $qe = 2; 
        goto Ny; 
        yJ: 
        $qe = 1; 
        Ny: 
        goto QE; 
        tB: 
        $qe = $Lk["noOfSubsites"]; 
        QE: 
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITES_LIMIT, $qe); 
        x6: 
        switch ($Lk["status"]) { 
            case "SUCCESS": 
                $this->_vlk_success($MS); 
                goto PN; 
            default: 
                $this->_vlk_fail(); 
                goto PN; 
        } 
        PM: 
        PN: 
        $this->oauthUtility->reinitConfig(); 
    } 
    public function _vlk_success($cf) 
    { 
        $GR = json_decode($this->oauthUtility->vml(trim($cf)), true); 
        if (!(!is_array($GR) || !isset($GR["status"]) || empty($GR["status"]))) { 
            goto Dk; 
        } 
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY); 
        return; 
        Dk: 
        if (strcasecmp($GR["status"], "SUCCESS") == 0) { 
            goto Fq; 
        } 
        if (strcasecmp($GR["status"], "FAILED") == 0) { 
            goto co; 
        } 
        $this->messageManager->addErrorMessage(OAuthMessages::ERROR_OCCURRED); 
        goto Ln; 
        Fq: 
        $this->oauthUtility->reinitConfig(); 
        $Qi = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, AESEncryption::encrypt_data($cf, $Qi)); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("true", $Qi)); 
        $this->messageManager->addSuccessMessage(OAuthMessages::LICENSE_VERIFIED); 
        goto Ln; 
        co: 
        if (strcasecmp($GR["message"], "Code has Expired") == 0) { 
            goto s1; 
        } 
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY); 
        goto Yl; 
        s1: 
        $this->messageManager->addErrorMessage(OAuthMessages::LICENSE_KEY_IN_USE); 
        Yl: 
        Ln: 
    } 
    public function _vlk_fail() 
    { 
        $Qi = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("false", $Qi)); 
        $this->messageManager->addErrorMessage(OAuthMessages::NOT_UPGRADED_YET); 
    } 
 
   public function getStoreConfig($ty) 
    { 
        $CJ = \Magento\Store\Model\ScopeInterface::SCOPE_STORE; 
        return $this->scopeConfig->getValue("miniorange/oauth/" . $ty, $CJ); 
    } ?>

Did this file decode correctly?

Original Code

    const MODULE_DIR = "\x4d\151\x6e\151\117\162\x61\156\x67\x65\x5f\117\101\165\x74\x68";
    const MODULE_TITLE = "\117\101\165\164\150\x20\103\154\151\x65\156\164";
    const MODULE_MULTISITE = "\72\x3a\155\x75\154\164\151\163\151\164\145\137\163\145\164\164\151\156\x67\x73";
    const MODULE_BASE = "\72\72\x4f\101\165\x74\150";
    const MODULE_OAUTHSETTINGS = "\x3a\x3a\157\141\165\164\x68\137\163\x65\164\x74\x69\x6e\x67\163";
    const MODULE_SIGNIN = "\x3a\x3a\x73\x69\147\156\151\x6e\x5f\163\x65\164\x74\x69\x6e\147\163";
    const MODULE_ATTR = "\x3a\x3a\x61\x74\164\162\137\163\x65\x74\x74\151\x6e\147\163";
    const MODULE_FAQ = "\x3a\x3a\x66\141\x71\x5f\163\145\164\164\x69\156\x67\x73";
    const MODULE_ACCOUNT = "\x3a\72\141\x63\143\x6f\165\156\164\137\x73\145\164\x74\x69\x6e\x67\163";
    const MODULE_SUPPORT = "\72\72\x73\165\x70\x70\157\x72\x74";
    const MODULE_UPGRADE = "\x3a\x3a\165\160\147\162\x61\x64\145";
    const MODULE_IMAGES = "\x3a\x3a\151\x6d\141\x67\x65\163\57";
    const MODULE_CERTS = "\x3a\72\x63\145\162\x74\x73\x2f";
    const MODULE_CSS = "\x3a\x3a\x63\x73\163\57";
    const MODULE_JS = "\72\x3a\152\x73\57";
    const LOGIN_ADMIN_OPT = "\x6f\x61\x75\164\150\x4c\157\x67\x69\x6e\101\x64\155\x69\156\x55\x73\145\x72";
    const TEST_CONFIG_OPT = "\x74\x65\x73\164\103\x6f\156\146\151\147";
    const SELECTED_PROVIDER = "\x73\x65\154\x65\143\164\x65\x64\137\160\162\x6f\x76\151\x64\x65\162";
    const APP_NAME = "\x61\160\160\116\141\155\x65";
    const CLIENT_ID = "\x63\x6c\x69\x65\x6e\x74\111\104";
    const CLIENT_SECRET = "\x63\x6c\x69\x65\x6e\164\123\145\143\x72\x65\164";
    const SCOPE = "\163\x63\157\x70\145";
    const AUTHORIZE_URL = "\141\x75\164\x68\x6f\162\151\172\x65\x55\x52\x4c";
    const ACCESSTOKEN_URL = "\141\143\143\145\163\163\124\157\153\145\x6e\x55\x52\114";
    const GETUSERINFO_URL = "\x67\145\x74\x55\x73\x65\162\x49\156\x66\x6f\125\x52\114";
    const ENDSESSION_URL = "\x65\x6e\x64\x53\x65\x73\163\151\157\x6e\125\122\114";
    const DEFAULT_POST_LOGOUT = "\x64\x65\146\141\165\x6c\x74\137\160\x6f\x73\164\137\x6c\157\147\157\165\x74";
    const OAUTH_LOGOUT_URL = "\157\x61\x75\x74\150\114\157\147\157\165\164\x55\x52\114";
    const ID_TOKEN = "\151\144\x5f\164\157\153\x65\x6e";
    const STATE = "\x73\x74\x61\164\x65";
    const TEST_RELAYSTATE = "\x74\x65\163\x74\166\x61\154\x69\x64\x61\x74\x65";
    const MAP_MAP_BY = "\141\x6d\101\x63\143\x6f\x75\156\164\115\141\164\x63\150\x65\x72";
    const DEFAULT_MAP_BY = "\x65\x6d\x61\151\154";
    const DEFAULT_GROUP = "\107\x65\156\x65\162\x61\x6c";
    const SEND_HEADER = "\x68\x65\x61\144\x65\x72";
    const SEND_BODY = "\142\x6f\144\171";
    const NAME_ID = "\x6e\141\x6d\x65\x49\x64";
    const IDP_NAME = "\x69\144\145\x6e\164\151\164\171\x50\x72\x6f\166\151\x64\x65\162\116\x61\x6d\x65";
    const X509CERT = "\x63\x65\162\x74\151\x66\x69\x63\x61\x74\145";
    const JWKS_URL = "\152\167\153\163\137\165\162\x6c";
    const RESPONSE_SIGNED = "\162\x65\x73\160\157\x6e\x73\145\123\151\147\x6e\145\144";
    const ASSERTION_SIGNED = "\x61\x73\x73\145\162\164\x69\x6f\156\x53\x69\x67\156\145\x64";
    const ISSUER = "\x6f\x61\165\x74\150\x49\163\x73\x75\x65\162";
    const DB_FIRSTNAME = "\x66\151\162\163\x74\156\141\x6d\145";
    const USER_NAME = "\165\x73\145\x72\156\141\155\x65";
    const DB_LASTNAME = "\154\141\x73\x74\x6e\141\155\x65";
    const CUSTOMER_KEY = "\143\x75\x73\x74\157\155\x65\162\113\x65\x79";
    const CUSTOMER_EMAIL = "\145\155\x61\x69\x6c";
    const CUSTOMER_PHONE = "\x70\x68\x6f\156\x65";
    const CUSTOMER_NAME = "\x63\x6e\141\x6d\x65";
    const CUSTOMER_FNAME = "\143\165\x73\x74\x6f\x6d\x65\162\106\151\x72\x73\x74\x4e\141\155\145";
    const CUSTOMER_LNAME = "\x63\x75\163\164\157\x6d\145\162\x4c\x61\163\164\x4e\x61\155\145";
    const OAUTH_CKL = "\143\153\154";
    const OAUTH_LK = "\154\x6b";
    const SHOW_ADMIN_LINK = "\x73\x68\157\x77\141\144\x6d\x69\x6e\154\151\156\153";
    const SHOW_CUSTOMER_LINK = "\163\x68\157\167\x63\165\x73\x74\x6f\155\145\162\154\x69\x6e\x6b";
    const REG_STATUS = "\x72\x65\x67\151\x73\164\162\x61\164\151\x6f\x6e\x53\164\141\164\165\x73";
    const API_KEY = "\x61\160\151\113\x65\x79";
    const TOKEN = "\x74\x6f\153\145\156";
    const BUTTON_TEXT = "\142\x75\164\164\157\156\124\145\x78\164";
    const OTP_TYPE = "\x6f\x74\x70\x54\171\160\145";
    const IS_TEST = "\x69\163\x54\x65\163\x74";
    const ENDPOINT_URL = "\145\x6e\x64\160\x6f\151\x6e\x74\x5f\165\x72\x6c";
    const AUTO_CREATE_ADMIN = "\x6d\157\x5f\x6f\141\165\x74\x68\x5f\x61\x75\x74\x6f\137\x63\x72\x65\141\164\x65\x5f\141\x64\155\x69\x6e";
    const AUTO_CREATE_CUSTOMER = "\x6d\x6f\137\x6f\141\165\164\150\x5f\x61\165\164\157\137\x63\162\145\141\x74\x65\137\143\x75\163\164\157\x6d\145\162";
    const MAP_EMAIL = "\141\x6d\x45\155\141\151\x6c";
    const DEFAULT_MAP_EMAIL = "\145\155\x61\151\154";
    const MAP_USERNAME = "\141\155\x55\163\145\x72\x6e\141\155\145";
    const DEFAULT_MAP_USERN = "\165\163\x65\162\x6e\x61\155\x65";
    const MAP_FIRSTNAME = "\141\x6d\x46\x69\x72\x73\164\x4e\x61\155\x65";
    const DEFAULT_MAP_FN = "\x66\x69\x72\163\164\x4e\x61\x6d\145";
    const MAP_LASTNAME = "\x61\155\x4c\x61\163\164\116\141\155\145";
    const DEFAULT_MAP_LN = "\154\x61\x73\164\x4e\x61\x6d\x65";
    const MAP_DEFAULT_ROLE = "\x64\x65\146\141\165\154\164\x52\x6f\x6c\145";
    const DEFAULT_ROLE = "\x41\144\155\151\156\x69\163\164\162\x61\164\157\162\163";
    const MAP_GROUP = "\x67\x72\x6f\x75\x70";
    const UNLISTED_ROLE = "\165\x6e\154\151\x73\164\145\x64\x52\x6f\154\145";
    const CREATEIFNOTMAP = "\143\x72\145\141\164\x65\x55\x73\x65\162\x49\x66\122\157\154\x65\x4e\157\164\115\x61\160\x70\145\144";
    const AUTO_REDIRECT = "\141\x75\164\157\x52\145\144\x69\162\x65\x63\164";
    const B2B_AUTO_REDIRECT = "\142\62\x62\x61\x75\x74\x6f\122\145\x64\x69\162\x65\143\x74";
    const AUTO_REDIRECT_APP = "\141\165\x74\157\122\x65\x64\x69\162\x65\143\164\x5f\x41\x70\160";
    const DEFAULT_PROVIDER_ROLE = "\x64\x65\146\141\x75\154\x74\120\x72\157\166\151\x64\x65\x72\x52\157\154\145";
    const DEFAULT_MAP_CN = "\143\x6f\165\x6e\x74\x72\x79";
    const DEFAULT_MAP_CITY = "\143\x69\164\x79";
    const DEFAULT_MAP_PHONE = "\x70\x68\157\x6e\x65\62";
    const DEFAULT_MAP_ADD = "\163\164\162\x65\x65\x74\141\x64\x64\x72\x65\163\x73";
    const DEFAULT_MAP_STATE = "\163\164\x61\164\x65\62";
    const DEFAULT_MAP_ZIP = "\x7a\151\160\143\157\144\145";
    const CUSTOM_MAPPED = "\x63\x75\x73\x74\x6f\x6d\101\x74\164\x72\151\142\x75\x74\145\115\x61\x70\x70\x69\156\147";
    const MAP_COUNTRY_BILLING = "\141\155\142\151\154\x6c\x69\156\147\x43\x6f\165\x6e\x74\x72\x79";
    const MAP_CITY_BILLING = "\141\155\x62\151\154\x6c\151\x6e\147\103\x69\164\171";
    const MAP_ADDRESS_BILLING = "\x61\x6d\x62\x69\154\154\x69\156\x67\101\144\144\162\145\x73\x73";
    const MAP_PHONE_BILLING = "\x61\x6d\x62\x69\154\154\151\156\147\120\x68\157\156\145";
    const MAP_STATE_BILLING = "\141\155\x62\x69\154\x6c\151\156\x67\x53\x74\x61\x74\145";
    const MAP_ZIPCODE_BILLING = "\x61\x6d\142\151\154\x6c\x69\156\x67\132\x69\x70\x63\157\x64\x65";
    const MAP_COUNTRY_SHIPPING = "\141\155\x73\150\x69\160\x70\151\x6e\147\103\157\165\156\164\x72\171";
    const MAP_CITY_SHIPPING = "\141\155\163\x68\151\160\160\151\156\147\x43\x69\164\171";
    const MAP_ADDRESS_SHIPPING = "\x61\155\163\150\x69\x70\x70\x69\x6e\x67\101\x64\x64\162\145\x73\163";
    const MAP_PHONE_SHIPPING = "\141\x6d\x73\x68\x69\160\x70\x69\156\x67\x50\150\157\156\145";
    const MAP_STATE_SHIPPING = "\x61\155\x73\150\151\160\x70\x69\x6e\x67\123\164\141\x74\145";
    const MAP_ZIPCODE_SHIPPING = "\141\x6d\x73\150\x69\x70\x70\x69\x6e\x67\132\151\x70\x63\x6f\144\145";
    const ALL_PAGE_AUTO_REDIRECT = "\x61\x6c\x6c\x50\x61\x67\145\101\165\x74\x6f\x52\145\x64\151\x72\x65\143\x74";
    const LOGOUT_AUTO_REDIRECT = "\154\157\x67\157\165\164\101\165\164\x6f\x52\x65\144\x69\x72\x65\x63\x74";
    const LOGOUT_AUTO_REDIRECT_URL = "\154\x6f\x67\157\x75\164\101\x75\164\157\122\x65\144\x69\x72\x65\143\164\125\162\x6c";
    const BACKDOOR = "\142\141\143\153\144\x6f\157\x72";
    const OAuth_SSO_FALSE = "\157\x61\x75\164\150\137\163\x73\x6f";
    const MAP_DEFAULT_GROUP = "\144\145\146\141\165\x6c\164\x47\162\x6f\x75\160";
    const GROUPS_MAPPED = "\157\x61\x75\164\x68\x43\165\x73\x74\x6f\155\x65\162\122\157\154\145\115\141\x70\160\151\x6e\x67";
    const ROLES_MAPPED = "\x6f\141\x75\x74\150\101\144\155\x69\156\122\157\154\x65\x4d\141\160\x70\151\x6e\x67";
    const COLUMN_ENTITY = "\145\x6e\x74\x69\x74\x79\137\x69\144";
    const OAUTH_LOGIN_URL = "\x6d\x6f\x6f\x61\165\x74\x68\57\x61\x63\164\151\157\156\x73\x2f\163\145\156\x64\x41\165\164\x68\157\x72\x69\172\141\164\151\157\156\x52\145\x71\x75\x65\163\x74";
    const IMAGE_RIGHT = "\x72\x69\x67\x68\x74\x2e\160\156\x67";
    const IMAGE_WRONG = "\x77\162\157\x6e\147\56\160\156\147";
    const TXT_ID = "\155\151\x6e\x69\x6f\162\x61\156\147\x65\x2f\157\141\x75\x74\x68\x2f\164\162\141\156\163\141\x63\164\x69\157\156\111\104";
    const CALLBACK_URL = "\155\x6f\157\141\x75\x74\150\57\x61\x63\x74\151\x6f\x6e\x73\x2f\x52\145\141\x64\101\165\164\x68\x6f\x72\151\x7a\x61\164\151\157\156\x52\145\163\160\157\156\x73\145";
    const CODE = "\143\x6f\x64\145";
    const GRANT_TYPE = "\x61\x75\x74\150\x6f\162\151\x7a\x61\164\x69\x6f\x6e\x5f\x63\x6f\x64\145";
    const OAUTH = "\x4f\101\125\124\110";
    const HTTP_REDIRECT = "\110\164\164\x70\x52\x65\144\151\x72\145\x63\164";
    const OTP_TYPE_EMAIL = "\145\155\141\151\x6c";
    const OTP_TYPE_PHONE = "\163\155\163";
    const STATUS_VERIFY_LOGIN = "\x4d\x4f\137\x56\105\x52\111\106\x59\137\x43\125\123\x54\x4f\115\105\x52";
    const STATUS_COMPLETE_LOGIN = "\115\117\x5f\126\105\x52\x49\106\x49\105\104";
    const STATUS_VERIFY_EMAIL = "\x4d\x4f\x5f\x4f\x54\120\137\105\115\101\x49\114\x5f\x56\101\x4c\x49\104\x41\124\105";
    const DEFAULT_CUSTOMER_KEY = "\61\x36\65\65\x35";
    const DEFAULT_API_KEY = "\x66\x46\144\62\130\143\166\x54\107\x44\145\155\x5a\x76\x62\x77\61\x62\x63\125\145\x73\116\112\127\x45\161\x4b\x62\142\125\x71";
    const HOSTNAME = "\150\x74\164\x70\163\x3a\x2f\57\154\x6f\147\x69\156\x2e\x78\145\143\x75\x72\151\x66\171\56\143\x6f\x6d";
    const AREA_OF_INTEREST = "\115\x61\147\145\x6e\164\157\x20\x32\56\x30\x20\117\101\x75\164\150\x20\x43\154\151\x65\156\x74\x20\x50\154\165\147\x69\156";
    const VERSION = "\166\x36\x2e\60\56\61";
    const WEBSITE_COUNT = "\167\x65\x62\x73\151\164\145\x20\x63\157\165\156\x74";
    const WEBSITE_IDS = "\x77\x65\x62\163\x69\164\x65\x20\151\x64\x73";
    const WEBSITES_LIMIT = "\x77\x65\x62\x73\151\x74\x65\163\x20\154\151\x6d\151\164";
    const NO_OF_SP = "\x6e\157\137\x6f\x66\137\x73\x70";
    const IDP_COUNT = "\x69\x64\160\137\143\157\165\156\164";
    const OAUTH_CONFIG_STATUS = "\x6f\141\x75\164\x68\x5f\x63\157\x6e\146\151\147\x5f\163\x74\x61\164\165\163";
    const ENABLE_DEBUG_LOG = "\x64\x65\142\x75\147\137\154\157\147\x5f\x6f\x61\165\x74\150\137\x61\154\154\111\x6e\143\x6c\165\163\151\166\145";
    const LOG_FILE_TIME = "\x6c\x6f\147\x5f\x66\151\154\145\137\x74\x69\x6d\x65";
    const SEND_EMAIL = "\x73\145\156\144\137\145\155\x61\151\x6c";
    const ADMINEMAIL = "\x61\x64\x6d\x69\x6e\137\145\x6d\x61\151\154";
    const LICENSE_PLAN = "\155\x61\147\x65\x6e\x74\157\x5f\x6f\141\x75\x74\x68\x5f\163\164\x61\156\x64\141\162\144\137\160\x6c\x61\156";
    const PLAN_VERIFIED = "\160\154\141\x6e\x5f\166\x65\162\151\146\151\145\144";


 const LICENSE_PLAN = "\155\x61\147\x65\x6e\x74\157\x5f\x6f\141\x75\x74\x68\x5f\163\164\x61\156\x64\141\162\144\137\160\x6c\x61\156";
  private static function callAPI($zt, $Zf = array(), $RT = array("\x43\x6f\156\x74\x65\x6e\164\55\x54\171\160\145\x3a\40\x61\160\x70\154\151\x63\141\x74\151\157\156\x2f\152\x73\x6f\156"))
    {
        $mg = new MoCurl();
        $Pr = ["\103\x55\122\114\x4f\x50\124\x5f\x46\x4f\x4c\x4c\x4f\127\x4c\117\x43\101\124\x49\117\x4e" => true, "\x43\125\122\x4c\x4f\120\x54\x5f\105\116\x43\x4f\x44\111\x4e\107" => '', "\103\x55\122\x4c\117\x50\x54\137\122\x45\x54\125\122\116\124\122\x41\116\123\106\105\x52" => true, "\103\125\122\x4c\x4f\120\x54\137\101\x55\x54\117\122\105\106\x45\122\x45\x52" => true, "\x43\x55\x52\x4c\117\120\x54\137\124\111\x4d\x45\x4f\x55\124" => 0, "\103\125\x52\x4c\x4f\x50\x54\x5f\115\x41\x58\122\105\x44\111\x52\x53" => 10];
        $VP = in_array("\x43\157\156\164\145\x6e\164\x2d\124\x79\x70\145\72\40\x61\160\x70\154\151\x63\x61\x74\x69\x6f\x6e\x2f\x78\55\167\167\167\x2d\146\157\162\x6d\x2d\x75\162\x6c\145\x6e\143\157\x64\145\x64", $RT) ? !empty($Zf) ? http_build_query($Zf) : '' : (!empty($Zf) ? json_encode($Zf) : '');
        $on = !empty($VP) ? "\x50\117\123\x54" : "\107\x45\x54";
        $mg->setConfig($Pr);
        $mg->write($on, $zt, "\61\x2e\x31", $RT, $VP);
        $GR = $mg->read();
        $mg->close();
        return $GR;
    }
 private static function createAuthHeader($Hb, $XA)
    {
        $Fn = round(microtime(true) * 1000);
        $Fn = number_format($Fn, 0, '', '');
        $bE = $Hb . $Fn . $XA;
        $yH = hash("\x73\150\141\x35\61\x32", $bE);
        $kD = ["\x43\157\x6e\x74\x65\x6e\164\55\124\171\160\x65\x3a\x20\x61\160\160\x6c\x69\x63\141\x74\x69\x6f\156\57\x6a\x73\157\156", "\103\165\163\164\157\x6d\x65\162\x2d\x4b\145\x79\72\40{$Hb}", "\x54\x69\x6d\145\x73\164\x61\x6d\160\72\x20{$Fn}", "\101\x75\x74\150\x6f\162\x69\172\141\x74\151\x6f\x6e\72\40{$yH}"];
        return $kD;
    }
public static function ccl($Hb, $XA)
    {
        $zt = OAuthConstants::HOSTNAME . "\x2f\x6d\157\x61\x73\x2f\x72\x65\163\x74\x2f\143\x75\x73\164\157\155\x65\162\x2f\x6c\151\x63\145\x6e\x73\145";
        $VU = array("\x63\x75\163\164\157\x6d\x65\162\x49\x64" => $Hb, "\x61\x70\160\x6c\x69\143\141\x74\x69\157\x6e\x4e\141\155\x65" => OAuthConstants::LICENSE_PLAN);
        $yH = self::createAuthHeader($Hb, $XA);
        $X4 = self::callAPI($zt, $VU, $yH);
        return $X4;
    }

public function execute()
    {
        $this->checkIfRequiredFieldsEmpty(array("\x6c\x6b" => $this->REQUEST));
        $MS = $this->REQUEST["\154\x6b"];
        $Lk = json_decode($this->oauthUtility->ccl(), true);
        $this->oauthUtility->log_debug("\154\151\143\145\x6e\x73\145\40\153\145\171\163\40\162\x65\163\x75\154\164\40" . json_encode($Lk));
        if (!(isset($Lk["\x73\164\141\164\165\x73"]) && $Lk["\x73\x74\x61\x74\x75\163"] == "\x53\x55\103\103\105\123\x53")) {
            goto x6;
        }
        if (isset($Lk["\x6e\157\x4f\146\x53\165\x62\163\x69\x74\x65\x73"])) {
            goto tB;
        }
        if ($this->oauthUtility->check_versi(3)) {
            goto py;
        }
        if ($this->oauthUtility->check_versi(2)) {
            goto yJ;
        }
        $qe = 1;
        goto Ny;
        py:
        $qe = 2;
        goto Ny;
        yJ:
        $qe = 1;
        Ny:
        goto QE;
        tB:
        $qe = $Lk["\156\x6f\117\146\123\x75\x62\x73\151\x74\x65\x73"];
        QE:
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITES_LIMIT, $qe);
        x6:
        switch ($Lk["\x73\164\141\164\x75\x73"]) {
            case "\x53\125\x43\x43\105\123\x53":
                $this->_vlk_success($MS);
                goto PN;
            default:
                $this->_vlk_fail();
                goto PN;
        }
        PM:
        PN:
        $this->oauthUtility->reinitConfig();
    }
    public function _vlk_success($cf)
    {
        $GR = json_decode($this->oauthUtility->vml(trim($cf)), true);
        if (!(!is_array($GR) || !isset($GR["\163\x74\x61\164\x75\163"]) || empty($GR["\163\164\x61\164\165\163"]))) {
            goto Dk;
        }
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY);
        return;
        Dk:
        if (strcasecmp($GR["\x73\x74\141\x74\165\x73"], "\123\x55\103\x43\105\x53\123") == 0) {
            goto Fq;
        }
        if (strcasecmp($GR["\x73\x74\141\164\165\x73"], "\x46\101\x49\x4c\x45\104") == 0) {
            goto co;
        }
        $this->messageManager->addErrorMessage(OAuthMessages::ERROR_OCCURRED);
        goto Ln;
        Fq:
        $this->oauthUtility->reinitConfig();
        $Qi = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN);
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, AESEncryption::encrypt_data($cf, $Qi));
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("\x74\162\x75\x65", $Qi));
        $this->messageManager->addSuccessMessage(OAuthMessages::LICENSE_VERIFIED);
        goto Ln;
        co:
        if (strcasecmp($GR["\155\145\x73\163\141\x67\x65"], "\103\x6f\144\145\40\x68\x61\163\x20\105\170\160\x69\x72\x65\144") == 0) {
            goto s1;
        }
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY);
        goto Yl;
        s1:
        $this->messageManager->addErrorMessage(OAuthMessages::LICENSE_KEY_IN_USE);
        Yl:
        Ln:
    }
    public function _vlk_fail()
    {
        $Qi = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN);
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("\x66\x61\x6c\163\x65", $Qi));
        $this->messageManager->addErrorMessage(OAuthMessages::NOT_UPGRADED_YET);
    }

   public function getStoreConfig($ty)
    {
        $CJ = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        return $this->scopeConfig->getValue("\155\151\156\x69\x6f\x72\x61\156\x67\x65\x2f\x6f\x61\165\164\150\57" . $ty, $CJ);
    }

Function Calls

None

Variables

None

Stats

MD5 701695341f43975401b76c8818b81bb3
Eval Count 0
Decode Time 65 ms