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 MiniOrange\OAuth\Controller\Actions; use MiniOrange\OAuth\Helper\C..

Decoded Output download

<?php 
 
 
namespace MiniOrange\OAuth\Controller\Actions; 
 
use MiniOrange\OAuth\Helper\Curl; 
use MiniOrange\OAuth\Helper\OAuthConstants; 
use MiniOrange\OAuth\Helper\OAuthMessages; 
use MiniOrange\OAuth\Helper\OAuth\lib\AESEncryption; 
class LKAction extends BaseAdminAction 
{ 
    private $REQUEST; 
    public function removeAccount() 
    { 
        $this->oauthUtility->setStoreConfig(OAuthConstants::REG_STATUS, OAuthConstants::STATUS_VERIFY_LOGIN); 
        if (!$this->oauthUtility->micr()) { 
            goto G7; 
        } 
        $LY = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN); 
        $zM = AESEncryption::decrypt_data($this->oauthUtility->getStoreConfig(OAuthConstants::OAUTH_LK), $LY); 
        $E6 = json_decode($this->oauthUtility->update_status($zM), true); 
        if (!(strcasecmp($E6["status"], "SUCCESS") == 0)) { 
            goto Z8; 
        } 
        $this->oauthUtility->setStoreConfig(OAuthConstants::CUSTOMER_EMAIL, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::CUSTOMER_KEY, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::API_KEY, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::TOKEN, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITES_LIMIT, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITE_COUNT, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::REG_STATUS, OAuthConstants::STATUS_VERIFY_LOGIN); 
        $this->oauthUtility->removeSignInSettings(); 
        $this->oauthUtility->reinitconfig(); 
        Z8: 
        G7: 
        if (!$this->oauthUtility->mclv()) { 
            goto ZF; 
        } 
        $this->oauthUtility->mius(); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, ''); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, ''); 
        ZF: 
        $this->oauthUtility->flushCache(''); 
    } 
    public function setRequestParam($DS) 
    { 
        $this->REQUEST = $DS; 
        return $this; 
    } 
    public function execute() 
    { 
        $this->checkIfRequiredFieldsEmpty(array("lk" => $this->REQUEST)); 
        $Xw = $this->REQUEST["lk"]; 
        $QY = json_decode($this->oauthUtility->ccl(), true); 
        $tw = $this->oauthUtility->getCurrentAdminUser()->getData(); 
        $MV = $tw["email"]; 
        $this->oauthUtility->log_debug("license keys result " . json_encode($QY)); 
        Curl::submit_to_magento_team($MV, "Activating Magento OAuth Enterprise License:", $QY); 
        if (!(isset($QY["status"]) && $QY["status"] == "SUCCESS")) { 
            goto OC; 
        } 
        if (isset($QY["noOfSubSites"])) { 
            goto Vk; 
        } 
        if ($this->oauthUtility->check_plan(3)) { 
            goto AV; 
        } 
        if ($this->oauthUtility->check_plan(2)) { 
            goto q9; 
        } 
        $Oo = 1; 
        goto n7; 
        AV: 
        $Oo = 6; 
        goto n7; 
        q9: 
        $Oo = 1; 
        n7: 
        goto a9; 
        Vk: 
        $Oo = $QY["noOfSubSites"]; 
        a9: 
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITES_LIMIT, $Oo); 
        OC: 
        switch ($QY["status"]) { 
            case "SUCCESS": 
                $this->_vlk_success($Xw); 
                goto PK; 
            default: 
                $this->_vlk_fail(); 
                goto PK; 
        } 
        A8: 
        PK: 
        $this->oauthUtility->reinitConfig(); 
    } 
    public function _vlk_success($zM) 
    { 
        $E6 = json_decode($this->oauthUtility->vml(trim($zM)), true); 
        if (!(!is_array($E6) || !isset($E6["status"]) || empty($E6["status"]))) { 
            goto wa; 
        } 
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY); 
        return; 
        wa: 
        if (strcasecmp($E6["status"], "SUCCESS") == 0) { 
            goto Kn; 
        } 
        if (strcasecmp($E6["status"], "FAILED") == 0) { 
            goto Kf; 
        } 
        $this->messageManager->addErrorMessage(OAuthMessages::ERROR_OCCURRED); 
        goto t2; 
        Kn: 
        $this->oauthUtility->reinitConfig(); 
        $ed = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, AESEncryption::encrypt_data(trim($zM), $ed)); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("true", $ed)); 
        $this->messageManager->addSuccessMessage(OAuthMessages::LICENSE_VERIFIED); 
        goto t2; 
        Kf: 
        if (strcasecmp($E6["message"], "Code has Expired") == 0) { 
            goto uS; 
        } 
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY); 
        goto tD; 
        uS: 
        $this->messageManager->addErrorMessage(OAuthMessages::LICENSE_KEY_IN_USE); 
        tD: 
        t2: 
    } 
    public function _vlk_fail() 
    { 
        $ed = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN); 
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("false", $ed)); 
        $this->messageManager->addErrorMessage(OAuthMessages::NOT_UPGRADED_YET); 
    } 
    public function extendTrial() 
    { 
        $this->oauthUtility->extendTrial(); 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace MiniOrange\OAuth\Controller\Actions;

use MiniOrange\OAuth\Helper\Curl;
use MiniOrange\OAuth\Helper\OAuthConstants;
use MiniOrange\OAuth\Helper\OAuthMessages;
use MiniOrange\OAuth\Helper\OAuth\lib\AESEncryption;
class LKAction extends BaseAdminAction
{
    private $REQUEST;
    public function removeAccount()
    {
        $this->oauthUtility->setStoreConfig(OAuthConstants::REG_STATUS, OAuthConstants::STATUS_VERIFY_LOGIN);
        if (!$this->oauthUtility->micr()) {
            goto G7;
        }
        $LY = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN);
        $zM = AESEncryption::decrypt_data($this->oauthUtility->getStoreConfig(OAuthConstants::OAUTH_LK), $LY);
        $E6 = json_decode($this->oauthUtility->update_status($zM), true);
        if (!(strcasecmp($E6["\x73\x74\x61\x74\165\163"], "\x53\125\103\103\x45\x53\x53") == 0)) {
            goto Z8;
        }
        $this->oauthUtility->setStoreConfig(OAuthConstants::CUSTOMER_EMAIL, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::CUSTOMER_KEY, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::API_KEY, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::TOKEN, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITES_LIMIT, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITE_COUNT, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::REG_STATUS, OAuthConstants::STATUS_VERIFY_LOGIN);
        $this->oauthUtility->removeSignInSettings();
        $this->oauthUtility->reinitconfig();
        Z8:
        G7:
        if (!$this->oauthUtility->mclv()) {
            goto ZF;
        }
        $this->oauthUtility->mius();
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, '');
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, '');
        ZF:
        $this->oauthUtility->flushCache('');
    }
    public function setRequestParam($DS)
    {
        $this->REQUEST = $DS;
        return $this;
    }
    public function execute()
    {
        $this->checkIfRequiredFieldsEmpty(array("\154\x6b" => $this->REQUEST));
        $Xw = $this->REQUEST["\154\x6b"];
        $QY = json_decode($this->oauthUtility->ccl(), true);
        $tw = $this->oauthUtility->getCurrentAdminUser()->getData();
        $MV = $tw["\145\155\x61\x69\154"];
        $this->oauthUtility->log_debug("\x6c\151\x63\145\156\163\x65\x20\153\145\x79\x73\40\162\145\163\x75\x6c\x74\40" . json_encode($QY));
        Curl::submit_to_magento_team($MV, "\x41\143\164\x69\x76\x61\164\x69\x6e\x67\40\115\141\x67\145\156\x74\x6f\40\x4f\101\x75\x74\150\x20\x45\156\x74\145\x72\160\162\x69\163\x65\40\x4c\151\x63\x65\156\x73\145\x3a", $QY);
        if (!(isset($QY["\163\x74\x61\x74\x75\x73"]) && $QY["\x73\164\x61\x74\x75\x73"] == "\123\x55\x43\x43\105\x53\x53")) {
            goto OC;
        }
        if (isset($QY["\156\x6f\x4f\146\x53\165\x62\123\151\164\x65\163"])) {
            goto Vk;
        }
        if ($this->oauthUtility->check_plan(3)) {
            goto AV;
        }
        if ($this->oauthUtility->check_plan(2)) {
            goto q9;
        }
        $Oo = 1;
        goto n7;
        AV:
        $Oo = 6;
        goto n7;
        q9:
        $Oo = 1;
        n7:
        goto a9;
        Vk:
        $Oo = $QY["\x6e\157\117\x66\x53\x75\x62\x53\151\164\x65\163"];
        a9:
        $this->oauthUtility->setStoreConfig(OAuthConstants::WEBSITES_LIMIT, $Oo);
        OC:
        switch ($QY["\163\x74\141\164\165\x73"]) {
            case "\x53\125\x43\103\105\x53\123":
                $this->_vlk_success($Xw);
                goto PK;
            default:
                $this->_vlk_fail();
                goto PK;
        }
        A8:
        PK:
        $this->oauthUtility->reinitConfig();
    }
    public function _vlk_success($zM)
    {
        $E6 = json_decode($this->oauthUtility->vml(trim($zM)), true);
        if (!(!is_array($E6) || !isset($E6["\163\x74\x61\x74\x75\x73"]) || empty($E6["\163\x74\x61\164\165\x73"]))) {
            goto wa;
        }
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY);
        return;
        wa:
        if (strcasecmp($E6["\163\164\141\x74\x75\x73"], "\x53\x55\x43\103\105\123\x53") == 0) {
            goto Kn;
        }
        if (strcasecmp($E6["\163\x74\x61\x74\x75\163"], "\x46\x41\x49\x4c\105\x44") == 0) {
            goto Kf;
        }
        $this->messageManager->addErrorMessage(OAuthMessages::ERROR_OCCURRED);
        goto t2;
        Kn:
        $this->oauthUtility->reinitConfig();
        $ed = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN);
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_LK, AESEncryption::encrypt_data(trim($zM), $ed));
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("\x74\162\x75\145", $ed));
        $this->messageManager->addSuccessMessage(OAuthMessages::LICENSE_VERIFIED);
        goto t2;
        Kf:
        if (strcasecmp($E6["\x6d\145\163\163\141\x67\145"], "\103\157\x64\145\40\x68\141\163\x20\x45\x78\160\x69\162\x65\144") == 0) {
            goto uS;
        }
        $this->messageManager->addErrorMessage(OAuthMessages::ENTERED_INVALID_KEY);
        goto tD;
        uS:
        $this->messageManager->addErrorMessage(OAuthMessages::LICENSE_KEY_IN_USE);
        tD:
        t2:
    }
    public function _vlk_fail()
    {
        $ed = $this->oauthUtility->getStoreConfig(OAuthConstants::TOKEN);
        $this->oauthUtility->setStoreConfig(OAuthConstants::OAUTH_CKL, AESEncryption::encrypt_data("\x66\141\x6c\x73\x65", $ed));
        $this->messageManager->addErrorMessage(OAuthMessages::NOT_UPGRADED_YET);
    }
    public function extendTrial()
    {
        $this->oauthUtility->extendTrial();
    }
}

Function Calls

None

Variables

None

Stats

MD5 71eb3babde0fccab854b379f9bb1a3e2
Eval Count 0
Decode Time 48 ms