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\Adminhtml\Account; use Magento\Backend..

Decoded Output download

<?php 
 
 
namespace MiniOrange\TwoFA\Controller\Adminhtml\Account; 
 
use Magento\Backend\App\Action\Context; 
use MiniOrange\TwoFA\Helper\TwoFAConstants; 
use MiniOrange\TwoFA\Helper\TwoFAMessages; 
use MiniOrange\TwoFA\Controller\Actions\BaseAdminAction; 
use MiniOrange\TwoFA\Helper\Curl; 
class Index extends BaseAdminAction 
{ 
    private $options = array("registerNewUser", "loginExistingUser", "removeAccount", "verifyLicenseKey"); 
    private $registerNewUserAction; 
    private $loginExistingUserAction; 
    private $lkAction; 
    public function __construct(\Magento\Backend\App\Action\Context $bs, \Magento\Framework\View\Result\PageFactory $RB, \MiniOrange\TwoFA\Helper\TwoFAUtility $BV, \Magento\Framework\Message\ManagerInterface $AG, \Psr\Log\LoggerInterface $Rx, \MiniOrange\TwoFA\Controller\Actions\LKAction $vC, \MiniOrange\TwoFA\Controller\Actions\RegisterNewUserAction $tr, \MiniOrange\TwoFA\Controller\Actions\LoginExistingUserAction $P5) 
    { 
        parent::__construct($bs, $RB, $BV, $AG, $Rx); 
        $this->registerNewUserAction = $tr; 
        $this->loginExistingUserAction = $P5; 
        $this->lkAction = $vC; 
    } 
    public function execute() 
    { 
        try { 
            $HP = $this->getRequest()->getParams(); 
            if (!$this->isFormOptionBeingSaved($HP)) { 
                goto DK; 
            } 
            $Te = array_values($HP); 
            $x8 = array_intersect($Te, $this->options); 
            if (!(count($x8) > 0)) { 
                goto n0; 
            } 
            $this->_route_data(array_values($x8)[0], $HP); 
            $this->twofautility->flushCache(); 
            n0: 
            $this->twofautility->reinitConfig(); 
            DK: 
        } catch (\Exception $qW) { 
            $this->messageManager->addErrorMessage($qW->getMessage()); 
            $this->logger->debug($qW->getMessage()); 
        } 
        $HE = $this->resultPageFactory->create(); 
        $HE->setActiveMenu(TwoFAConstants::MODULE_DIR . TwoFAConstants::MODULE_BASE); 
        $HE->addBreadcrumb(__("Account Settings"), __("Account Settings")); 
        $HE->getConfig()->getTitle()->prepend(__(TwoFAConstants::MODULE_TITLE)); 
        return $HE; 
    } 
    private function _route_data($av, $HP) 
    { 
        switch ($av) { 
            case $this->options[0]: 
                $this->registerNewUserAction->setRequestParam($HP)->execute(); 
                goto Au; 
            case $this->options[1]: 
                $this->loginExistingUserAction->setRequestParam($HP)->execute(); 
                goto Au; 
            case $this->options[2]: 
                $this->lkAction->setRequestParam($HP)->removeAccount(); 
                goto Au; 
            case $this->options[3]: 
                $this->lkAction->setRequestParam($HP)->execute(); 
        } 
        za: 
        Au: 
    } 
    protected function _isAllowed() 
    { 
        return $this->_authorization->isAllowed(TwoFAConstants::MODULE_DIR . TwoFAConstants::MODULE_ACCOUNT); 
    } 
    private function goBackToRegistrationPage() 
    { 
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_EMAIL, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_KEY, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::API_KEY, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::INVOKE_INLINE_REGISTERATION, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::TOKEN, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_PHONE, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::REG_STATUS, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::TXT_ID, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::MODULE_TFA, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::LK_NO_OF_USERS, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::LK_VERIFY, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::KBA_METHOD, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_EMAIL, NULL); 
        $this->twofautility->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_SMS, NULL); 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace MiniOrange\TwoFA\Controller\Adminhtml\Account;

use Magento\Backend\App\Action\Context;
use MiniOrange\TwoFA\Helper\TwoFAConstants;
use MiniOrange\TwoFA\Helper\TwoFAMessages;
use MiniOrange\TwoFA\Controller\Actions\BaseAdminAction;
use MiniOrange\TwoFA\Helper\Curl;
class Index extends BaseAdminAction
{
    private $options = array("\162\145\147\151\x73\x74\x65\162\116\x65\x77\125\x73\145\x72", "\x6c\157\x67\151\156\x45\170\151\x73\x74\151\156\x67\125\163\x65\162", "\162\x65\155\157\x76\145\101\x63\x63\x6f\x75\x6e\164", "\166\145\x72\x69\x66\171\114\151\143\145\156\x73\x65\113\x65\171");
    private $registerNewUserAction;
    private $loginExistingUserAction;
    private $lkAction;
    public function __construct(\Magento\Backend\App\Action\Context $bs, \Magento\Framework\View\Result\PageFactory $RB, \MiniOrange\TwoFA\Helper\TwoFAUtility $BV, \Magento\Framework\Message\ManagerInterface $AG, \Psr\Log\LoggerInterface $Rx, \MiniOrange\TwoFA\Controller\Actions\LKAction $vC, \MiniOrange\TwoFA\Controller\Actions\RegisterNewUserAction $tr, \MiniOrange\TwoFA\Controller\Actions\LoginExistingUserAction $P5)
    {
        parent::__construct($bs, $RB, $BV, $AG, $Rx);
        $this->registerNewUserAction = $tr;
        $this->loginExistingUserAction = $P5;
        $this->lkAction = $vC;
    }
    public function execute()
    {
        try {
            $HP = $this->getRequest()->getParams();
            if (!$this->isFormOptionBeingSaved($HP)) {
                goto DK;
            }
            $Te = array_values($HP);
            $x8 = array_intersect($Te, $this->options);
            if (!(count($x8) > 0)) {
                goto n0;
            }
            $this->_route_data(array_values($x8)[0], $HP);
            $this->twofautility->flushCache();
            n0:
            $this->twofautility->reinitConfig();
            DK:
        } catch (\Exception $qW) {
            $this->messageManager->addErrorMessage($qW->getMessage());
            $this->logger->debug($qW->getMessage());
        }
        $HE = $this->resultPageFactory->create();
        $HE->setActiveMenu(TwoFAConstants::MODULE_DIR . TwoFAConstants::MODULE_BASE);
        $HE->addBreadcrumb(__("\101\143\x63\x6f\x75\156\164\x20\123\145\164\x74\x69\156\x67\x73"), __("\x41\143\143\157\x75\x6e\164\x20\x53\145\164\164\x69\x6e\147\x73"));
        $HE->getConfig()->getTitle()->prepend(__(TwoFAConstants::MODULE_TITLE));
        return $HE;
    }
    private function _route_data($av, $HP)
    {
        switch ($av) {
            case $this->options[0]:
                $this->registerNewUserAction->setRequestParam($HP)->execute();
                goto Au;
            case $this->options[1]:
                $this->loginExistingUserAction->setRequestParam($HP)->execute();
                goto Au;
            case $this->options[2]:
                $this->lkAction->setRequestParam($HP)->removeAccount();
                goto Au;
            case $this->options[3]:
                $this->lkAction->setRequestParam($HP)->execute();
        }
        za:
        Au:
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed(TwoFAConstants::MODULE_DIR . TwoFAConstants::MODULE_ACCOUNT);
    }
    private function goBackToRegistrationPage()
    {
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_EMAIL, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_KEY, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::API_KEY, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::INVOKE_INLINE_REGISTERATION, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::TOKEN, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::CUSTOMER_PHONE, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::REG_STATUS, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::TXT_ID, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::MODULE_TFA, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::LK_NO_OF_USERS, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::LK_VERIFY, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::KBA_METHOD, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_EMAIL, NULL);
        $this->twofautility->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_SMS, NULL);
    }
}

Function Calls

None

Variables

None

Stats

MD5 99d5e89086a96dd89f1446c0f39b3421
Eval Count 0
Decode Time 69 ms