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

Decoded Output download

<?php 
 
 
namespace MiniOrange\TwoFA\Controller\Actions; 
 
use MiniOrange\TwoFA\Helper\Curl; 
use MiniOrange\TwoFA\Helper\TwoFAConstants; 
use MiniOrange\TwoFA\Helper\TwoFAMessages; 
use MiniOrange\TwoFA\Controller\Actions\BaseAdminAction; 
use MiniOrange\TwoFA\Helper\AESEncryption; 
class LKAction extends BaseAdminAction 
{ 
    private $REQUEST; 
    public function removeAccount() 
    { 
        $this->twofautility->setStoreConfig(TwoFAConstants::REG_STATUS, TwoFAConstants::STATUS_VERIFY_LOGIN); 
        if (!$this->twofautility->micr()) { 
            goto NT; 
        } 
        $k6 = $this->twofautility->getStoreConfig(TwoFAConstants::TOKEN); 
        $P8 = AESEncryption::decrypt_data($this->twofautility->getStoreConfig(TwoFAConstants::SAMLSP_LK), $k6); 
        $ce = json_decode($this->twofautility->update_status(trim($P8)), true); 
        if (!(strcasecmp($ce["status"], "SUCCESS") == 0)) { 
            goto q0; 
        } 
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_EMAIL, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_KEY, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::API_KEY, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::TOKEN, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::PLAN_VERIFIED, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_LK, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::REG_STATUS, TwoFAConstants::STATUS_VERIFY_LOGIN); 
        $this->twofautility->removeSettingsAfterAccount(); 
        $this->twofautility->reinitconfig(); 
        q0: 
        NT: 
        if (!$this->twofautility->mclv()) { 
            goto z5; 
        } 
        $this->twofautility->mius(); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_LK, ''); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, ''); 
        z5: 
        $this->twofautility->flushCache(''); 
    } 
    public function setRequestParam($bC) 
    { 
        $this->REQUEST = $bC; 
        return $this; 
    } 
    public function execute() 
    { 
        $this->checkIfRequiredFieldsEmpty(array("lk" => $this->REQUEST)); 
        $U0 = $this->REQUEST["lk"]; 
        $DN = json_decode(json_encode($this->twofautility->ccl()), true); 
        switch ($DN["status"]) { 
            case "SUCCESS": 
                $this->_vlk_success($U0); 
                goto FZ; 
            default: 
                $this->_vlk_fail(); 
                goto FZ; 
        } 
        Pf: 
        FZ: 
        $this->twofautility->reinitConfig(); 
    } 
    public function _vlk_success($P8) 
    { 
        $ce = json_decode($this->twofautility->vml(trim($P8)), true); 
        if (!(!is_array($ce) || !isset($ce["status"]) || empty($ce["status"]))) { 
            goto Gz; 
        } 
        $this->messageManager->addErrorMessage(TwoFAMessages::ENTERED_INVALID_KEY); 
        return; 
        Gz: 
        if (strcasecmp($ce["status"], "SUCCESS") == 0) { 
            goto df; 
        } 
        if (strcasecmp($ce["status"], "FAILED") == 0) { 
            goto mV; 
        } 
        $this->messageManager->addErrorMessage(TwoFAMessages::ERROR_OCCURRED); 
        goto AO; 
        df: 
        $this->twofautility->reinitConfig(); 
        $XV = $this->twofautility->getStoreConfig(TwoFAConstants::TOKEN); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_LK, AESEncryption::encrypt_data($P8, $XV)); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, AESEncryption::encrypt_data("true", $XV)); 
        $this->twofautility->setStoreConfig(TwoFAConstants::PLAN_VERIFIED, 1); 
        $this->messageManager->addSuccessMessage(TwoFAMessages::LICENSE_VERIFIED); 
        goto AO; 
        mV: 
        if (strcasecmp($ce["message"], "Code has Expired") == 0) { 
            goto MR; 
        } 
        $this->messageManager->addErrorMessage(TwoFAMessages::ENTERED_INVALID_KEY); 
        goto FY; 
        MR: 
        $this->messageManager->addErrorMessage(TwoFAMessages::LICENSE_KEY_IN_USE); 
        FY: 
        AO: 
    } 
    public function _vlk_fail() 
    { 
        $XV = $this->twofautility->getStoreConfig(TwoFAConstants::TOKEN); 
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, AESEncryption::encrypt_data("false", $XV)); 
        $this->messageManager->addErrorMessage(TwoFAMessages::NOT_UPGRADED_YET); 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace MiniOrange\TwoFA\Controller\Actions;

use MiniOrange\TwoFA\Helper\Curl;
use MiniOrange\TwoFA\Helper\TwoFAConstants;
use MiniOrange\TwoFA\Helper\TwoFAMessages;
use MiniOrange\TwoFA\Controller\Actions\BaseAdminAction;
use MiniOrange\TwoFA\Helper\AESEncryption;
class LKAction extends BaseAdminAction
{
    private $REQUEST;
    public function removeAccount()
    {
        $this->twofautility->setStoreConfig(TwoFAConstants::REG_STATUS, TwoFAConstants::STATUS_VERIFY_LOGIN);
        if (!$this->twofautility->micr()) {
            goto NT;
        }
        $k6 = $this->twofautility->getStoreConfig(TwoFAConstants::TOKEN);
        $P8 = AESEncryption::decrypt_data($this->twofautility->getStoreConfig(TwoFAConstants::SAMLSP_LK), $k6);
        $ce = json_decode($this->twofautility->update_status(trim($P8)), true);
        if (!(strcasecmp($ce["\163\164\x61\x74\x75\x73"], "\x53\x55\103\x43\105\x53\x53") == 0)) {
            goto q0;
        }
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_EMAIL, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_KEY, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::API_KEY, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::TOKEN, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::PLAN_VERIFIED, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_LK, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::REG_STATUS, TwoFAConstants::STATUS_VERIFY_LOGIN);
        $this->twofautility->removeSettingsAfterAccount();
        $this->twofautility->reinitconfig();
        q0:
        NT:
        if (!$this->twofautility->mclv()) {
            goto z5;
        }
        $this->twofautility->mius();
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_LK, '');
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, '');
        z5:
        $this->twofautility->flushCache('');
    }
    public function setRequestParam($bC)
    {
        $this->REQUEST = $bC;
        return $this;
    }
    public function execute()
    {
        $this->checkIfRequiredFieldsEmpty(array("\x6c\153" => $this->REQUEST));
        $U0 = $this->REQUEST["\x6c\x6b"];
        $DN = json_decode(json_encode($this->twofautility->ccl()), true);
        switch ($DN["\x73\x74\x61\x74\x75\163"]) {
            case "\x53\x55\103\103\105\123\x53":
                $this->_vlk_success($U0);
                goto FZ;
            default:
                $this->_vlk_fail();
                goto FZ;
        }
        Pf:
        FZ:
        $this->twofautility->reinitConfig();
    }
    public function _vlk_success($P8)
    {
        $ce = json_decode($this->twofautility->vml(trim($P8)), true);
        if (!(!is_array($ce) || !isset($ce["\163\x74\141\x74\165\x73"]) || empty($ce["\x73\164\141\x74\165\x73"]))) {
            goto Gz;
        }
        $this->messageManager->addErrorMessage(TwoFAMessages::ENTERED_INVALID_KEY);
        return;
        Gz:
        if (strcasecmp($ce["\x73\164\141\164\165\163"], "\x53\125\x43\103\x45\123\123") == 0) {
            goto df;
        }
        if (strcasecmp($ce["\163\164\x61\164\165\x73"], "\106\x41\111\x4c\105\x44") == 0) {
            goto mV;
        }
        $this->messageManager->addErrorMessage(TwoFAMessages::ERROR_OCCURRED);
        goto AO;
        df:
        $this->twofautility->reinitConfig();
        $XV = $this->twofautility->getStoreConfig(TwoFAConstants::TOKEN);
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_LK, AESEncryption::encrypt_data($P8, $XV));
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, AESEncryption::encrypt_data("\x74\x72\x75\x65", $XV));
        $this->twofautility->setStoreConfig(TwoFAConstants::PLAN_VERIFIED, 1);
        $this->messageManager->addSuccessMessage(TwoFAMessages::LICENSE_VERIFIED);
        goto AO;
        mV:
        if (strcasecmp($ce["\x6d\x65\163\163\x61\x67\145"], "\103\x6f\x64\145\40\150\x61\163\x20\105\170\160\151\x72\145\144") == 0) {
            goto MR;
        }
        $this->messageManager->addErrorMessage(TwoFAMessages::ENTERED_INVALID_KEY);
        goto FY;
        MR:
        $this->messageManager->addErrorMessage(TwoFAMessages::LICENSE_KEY_IN_USE);
        FY:
        AO:
    }
    public function _vlk_fail()
    {
        $XV = $this->twofautility->getStoreConfig(TwoFAConstants::TOKEN);
        $this->twofautility->setStoreConfig(TwoFAConstants::SAMLSP_CKL, AESEncryption::encrypt_data("\x66\x61\x6c\x73\x65", $XV));
        $this->messageManager->addErrorMessage(TwoFAMessages::NOT_UPGRADED_YET);
    }
}

Function Calls

None

Variables

None

Stats

MD5 94e68c0f394ef19a03210cd58c6cd681
Eval Count 0
Decode Time 69 ms