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\Helper; use Magento\Customer\Model\CustomerFactor..

Decoded Output download

<?php 
 
 
namespace MiniOrange\TwoFA\Helper; 
 
use Magento\Customer\Model\CustomerFactory; 
use Magento\Customer\Model\Session; 
use Magento\Framework\App\Cache\Frontend\Pool; 
use Magento\Framework\App\Cache\TypeListInterface; 
use Magento\Framework\App\Config\ScopeConfigInterface; 
use Magento\Framework\App\Config\Storage\WriterInterface; 
use Magento\Framework\Filesystem\Driver\File; 
use Magento\Framework\Url; 
use Magento\Framework\UrlInterface; 
use Magento\Framework\View\Asset\Repository; 
use Magento\Framework\App\ResourceConnection; 
use Magento\User\Model\UserFactory; 
use MiniOrange\TwoFA\Helper\TwoFAConstants; 
use MiniOrange\TwoFA\Helper\Curl; 
use MiniOrange\TwoFA\Helper\Data; 
use Magento\Backend\Block\Template\Context; 
use Magento\Authorization\Model\UserContextInterface; 
use Magento\User\Model\ResourceModel\User\CollectionFactory as UserCollectionFactory; 
use MiniOrange\TwoFA\Helper\AESEncryption; 
use Magento\Customer\Model\Customer; 
use MiniOrange\TwoFA\Model\IpWhitelistedFactory; 
use MiniOrange\TwoFA\Model\IpWhitelistedAdminFactory; 
class TwoFAUtility extends Data 
{ 
    protected $adminSession; 
    protected $customerSession; 
    protected $authSession; 
    protected $cacheTypeList; 
    protected $resource; 
    protected $cacheFrontendPool; 
    protected $fileSystem; 
    protected $logger; 
    protected $reinitableConfig; 
    protected $coreSession; 
    protected $userContext; 
    private $userCollectionFactory; 
    private $userFactory; 
    protected $dir; 
    protected $data = []; 
    private $customerModel; 
    protected $storeManager; 
    protected $groupRepository; 
    protected $ipWhitelistedFactory; 
    protected $ipWhitelistedAdminFactory; 
    protected $_websiteCollectionFactory; 
    private $url; 
    private $resultFactory; 
    public function __construct(ScopeConfigInterface $gO, UserFactory $HZ, CustomerFactory $IQ, UrlInterface $IP, WriterInterface $J2, \Magento\Framework\App\ResourceConnection $TC, Repository $rV, \Magento\Backend\Helper\Data $ZE, Url $AE, \Magento\Backend\Model\Session $Dt, Session $Ms, \Magento\Backend\Model\Auth\Session $pY, \Magento\Framework\App\Config\ReinitableConfigInterface $zA, \Magento\Framework\Session\SessionManagerInterface $XJ, TypeListInterface $UA, Pool $lv, \Psr\Log\LoggerInterface $Rx, File $gl, UserContextInterface $dI, UserCollectionFactory $lH, \Magento\User\Model\UserFactory $Zd, \Magento\Framework\Filesystem\DirectoryList $PA, \Magento\Store\Model\StoreManagerInterface $nN, Customer $ue, \Magento\Customer\Api\GroupRepositoryInterface $pr, \Magento\Store\Model\ResourceModel\Website\CollectionFactory $vL, IpWhitelistedFactory $VW, IpWhitelistedAdminFactory $sl, \Magento\Framework\UrlInterface $jv, \Magento\Framework\Controller\ResultFactory $Y1) 
    { 
        $this->adminSession = $Dt; 
        $this->customerSession = $Ms; 
        $this->authSession = $pY; 
        $this->cacheTypeList = $UA; 
        $this->resource = $TC; 
        $this->cacheFrontendPool = $lv; 
        $this->fileSystem = $gl; 
        $this->logger = $Rx; 
        $this->dir = $PA; 
        $this->reinitableConfig = $zA; 
        $this->coreSession = $XJ; 
        $this->userContext = $dI; 
        $this->userFactory = $Zd; 
        $this->userCollectionFactory = $lH; 
        $this->storeManager = $nN; 
        $this->customerModel = $ue; 
        $this->groupRepository = $pr; 
        $this->_websiteCollectionFactory = $vL; 
        $this->ipWhitelistedFactory = $VW; 
        $this->ipWhitelistedAdminFactory = $sl; 
        $this->url = $jv; 
        $this->resultFactory = $Y1; 
        parent::__construct($gO, $HZ, $IQ, $IP, $J2, $rV, $ZE, $AE); 
    } 
    public function get_customer_detailss() 
    { 
        $sQ = $this->customerSession; 
        $pe = $sQ->getName(); 
        $Xs = $sQ->getId(); 
        return $pe; 
    } 
    public function get_all_websites() 
    { 
        $ZQ = $this->_websiteCollectionFactory->create(); 
        return $ZQ; 
    } 
    public function get_current_websiteId() 
    { 
        $qu = $this->getStoreConfig(TwoFAConstants::SELECTED_WEBSITE_FOR_SETTING); 
        if (!($qu == NULL)) { 
            goto qV; 
        } 
        $W6 = $this->get_all_websites(); 
        foreach ($W6 as $An) { 
            $qu = $An->getId(); 
            goto af; 
            xZ: 
        } 
        af: 
        qV: 
        return $qu; 
    } 
    public function getHiddenPhone($xh) 
    { 
        $U9 = "xxxxxxx" . substr($xh, strlen($xh) - 3); 
        return $U9; 
    } 
    public function isBlank($Dz) 
    { 
        if (!(!isset($Dz) || empty($Dz))) { 
            goto W8; 
        } 
        return true; 
        W8: 
        return false; 
    } 
    public function getCompleteSession() 
    { 
        $this->coreSession->start(); 
        $bB = $this->coreSession->getMyTestValue(); 
        return $bB !== null ? $bB : array(); 
    } 
    public function getSessionValue($XV) 
    { 
        $dY = $this->getCompleteSession(); 
        return isset($dY[$XV]) ? $dY[$XV] : null; 
    } 
    public function setSessionValue($XV, $Dz) 
    { 
        $dY = $this->getCompleteSession(); 
        $dY[$XV] = $Dz; 
        $this->coreSession->setMyTestValue($dY); 
    } 
    public function get_admin_role_name() 
    { 
        $ZQ = $this->userCollectionFactory->create(); 
        $Rm = $this->getSessionValue("admin_user_id"); 
        if (!($Rm == NULL && $this->authSession->isLoggedIn())) { 
            goto ig; 
        } 
        $W8 = $this->authSession->getUser(); 
        $Rm = $W8->getId(); 
        ig: 
        $ZQ->addFieldToFilter("main_table.user_id", $Rm); 
        $eb = $ZQ->getFirstItem(); 
        $gL = $eb->getData(); 
        $tm = $gL["role_name"]; 
        return $tm; 
    } 
    public function isCustomerRegistered() 
    { 
        $zb = $this->getCustomerDetails(); 
        return !isset($zb["email"]) && ($zb["email"] === NULL || empty($zb["email"])) ? false : true; 
    } 
    public function getCustomerDetails() 
    { 
        $hc = $this->getStoreConfig(TwoFAConstants::CUSTOMER_EMAIL); 
        $nR = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        $Mq = $this->getStoreConfig(TwoFAConstants::API_KEY); 
        $yA = $this->getStoreConfig(TwoFAConstants::TOKEN); 
        $zb = array("email" => $hc, "customer_Key" => $nR, "api_Key" => $Mq, "token" => $yA); 
        return $zb; 
    } 
    public function isCurlInstalled() 
    { 
        if (in_array("curl", get_loaded_extensions())) { 
            goto Su; 
        } 
        return 0; 
        goto pv; 
        Su: 
        return 1; 
        pv: 
    } 
    public function validatePhoneNumber($xh) 
    { 
        if (!preg_match(MoIDPConstants::PATTERN_PHONE, $xh, $ar)) { 
            goto rS; 
        } 
        return true; 
        goto e7; 
        rS: 
        return false; 
        e7: 
    } 
    public function getHiddenEmail($hc) 
    { 
        if (!(!isset($hc) || trim($hc) === '')) { 
            goto nf; 
        } 
        return ''; 
        nf: 
        $tR = strlen($hc); 
        $AC = substr($hc, 0, 1); 
        $oE = strrpos($hc, "@"); 
        $Lf = substr($hc, $oE - 1, $tR); 
        $Iv = 1; 
        k_: 
        if (!($Iv < $oE)) { 
            goto D0; 
        } 
        $AC = $AC . "x"; 
        Q6: 
        $Iv++; 
        goto k_; 
        D0: 
        $y0 = $AC . $Lf; 
        return $y0; 
    } 
    public function getAdminSession() 
    { 
        return $this->adminSession; 
    } 
    public function setAdminSessionData($XV, $Dz) 
    { 
        return $this->adminSession->setData($XV, $Dz); 
    } 
    public function getImageUrl($NT) 
    { 
        return $this->assetRepo->getUrl(TwoFAConstants::MODULE_DIR . TwoFAConstants::MODULE_IMAGES . $NT); 
    } 
    public function tfaMethodArray() 
    { 
        return array("OOS" => array("name" => "OTP Over SMS", "description" => "Enter the One Time Passcode sent to your phone to login."), "OOE" => array("name" => "OTP Over Email", "description" => "Enter the One Time Passcode sent to your email to login."), "OOSE" => array("name" => "OTP Over SMS and Email", "description" => "Enter the One Time Passcode sent to your phone and email to login."), "GoogleAuthenticator" => array("name" => "Google Authenticator", "description" => "Enter the soft token from the account in your Google Authenticator App to login."), "MicrosoftAuthenticator" => array("name" => "Microsoft Authenticator", "description" => "Enter the soft token from the account in your Microsoft Authenticator App to login."), "OktaVerify" => array("name" => "Okta Verify", "description" => "You have to scan the QR code from Okta Verify App and enter code generated by app to login. Supported in Smartphones only."), "DuoAuthenticator" => array("name" => "Duo Authenticator", "description" => "You have to scan the QR code from Duo Authenticator App and enter code generated by app to login. Supported in Smartphones only."), "AuthyAuthenticator" => array("name" => "Authy Authenticator", "description" => "You have to scan the QR code from Authy Authenticator App and enter code generated by app to login. Supported in Smartphones only."), "LastPassAuthenticator" => array("name" => "LastPass Authenticator", "description" => "You have to scan the QR code from LastPass Authenticator App and enter code generated by app to login. Supported in Smartphones only."), "QRCodeAuthenticator" => array("name" => "QR Code Authentication", "description" => "You have to scan the QR Code from your phone using miniOrange Authenticator App to login. Supported in Smartphones only."), "KBA" => array("name" => "Security Questions (KBA)", "description" => "You have to answers some knowledge based security questions which are only known to you to authenticate yourself."), "OOP" => array("name" => "OTP Over Phone", "description" => "You will receive a one time passcode via phone call. You have to enter the otp on your screen to login. Supported in Smartphones, Feature Phones."), "YubikeyHardwareToken" => array("name" => "Yubikey Hardware Token", "description" => "You can press the button on your yubikey Hardware token which generate a random key. You can use that key to authenticate yourself."), "PushNotificationsr" => array("name" => "Push Notifications", "description" => "You will receive a push notification on your phone. You have to ACCEPT or DENY it to login. Supported in Smartphones only."), "SoftToken" => array("name" => "Soft Token", "description" => "You have to enter passcode generated by miniOrange Authenticator App to login. Supported in Smartphones only."), "EmailVerification" => array("name" => "Email Verification", "description" => "You will receive an email with link. You have to click the ACCEPT or DENY link to verify your email. Supported in Desktops, Laptops, Smartphones.")); 
    } 
    public static function isFirstUser($YG) 
    { 
        $zb = self::getCustomerDetails(); 
        return $zb["jid"] == $YG; 
    } 
    public function AuthenticatorUrl() 
    { 
        $this->log_debug("Inside authenticator url"); 
        if ($this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE)) { 
            goto Vl; 
        } 
        $NZ = $this->getCurrentAdminUser()->getUsername(); 
        goto cU; 
        Vl: 
        $NZ = $this->getSessionValue(TwoFAConstants::ADMIN_USERNAME); 
        cU: 
        $lE = $this->helperBackend->getAreaFrontName(); 
        $hY = $this->urlInterface->getCurrentUrl(); 
        if (strpos($hY, $lE) !== false) { 
            goto px; 
        } 
        $rn = $this->getCustomerMoTfaUserDetails("miniorange_tfa_users", $NZ); 
        goto jI; 
        px: 
        $rn = $this->getAllMoTfaUserDetails("miniorange_tfa_users", $NZ, -1); 
        jI: 
        $iL = $this->getAuthenticatorSecret($NZ); 
        $WU = $this->getSessionValue(TwoFAConstants::PRE_SECRET); 
        if (!$this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE)) { 
            goto rj; 
        } 
        $WU = $this->getSessionValue(TwoFAConstants::ADMIN_SECRET); 
        rj: 
        if (!(!is_array($rn) || sizeof($rn) <= 0)) { 
            goto jU; 
        } 
        if ($WU == NULL) { 
            goto d9; 
        } 
        $iL = $WU; 
        goto OI; 
        d9: 
        $iL = $this->generateRandomString(); 
        $this->setSessionValue(TwoFAConstants::PRE_SECRET, $iL); 
        OI: 
        jU: 
        $B_ = $this->AuthenticatorIssuer(); 
        $jv = "otpauth://totp/"; 
        $jv .= $NZ . "?secret=" . $iL . "&issuer=" . $B_; 
        return $jv; 
    } 
    public function AuthenticatorCustomerUrl() 
    { 
        $this->log_debug("inside authenticator customer url"); 
        $hc = $_COOKIE["mousername"]; 
        if (is_null($hc)) { 
            goto PB; 
        } 
        $WU = $this->getSessionValue("customer_inline_secret"); 
        if ($WU == NULL) { 
            goto Dg; 
        } 
        $iL = $WU; 
        goto eI; 
        Dg: 
        $iL = $this->generateRandomString(); 
        $this->setSessionValue("customer_inline_secret", $iL); 
        eI: 
        $B_ = $this->AuthenticatorIssuer(); 
        $jv = "otpauth://totp/"; 
        $jv .= $hc . "?secret=" . $iL . "&issuer=" . $B_; 
        return $jv; 
        goto DG; 
        PB: 
        return false; 
        DG: 
    } 
    public function AuthenticatorIssuer() 
    { 
        $Tm = $this->getStoreConfig(TwoFAConstants::TwoFA_AUTHENTICATOR_ISSUER); 
        return $Tm != NULL && $Tm != '' ? $Tm : "miniOrange"; 
    } 
    public function getAuthenticatorSecret($u2) 
    { 
        $this->log_debug("Inside getAuthenticatorSecret. generating secret"); 
        $lE = $this->helperBackend->getAreaFrontName(); 
        $hY = $this->urlInterface->getCurrentUrl(); 
        if (strpos($hY, $lE) !== false) { 
            goto LN; 
        } 
        $rn = $this->getCustomerMoTfaUserDetails("miniorange_tfa_users", $u2); 
        goto Kg; 
        LN: 
        $rn = $this->getAllMoTfaUserDetails("miniorange_tfa_users", $u2, -1); 
        Kg: 
        if (is_array($rn) && sizeof($rn) > 0) { 
            goto qH; 
        } 
        return false; 
        goto cl; 
        qH: 
        return isset($rn[0]["secret"]) ? $rn[0]["secret"] : false; 
        cl: 
    } 
    function generateRandomString($q4 = 16) 
    { 
        $pT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
        $zY = strlen($pT); 
        $CH = ''; 
        $Iv = 0; 
        aJ: 
        if (!($Iv < $q4)) { 
            goto VD; 
        } 
        $CH .= $pT[rand(0, $zY - 1)]; 
        vW: 
        $Iv++; 
        goto aJ; 
        VD: 
        return $CH; 
    } 
    public function getCustomerSecret() 
    { 
        return $this->getSessionValue("customer_inline_secret"); 
    } 
    public function getAdminSecret() 
    { 
        $WU = $this->getSessionValue(TwoFAConstants::PRE_SECRET); 
        if (!$this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE)) { 
            goto OG; 
        } 
        $WU = $this->getSessionValue(TwoFAConstants::ADMIN_SECRET); 
        OG: 
        return $WU; 
    } 
    public function getCustomerKeys($b_ = false) 
    { 
        $Te = array(); 
        if ($b_) { 
            goto wP; 
        } 
        $zb = self::getCustomerDetails(); 
        $Te["customer_key"] = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        $Te["apiKey"] = $Mq = $this->getStoreConfig(TwoFAConstants::API_KEY); 
        goto xf; 
        wP: 
        $Te["customer_key"] = "16555"; 
        $Te["apiKey"] = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq"; 
        xf: 
        return $Te; 
    } 
    static function getTransactionName() 
    { 
        return "Magento 2FA Plugin"; 
    } 
    static function getApiUrls() 
    { 
        $UN = TwoFAConstants::HOSTNAME; 
        return array("challange" => $UN . "/moas/api/auth/challenge", "update" => $UN . "/moas/api/admin/users/update", "validate" => $UN . "/moas/api/auth/validate", "googleAuthService" => $UN . "/moas/api/auth/google-auth-secret", "googlevalidate" => $UN . "/moas/api/auth/validate-google-auth-secret", "createUser" => $UN . "/moas/api/admin/users/create", "kbaRegister" => $UN . "/moas/api/auth/register", "getUserInfo" => $UN . "/moas/api/admin/users/get", "feedback" => $UN . "/moas/api/notify/send"); 
    } 
    public function getAdminSessionData($XV, $rH = false) 
    { 
        return $this->adminSession->getData($XV, $rH); 
    } 
    public function setSessionData($XV, $Dz) 
    { 
        return $this->customerSession->setData($XV, $Dz); 
    } 
    public function getSessionData($XV, $rH = false) 
    { 
        return $this->customerSession->getData($XV, $rH); 
    } 
    public function setSessionValueForCurrentUser($XV, $Dz) 
    { 
        if ($this->customerSession->isLoggedIn()) { 
            goto R4; 
        } 
        if ($this->authSession->isLoggedIn()) { 
            goto BX; 
        } 
        goto QE; 
        R4: 
        $this->setSessionValue($XV, $Dz); 
        goto QE; 
        BX: 
        $this->setAdminSessionData($XV, $Dz); 
        QE: 
    } 
    public function isTwoFAConfigured() 
    { 
        $kH = $this->getStoreConfig(TwoFAConstants::AUTHORIZE_URL); 
        return $this->isBlank($kH) ? false : true; 
    } 
    public function removeSettingsAfterAccount() 
    { 
        $this->setStoreConfig(TwoFAConstants::CUSTOMER_EMAIL, NULL); 
        $this->setStoreConfig(TwoFAConstants::CUSTOMER_KEY, NULL); 
        $this->setStoreConfig(TwoFAConstants::API_KEY, NULL); 
        $this->setStoreConfig(TwoFAConstants::PLAN_VERIFIED, NULL); 
        $this->setStoreConfig(TwoFAConstants::INVOKE_INLINE_REGISTERATION, NULL); 
        $this->setStoreConfig(TwoFAConstants::TOKEN, NULL); 
        $this->setStoreConfig(TwoFAConstants::CUSTOMER_PHONE, NULL); 
        $this->setStoreConfig(TwoFAConstants::REG_STATUS, NULL); 
        $this->setStoreConfig(TwoFAConstants::TXT_ID, NULL); 
        $this->setStoreConfig(TwoFAConstants::MODULE_TFA, NULL); 
        $this->setStoreConfig(TwoFAConstants::LK_NO_OF_USERS, NULL); 
        $this->setStoreConfig(TwoFAConstants::LK_VERIFY, NULL); 
        $this->setStoreConfig(TwoFAConstants::KBA_METHOD, NULL); 
        $this->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_EMAIL, NULL); 
        $this->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_SMS, NULL); 
    } 
    public function isUserLoggedIn() 
    { 
        return $this->customerSession->isLoggedIn() || $this->authSession->isLoggedIn(); 
    } 
    public function getCurrentAdminUser() 
    { 
        return $this->authSession->getUser(); 
    } 
    public function getCurrentUser() 
    { 
        return $this->customerSession->getCustomer(); 
    } 
    public function getAdminLoginUrl() 
    { 
        return $this->getAdminUrl("adminhtml/auth/login"); 
    } 
    public function getAdminPageUrl() 
    { 
        return $this->getAdminBaseUrl(); 
    } 
    public function getCustomerLoginUrl() 
    { 
        return $this->getUrl("customer/account/login"); 
    } 
    public function getIsTestConfigurationClicked() 
    { 
        return $this->getStoreConfig(TwoFAConstants::IS_TEST); 
    } 
    public function getIsIp_for_CustomerClicked() 
    { 
        return $this->getStoreConfig(TwoFAConstants::IP_CUSTOMER); 
    } 
    public function getIsIp_for_AdminClicked() 
    { 
        return $this->getStoreConfig(TwoFAConstants::IP_ADMIN); 
    } 
    public function flushCache($j6 = '') 
    { 
        $bi = ["db_ddl"]; 
        foreach ($bi as $Ku) { 
            $this->cacheTypeList->cleanType($Ku); 
            cm: 
        } 
        yz: 
        foreach ($this->cacheFrontendPool as $NB) { 
            $NB->getBackend()->clean(); 
            BH: 
        } 
        kM: 
    } 
    public function getFileContents($p7) 
    { 
        return $this->fileSystem->fileGetContents($p7); 
    } 
    public function getRootDirectory() 
    { 
        return $this->dir->getRoot(); 
    } 
    public function putFileContents($p7, $AP) 
    { 
        $this->fileSystem->filePutContents($p7, $AP); 
    } 
    public function getLogoutUrl() 
    { 
        if (!$this->customerSession->isLoggedIn()) { 
            goto SN; 
        } 
        return $this->getUrl("customer/account/logout"); 
        SN: 
        if (!$this->authSession->isLoggedIn()) { 
            goto b4; 
        } 
        return $this->getAdminUrl("adminhtml/auth/logout"); 
        b4: 
        return "/"; 
    } 
    public function getCallBackUrl() 
    { 
        return $this->getBaseUrl() . TwoFAConstants::CALLBACK_URL; 
    } 
    public function removeSignInSettFings() 
    { 
        $this->setStoreConfig(TwoFAConstants::SHOW_CUSTOMER_LINK, 0); 
        $this->setStoreConfig(TwoFAConstants::SHOW_ADMIN_LINK, 0); 
    } 
    public function reinitConfig() 
    { 
        $this->reinitableConfig->reinit(); 
    } 
    public function micr() 
    { 
        $hc = $this->getStoreConfig(TwoFAConstants::CUSTOMER_EMAIL); 
        $XV = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        return !$this->isBlank($hc) && !$this->isBlank($XV) ? true : false; 
    } 
    public function mclv() 
    { 
        $k6 = $this->getStoreConfig(TwoFAConstants::TOKEN); 
        $f1 = AESEncryption::decrypt_data($this->getStoreConfig(TwoFAConstants::SAMLSP_CKL), $k6); 
        return $f1 == "true" ? TRUE : FALSE; 
    } 
    public function mius() 
    { 
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY); 
        $k6 = $this->getStoreConfig(TwoFAConstants::TOKEN); 
        $P8 = AESEncryption::decrypt_data($this->getStoreConfig(TwoFAConstants::SAMLSP_LK), $k6); 
        $ce = Curl::mius($D_, $sI, $P8); 
        return $ce; 
    } 
    public function vml($P8) 
    { 
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY); 
        $ce = Curl::vml($D_, $sI, $P8, $this->getBaseUrl()); 
        return $ce; 
    } 
    public function ccl() 
    { 
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY); 
        $ce = Curl::ccl($D_, $sI); 
        return $ce; 
    } 
    public function log_debug($qf = '', $aW = null) 
    { 
        if (!(!is_object($qf) && !is_array($qf))) { 
            goto YG; 
        } 
        $this->logger->info("MO TwoFA Premium Plan:" . $qf); 
        YG: 
        if (!(null !== $aW)) { 
            goto Uw; 
        } 
        if (is_object($aW) || is_array($aW)) { 
            goto qQ; 
        } 
        $this->logger->info($aW); 
        goto oB; 
        qQ: 
        oB: 
        Uw: 
    } 
    public function insertRowInTable($xC, $AP) 
    { 
        $this->log_debug("insert row "); 
        $this->resource->getConnection()->insertMultiple($xC, $AP); 
    } 
    public function updateColumnInTable($xC, $v8, $Vc, $wU, $ed, $N2) 
    { 
        $this->log_debug("updateColumnInTable"); 
        $pq = [$wU . " = ?" => $ed, "website_id = ?" => $N2]; 
        $this->resource->getConnection()->update($xC, [$v8 => $Vc], $pq); 
    } 
    public function getCustomerMoTfaUserDetails($xC, $NZ = false) 
    { 
        $qu = $this->storeManager->getStore()->getWebsiteId(); 
        $OF = $this->resource->getConnection()->select()->from($xC, ["username", "active_method", "configured_methods", "email", "phone", "transactionId", "secret", "id", "countrycode", "kba_method", "website_id", "skip_twofa", "whitelist_enabled"])->where("username='" . $NZ . "' and website_id='" . $qu . "'"); 
        $gM = $this->resource->getConnection()->fetchAll($OF); 
        return $gM; 
    } 
    public function getAllMoTfaUserDetails($xC, $NZ = false, $N2 = false) 
    { 
        $OF = $this->resource->getConnection()->select()->from($xC, ["username", "active_method", "configured_methods", "email", "phone", "transactionId", "secret", "id", "countrycode", "kba_method", "website_id"])->where("username='" . $NZ . "' and website_id='" . $N2 . "'"); 
        $gM = $this->resource->getConnection()->fetchAll($OF); 
        return $gM; 
    } 
    public function updateRowInTable($xC, $Qb, $wU, $ed) 
    { 
        $this->log_debug("updateRowInTable"); 
        $this->resource->getConnection()->update($xC, $Qb, [$wU . " = ?" => $ed]); 
    } 
    public function deleteRowInTable($xC, $wU, $ed) 
    { 
        $Ki = $this->resource->getConnection(); 
        $q0 = "DELETE FROM " . $xC . " WHERE " . $wU . "=" . $ed; 
        $Ki->exec($q0); 
    } 
    public function deleteRowInTableWithWebsiteID($xC, $wU, $ed, $N2) 
    { 
        $this->log_debug("deleteRowIntable"); 
        $Ki = $this->resource->getConnection(); 
        $q0 = "DELETE FROM " . $xC . " WHERE " . $wU . "='" . $ed . "' and website_id='" . $N2 . "'"; 
        $Ki->exec($q0); 
    } 
    public function getValueFromTableSQL($xC, $jG, $wU, $ed) 
    { 
        $Ax = $this->resource->getConnection(); 
        $mn = "SELECT " . $jG . " FROM " . $xC . " WHERE " . $wU . " = " . $ed; 
        $this->log_debug("SQL: " . $mn); 
        $DN = $Ax->fetchOne($mn); 
        $this->log_debug("result sql: " . $DN); 
        return $DN; 
    } 
    public function verifyGauthCode($P8, $u2, $bU = 3, $y9 = null) 
    { 
        $this->log_debug("TwoFAUtlity: verifyGauthCode: execute"); 
        $iL = $this->getAuthenticatorSecret($u2); 
        if (!($iL == false)) { 
            goto E8; 
        } 
        $iL = $this->getSessionValue(TwoFAConstants::PRE_SECRET); 
        E8: 
        $W_ = $this->getSessionValue(TwoFAConstants::CUSTOMER_INLINE); 
        if (!$W_) { 
            goto ZE; 
        } 
        $iL = $this->getSessionValue("customer_inline_secret"); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_SECRET, $iL); 
        ZE: 
        $sv = $this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE); 
        if (!$sv) { 
            goto tA; 
        } 
        $iL = $this->getSessionValue(TwoFAConstants::ADMIN_SECRET); 
        tA: 
        $Th = array("status" => "FALSE"); 
        if (!($y9 === null)) { 
            goto uZ; 
        } 
        $y9 = floor(time() / 30); 
        uZ: 
        if (!(strlen($P8) != 6)) { 
            goto yM; 
        } 
        return json_encode($Th); 
        yM: 
        $Iv = -$bU; 
        cf: 
        if (!($Iv <= $bU)) { 
            goto Zv; 
        } 
        $IX = $this->getCode($iL, $y9 + $Iv); 
        if (!$this->timingSafeEquals($IX, $P8)) { 
            goto EI; 
        } 
        $Th["status"] = "SUCCESS"; 
        return json_encode($Th); 
        EI: 
        fI: 
        ++$Iv; 
        goto cf; 
        Zv: 
        return json_encode($Th); 
    } 
    function timingSafeEquals($hA, $rF) 
    { 
        if (!function_exists("hash_equals")) { 
            goto HN; 
        } 
        return hash_equals($hA, $rF); 
        HN: 
        $Fa = strlen($hA); 
        $yn = strlen($rF); 
        if (!($yn != $Fa)) { 
            goto hD; 
        } 
        return false; 
        hD: 
        $DN = 0; 
        $Iv = 0; 
        sj: 
        if (!($Iv < $yn)) { 
            goto S2; 
        } 
        $DN |= ord($hA[$Iv]) ^ ord($rF[$Iv]); 
        G6: 
        ++$Iv; 
        goto sj; 
        S2: 
        return $DN === 0; 
    } 
    function getCode($iL, $KH = null) 
    { 
        if (!($KH === null)) { 
            goto C3; 
        } 
        $KH = floor(time() / 30); 
        C3: 
        $au = $this->_base32Decode($iL); 
        $Wj = chr(0) . chr(0) . chr(0) . chr(0) . pack("N*", $KH); 
        $OB = hash_hmac("SHA1", $Wj, $au, true); 
        $tp = ord(substr($OB, -1)) & 0xf; 
        $g6 = substr($OB, $tp, 4); 
        $Dz = unpack("N", $g6); 
        $Dz = $Dz[1]; 
        $Dz = $Dz & 0x7fffffff; 
        $rb = pow(10, 6); 
        return str_pad($Dz % $rb, 6, "0", STR_PAD_LEFT); 
    } 
    function _base32Decode($iL) 
    { 
        if (!empty($iL)) { 
            goto qG; 
        } 
        return ''; 
        qG: 
        $wJ = $this->_getBase32LookupTable(); 
        $oR = array_flip($wJ); 
        $Bd = substr_count($iL, $wJ[32]); 
        $dN = array(6, 4, 3, 1, 0); 
        if (in_array($Bd, $dN)) { 
            goto x3; 
        } 
        return false; 
        x3: 
        $Iv = 0; 
        J3: 
        if (!($Iv < 4)) { 
            goto rh; 
        } 
        if (!($Bd == $dN[$Iv] && substr($iL, -$dN[$Iv]) != str_repeat($wJ[32], $dN[$Iv]))) { 
            goto Cs; 
        } 
        return false; 
        Cs: 
        x2: 
        ++$Iv; 
        goto J3; 
        rh: 
        $iL = str_replace("=", '', $iL); 
        $iL = str_split($iL); 
        $CK = ''; 
        $Iv = 0; 
        ZW: 
        if (!($Iv < count($iL))) { 
            goto iw; 
        } 
        $b3 = ''; 
        if (in_array($iL[$Iv], $wJ)) { 
            goto vi; 
        } 
        return false; 
        vi: 
        $ro = 0; 
        o2: 
        if (!($ro < 8)) { 
            goto in; 
        } 
        $b3 .= str_pad(base_convert($oR[$iL[$Iv + $ro]], 10, 2), 5, "0", STR_PAD_LEFT); 
        fb: 
        ++$ro; 
        goto o2; 
        in: 
        $uC = str_split($b3, 8); 
        $JJ = 0; 
        PP: 
        if (!($JJ < count($uC))) { 
            goto k3; 
        } 
        $CK .= ($TY = chr(base_convert($uC[$JJ], 2, 10))) || ord($TY) == 48 ? $TY : ''; 
        tX: 
        ++$JJ; 
        goto PP; 
        k3: 
        AB: 
        $Iv = $Iv + 8; 
        goto ZW; 
        iw: 
        return $CK; 
    } 
    function _getBase32LookupTable() 
    { 
        return array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "2", "3", "4", "5", "6", "7", "="); 
    } 
    public function getCustomerPhoneFromEmail($hc = false) 
    { 
        $this->customerModel->setWebsiteId($this->storeManager->getStore()->getWebsiteId()); 
        $sQ = $this->customerModel->loadByEmail($hc); 
        if (!($sQ->getId() && $sQ->getDefaultBillingAddress())) { 
            goto yq; 
        } 
        $sa = $sQ->getDefaultBillingAddress(); 
        if (!$sa->getTelephone()) { 
            goto Jr; 
        } 
        return $sa->getTelephone(); 
        Jr: 
        yq: 
        return null; 
    } 
    public function getCustomerCountryFromEmail($hc = false) 
    { 
        $this->customerModel->setWebsiteId($this->storeManager->getStore()->getWebsiteId()); 
        $sQ = $this->customerModel->loadByEmail($hc); 
        if (!($sQ->getId() && $sQ->getDefaultBillingAddress())) { 
            goto os; 
        } 
        $sa = $sQ->getDefaultBillingAddress(); 
        if (!$sa->getCountryId()) { 
            goto xk; 
        } 
        return $sa->getCountryId(); 
        xk: 
        os: 
        return null; 
    } 
    public function Customgateway_GenerateOTP() 
    { 
        $N0 = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_OTP_LENGTH); 
        $pT = "0123456789"; 
        $zY = strlen($pT); 
        $CH = ''; 
        $Iv = 0; 
        rd: 
        if (!($Iv < $N0)) { 
            goto jp; 
        } 
        $CH .= $pT[rand(0, $zY - 1)]; 
        gG: 
        $Iv++; 
        goto rd; 
        jp: 
        $this->setSessionValue("customgateway_otp", $CH); 
        return $CH; 
    } 
    public function customgateway_validateOTP($SQ) 
    { 
        $dB = $this->getSessionValue("customgateway_otp"); 
        if (!($dB == NULL)) { 
            goto km; 
        } 
        return "FAILED"; 
        km: 
        if ($dB == $SQ) { 
            goto Fa; 
        } 
        return "FAILED"; 
        goto fr; 
        Fa: 
        return "SUCCESS"; 
        fr: 
    } 
    public function OTP_over_SMSandEMAIL_Message($hc, $xh, $q8, $MP) 
    { 
        $su = explode("@", $hc); 
        $xi = $su[0][0] . "xxxxxxxxxx@" . $su[1]; 
        $zH = "xxxxxxxx" . substr($xh, -2); 
        if ($q8 == "SUCCESS" && $MP == "SUCCESS") { 
            goto fO; 
        } 
        if ($q8 == "SUCCESS" && $MP == "FAILED") { 
            goto Fd; 
        } 
        if ($q8 == "FAILED" && $MP == "SUCCESS") { 
            goto vu; 
        } 
        return "Failed to send OTP to email and phone. Please Contact Your Administrator."; 
        goto Ks; 
        fO: 
        return "The OTP has been sent to your Phone: " . $zH . " and Email:" . $xi . ". Please enter the OTP you received to Validate."; 
        goto Ks; 
        Fd: 
        return "The OTP has been sent to your Email:" . $xi . " and Failed to send OTP to Phone. Please enter the OTP you received to Validate."; 
        goto Ks; 
        vu: 
        return "The OTP has been sent to your Phone: " . $zH . " and Failed to send OTP to email. Please enter the OTP you received to Validate."; 
        Ks: 
    } 
    public function check_customGateway_methodConfigured() 
    { 
        $j6 = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_EMAIL_FROM); 
        $vG = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_EMAIL_NAME); 
        $Sy = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_HOSTNAME); 
        $AD = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_PORT); 
        $JX = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_AUTHENTICATION); 
        $JO = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_USERNAME); 
        $zg = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_PASSWORD); 
        $N0 = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_OTP_LENGTH); 
        if (is_null($j6) || is_null($vG) || is_null($Sy) || is_null($AD) || is_null($JX) || is_null($JO) || is_null($zg) || is_null($N0)) { 
            goto JJ; 
        } 
        return false; 
        goto K9; 
        JJ: 
        return true; 
        K9: 
    } 
    public function update_status($P8) 
    { 
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY); 
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY); 
        $ce = Curl::update_status($D_, $sI, $P8, $this->getBaseUrl()); 
        return $ce; 
    } 
    public function getCustomerFromAttributes($ek) 
    { 
        $this->log_debug("TwoFaUtility: getCustomerFromAttributes "); 
        $this->customerModel->setWebsiteId($this->storeManager->getStore()->getWebsiteId()); 
        $sQ = $this->customerModel->loadByEmail($ek); 
        return !is_null($sQ->getId()) ? $sQ : false; 
    } 
    public function getGroupNameById($YG) 
    { 
        $CE = $this->groupRepository->getById($YG); 
        return $CE->getCode(); 
    } 
    public function check2fa_enterprisePlan() 
    { 
        $tQ = $this->getStoreConfig(TwoFAConstants::PLAN_VERIFIED); 
        $QU = TwoFAConstants::PLAN_NAME == "magento_2fa_premium_plan" && $tQ ? 1 : 0; 
        return $QU; 
    } 
    public function getemailtemplatelist() 
    { 
        $OF = $this->resource->getConnection()->select()->from("email_template", ["template_code", "template_id"]); 
        $gM = $this->resource->getConnection()->fetchAll($OF); 
        return $gM; 
    } 
    public function get_client_ip() 
    { 
        $this->log_debug("TwoFAUtility.php : inside get_client_ip"); 
        if (getenv("HTTP_CLIENT_IP")) { 
            goto k2; 
        } 
        if (getenv("REMOTE_ADDR")) { 
            goto Z1; 
        } 
        if (getenv("HTTP_X_FORWARDED_FOR")) { 
            goto a_; 
        } 
        if (getenv("HTTP_X_FORWARDED")) { 
            goto SU; 
        } 
        if (getenv("HTTP_FORWARDED_FOR")) { 
            goto ki; 
        } 
        if (getenv("HTTP_FORWARDED")) { 
            goto kI; 
        } 
        $Xi = "UNKNOWN"; 
        goto QW; 
        kI: 
        $Xi = getenv("HTTP_FORWARDED"); 
        QW: 
        goto wl; 
        ki: 
        $Xi = getenv("HTTP_FORWARDED_FOR"); 
        wl: 
        goto PV; 
        SU: 
        $Xi = getenv("HTTP_X_FORWARDED"); 
        PV: 
        goto xX; 
        a_: 
        $Xi = getenv("HTTP_X_FORWARDED_FOR"); 
        xX: 
        goto Cu; 
        Z1: 
        $Xi = getenv("REMOTE_ADDR"); 
        Cu: 
        goto m0; 
        k2: 
        $Xi = getenv("HTTP_CLIENT_IP"); 
        m0: 
        return $Xi; 
    } 
    public function getIpWhitelistedIpAddresses($T9) 
    { 
        try { 
            $this->log_debug("TwoFAUtility.php: Inside getIpAddressesByType with IP Type: " . $T9); 
            if ($T9 == "customer") { 
                goto d2; 
            } 
            if ($T9 == "admin") { 
                goto c2; 
            } 
            return []; 
            goto hm; 
            d2: 
            $If = $this->ipWhitelistedFactory->create(); 
            goto hm; 
            c2: 
            $If = $this->ipWhitelistedAdminFactory->create(); 
            hm: 
            $WI = $If->getCollection()->getColumnValues("ip_address"); 
            return $WI; 
        } catch (\Exception $qW) { 
            return []; 
        } 
    } 
    public function checkTrustedIPs($T9) 
    { 
        $this->log_debug("TwoFAUtility.php : inside checkTrustedIPs"); 
        $o4 = $this->get_client_ip(); 
        $bL = $this->getIpWhitelistedIpAddresses($T9); 
        if (!empty($bL)) { 
            goto w3; 
        } 
        return false; 
        w3: 
        if (!($T9 == "customer")) { 
            goto Eq; 
        } 
        if (!($this->getStoreConfig(TwoFAConstants::IP_CUSTOMER) != 1)) { 
            goto sF; 
        } 
        return false; 
        sF: 
        Eq: 
        if (!($T9 == "admin")) { 
            goto Ng; 
        } 
        if (!($this->getStoreConfig(TwoFAConstants::IP_ADMIN) != 1)) { 
            goto vo; 
        } 
        return false; 
        vo: 
        Ng: 
        $q7 = false; 
        foreach ($bL as $Dz) { 
            if (stristr($Dz, "-")) { 
                goto PZ; 
            } 
            if (!($o4 == $Dz)) { 
                goto br; 
            } 
            $q7 = true; 
            goto Xu; 
            br: 
            goto uS; 
            PZ: 
            list($k0, $EK) = explode("-", $Dz, 2); 
            $Br = ip2long($k0); 
            $Z8 = ip2long($EK); 
            $we = ip2long($o4); 
            if (!($Br !== false && $Z8 !== false && $we !== false && $we >= $Br && $we <= $Z8)) { 
                goto go; 
            } 
            $q7 = true; 
            goto Xu; 
            go: 
            uS: 
            TH: 
        } 
        Xu: 
        return $q7; 
    } 
 
    public function getClearSessionForSkipTwoFA() 
    { 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_INLINE, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_SECRET, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_TRANSACTIONID, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_USERNAME, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_ACTIVE_METHOD, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_CONFIG_METHOD, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER__PHONE, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_COUNTRY_CODE, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER__EMAIL, NULL); 
        $this->setSessionValue(TwoFAConstants::CUSTOMER_WEBSITE_ID, NULL); 
    } 
    public function whitelistCustomerThroughSession($lV = false) 
    { 
        $u2 = $this->getSessionValue("mousername"); 
        $rn = $this->getCustomerMoTfaUserDetails("miniorange_tfa_users", $u2); 
        $N2 = $this->getSessionValue(TwoFAConstants::CUSTOMER_WEBSITE_ID); 
        if (is_array($rn) && sizeof($rn) > 0) { 
            goto gK; 
        } 
        $this->getSessionValue(TwoFAConstants::CUSTOMER_INLINE); 
        $xh = $this->getSessionValue(TwoFAConstants::CUSTOMER__PHONE); 
        $hc = $this->getSessionValue(TwoFAConstants::CUSTOMER__EMAIL); 
        $YR = $this->getSessionValue(TwoFAConstants::CUSTOMER_COUNTRY_CODE); 
        $iR = $this->getSessionValue(TwoFAConstants::CUSTOMER_TRANSACTIONID); 
        if ($lV) { 
            goto pJ; 
        } 
        $ea = $this->getSessionValue(TwoFAConstants::CUSTOMER_ACTIVE_METHOD) ?? "User_skipTwofa_permanently"; 
        $vw = $this->getSessionValue(TwoFAConstants::CUSTOMER_CONFIG_METHOD) ?? "User_skipTwofa_permanently"; 
        $iL = $this->getSessionValue(TwoFAConstants::CUSTOMER_SECRET) ?? "User_skipTwofa_permanently"; 
        $AP = [["username" => $u2, "configured_methods" => $vw, "active_method" => $ea, "secret" => $iL, "website_id" => $N2, "whitelist_enabled" => true]]; 
        goto tG; 
        pJ: 
        $ea = $this->getSessionValue(TwoFAConstants::CUSTOMER_ACTIVE_METHOD) ?? "User_skipTwofa"; 
        $vw = $this->getSessionValue(TwoFAConstants::CUSTOMER_CONFIG_METHOD) ?? "User_skipTwofa"; 
        $iL = $this->getSessionValue(TwoFAConstants::CUSTOMER_SECRET) ?? "User_skipTwofa"; 
        $AP = [["username" => $u2, "configured_methods" => $vw, "active_method" => $ea, "secret" => $iL, "website_id" => $N2, "whitelist_enabled" => false]]; 
        tG: 
        $this->insertRowInTable("miniorange_tfa_users", $AP); 
        if (!$lV) { 
            goto gh; 
        } 
        $this->updateColumnInTable("miniorange_tfa_users", "skip_twofa", (int) 1, "username", $u2, $N2); 
        gh: 
        if (!($ea == "OOS" || $ea == "OOSE")) { 
            goto AU; 
        } 
        if (!($xh != NULL)) { 
            goto yJ; 
        } 
        $this->updateColumnInTable("miniorange_tfa_users", "phone", $xh, "username", $u2, $N2); 
        $this->updateColumnInTable("miniorange_tfa_users", "countrycode", $YR, "username", $u2, $N2); 
        yJ: 
        AU: 
        if (!($ea == "OOE" || $ea == "OOSE")) { 
            goto dS; 
        } 
        if (!($hc != NULL)) { 
            goto Mg; 
        } 
        $this->updateColumnInTable("miniorange_tfa_users", "email", $hc, "username", $u2, $N2); 
        Mg: 
        dS: 
        goto h5; 
        gK: 
        if ($lV) { 
            goto UG; 
        } 
        $this->updateColumnInTable("miniorange_tfa_users", "whitelist_enabled", true, "username", $u2, $N2); 
        $this->updateColumnInTable("miniorange_tfa_users", "active_method", "User_skipTwofa_permanently", "username", $u2, $N2); 
        $this->updateColumnInTable("miniorange_tfa_users", "secret", "User_skipTwofa_permanently", "username", $u2, $N2); 
        $this->updateColumnInTable("miniorange_tfa_users", "configured_methods", "User_skipTwofa_permanently", "username", $u2, $N2); 
        goto MA; 
        UG: 
        $rn = $this->getCustomerMoTfaUserDetails("miniorange_tfa_users", $u2); 
        if (!empty($rn) && isset($rn[0]["skip_twofa"])) { 
            goto iQ; 
        } 
        $Jb = 1; 
        goto Wa; 
        iQ: 
        $RG = $rn[0]["skip_twofa"]; 
        $Jb = (int) $RG + 1; 
        Wa: 
        $this->updateColumnInTable("miniorange_tfa_users", "skip_twofa", $Jb, "username", $u2, $N2); 
        MA: 
        h5: 
    } 
    public function loginAndRedirectCustomer() 
    { 
        $I3 = $this->getSessionValue("mousername"); 
        $user = $this->getCustomerFromAttributes($I3); 
        $this->customerSession->setCustomerAsLoggedIn($user); 
        $Pb = $this->url->getUrl("customer/account"); 
        $dP = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT); 
        $dP->setUrl($Pb); 
        return $dP; 
    } 
    public function getPermanentlySkipTwoFa() 
    { 
        $this->log_debug("TwoFAUtility.php : inside getPermanentlySkipTwoFa"); 
        $this->whitelistCustomerThroughSession(false); 
        $this->getClearSessionForSkipTwoFA(); 
        return $this->loginAndRedirectCustomer(); 
    } 
    public function getSkipTwoFa() 
    { 
        $this->log_debug("TwoFAUtility.php : inside getSkipTwoFa"); 
        $this->whitelistCustomerThroughSession(true); 
        $this->getClearSessionForSkipTwoFA(); 
        return $this->loginAndRedirectCustomer(); 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace MiniOrange\TwoFA\Helper;

use Magento\Customer\Model\CustomerFactory;
use Magento\Customer\Model\Session;
use Magento\Framework\App\Cache\Frontend\Pool;
use Magento\Framework\App\Cache\TypeListInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\Config\Storage\WriterInterface;
use Magento\Framework\Filesystem\Driver\File;
use Magento\Framework\Url;
use Magento\Framework\UrlInterface;
use Magento\Framework\View\Asset\Repository;
use Magento\Framework\App\ResourceConnection;
use Magento\User\Model\UserFactory;
use MiniOrange\TwoFA\Helper\TwoFAConstants;
use MiniOrange\TwoFA\Helper\Curl;
use MiniOrange\TwoFA\Helper\Data;
use Magento\Backend\Block\Template\Context;
use Magento\Authorization\Model\UserContextInterface;
use Magento\User\Model\ResourceModel\User\CollectionFactory as UserCollectionFactory;
use MiniOrange\TwoFA\Helper\AESEncryption;
use Magento\Customer\Model\Customer;
use MiniOrange\TwoFA\Model\IpWhitelistedFactory;
use MiniOrange\TwoFA\Model\IpWhitelistedAdminFactory;
class TwoFAUtility extends Data
{
    protected $adminSession;
    protected $customerSession;
    protected $authSession;
    protected $cacheTypeList;
    protected $resource;
    protected $cacheFrontendPool;
    protected $fileSystem;
    protected $logger;
    protected $reinitableConfig;
    protected $coreSession;
    protected $userContext;
    private $userCollectionFactory;
    private $userFactory;
    protected $dir;
    protected $data = [];
    private $customerModel;
    protected $storeManager;
    protected $groupRepository;
    protected $ipWhitelistedFactory;
    protected $ipWhitelistedAdminFactory;
    protected $_websiteCollectionFactory;
    private $url;
    private $resultFactory;
    public function __construct(ScopeConfigInterface $gO, UserFactory $HZ, CustomerFactory $IQ, UrlInterface $IP, WriterInterface $J2, \Magento\Framework\App\ResourceConnection $TC, Repository $rV, \Magento\Backend\Helper\Data $ZE, Url $AE, \Magento\Backend\Model\Session $Dt, Session $Ms, \Magento\Backend\Model\Auth\Session $pY, \Magento\Framework\App\Config\ReinitableConfigInterface $zA, \Magento\Framework\Session\SessionManagerInterface $XJ, TypeListInterface $UA, Pool $lv, \Psr\Log\LoggerInterface $Rx, File $gl, UserContextInterface $dI, UserCollectionFactory $lH, \Magento\User\Model\UserFactory $Zd, \Magento\Framework\Filesystem\DirectoryList $PA, \Magento\Store\Model\StoreManagerInterface $nN, Customer $ue, \Magento\Customer\Api\GroupRepositoryInterface $pr, \Magento\Store\Model\ResourceModel\Website\CollectionFactory $vL, IpWhitelistedFactory $VW, IpWhitelistedAdminFactory $sl, \Magento\Framework\UrlInterface $jv, \Magento\Framework\Controller\ResultFactory $Y1)
    {
        $this->adminSession = $Dt;
        $this->customerSession = $Ms;
        $this->authSession = $pY;
        $this->cacheTypeList = $UA;
        $this->resource = $TC;
        $this->cacheFrontendPool = $lv;
        $this->fileSystem = $gl;
        $this->logger = $Rx;
        $this->dir = $PA;
        $this->reinitableConfig = $zA;
        $this->coreSession = $XJ;
        $this->userContext = $dI;
        $this->userFactory = $Zd;
        $this->userCollectionFactory = $lH;
        $this->storeManager = $nN;
        $this->customerModel = $ue;
        $this->groupRepository = $pr;
        $this->_websiteCollectionFactory = $vL;
        $this->ipWhitelistedFactory = $VW;
        $this->ipWhitelistedAdminFactory = $sl;
        $this->url = $jv;
        $this->resultFactory = $Y1;
        parent::__construct($gO, $HZ, $IQ, $IP, $J2, $rV, $ZE, $AE);
    }
    public function get_customer_detailss()
    {
        $sQ = $this->customerSession;
        $pe = $sQ->getName();
        $Xs = $sQ->getId();
        return $pe;
    }
    public function get_all_websites()
    {
        $ZQ = $this->_websiteCollectionFactory->create();
        return $ZQ;
    }
    public function get_current_websiteId()
    {
        $qu = $this->getStoreConfig(TwoFAConstants::SELECTED_WEBSITE_FOR_SETTING);
        if (!($qu == NULL)) {
            goto qV;
        }
        $W6 = $this->get_all_websites();
        foreach ($W6 as $An) {
            $qu = $An->getId();
            goto af;
            xZ:
        }
        af:
        qV:
        return $qu;
    }
    public function getHiddenPhone($xh)
    {
        $U9 = "\x78\x78\170\x78\170\170\x78" . substr($xh, strlen($xh) - 3);
        return $U9;
    }
    public function isBlank($Dz)
    {
        if (!(!isset($Dz) || empty($Dz))) {
            goto W8;
        }
        return true;
        W8:
        return false;
    }
    public function getCompleteSession()
    {
        $this->coreSession->start();
        $bB = $this->coreSession->getMyTestValue();
        return $bB !== null ? $bB : array();
    }
    public function getSessionValue($XV)
    {
        $dY = $this->getCompleteSession();
        return isset($dY[$XV]) ? $dY[$XV] : null;
    }
    public function setSessionValue($XV, $Dz)
    {
        $dY = $this->getCompleteSession();
        $dY[$XV] = $Dz;
        $this->coreSession->setMyTestValue($dY);
    }
    public function get_admin_role_name()
    {
        $ZQ = $this->userCollectionFactory->create();
        $Rm = $this->getSessionValue("\141\x64\155\x69\156\137\x75\x73\145\x72\x5f\151\x64");
        if (!($Rm == NULL && $this->authSession->isLoggedIn())) {
            goto ig;
        }
        $W8 = $this->authSession->getUser();
        $Rm = $W8->getId();
        ig:
        $ZQ->addFieldToFilter("\155\141\151\x6e\x5f\164\141\x62\x6c\145\56\165\x73\145\162\137\x69\144", $Rm);
        $eb = $ZQ->getFirstItem();
        $gL = $eb->getData();
        $tm = $gL["\162\157\154\x65\137\156\x61\155\x65"];
        return $tm;
    }
    public function isCustomerRegistered()
    {
        $zb = $this->getCustomerDetails();
        return !isset($zb["\x65\155\x61\151\x6c"]) && ($zb["\x65\155\x61\151\x6c"] === NULL || empty($zb["\145\155\x61\151\154"])) ? false : true;
    }
    public function getCustomerDetails()
    {
        $hc = $this->getStoreConfig(TwoFAConstants::CUSTOMER_EMAIL);
        $nR = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        $Mq = $this->getStoreConfig(TwoFAConstants::API_KEY);
        $yA = $this->getStoreConfig(TwoFAConstants::TOKEN);
        $zb = array("\x65\155\141\151\x6c" => $hc, "\x63\x75\x73\x74\x6f\155\145\x72\x5f\113\x65\171" => $nR, "\x61\x70\151\137\x4b\145\171" => $Mq, "\x74\x6f\153\145\156" => $yA);
        return $zb;
    }
    public function isCurlInstalled()
    {
        if (in_array("\x63\165\x72\x6c", get_loaded_extensions())) {
            goto Su;
        }
        return 0;
        goto pv;
        Su:
        return 1;
        pv:
    }
    public function validatePhoneNumber($xh)
    {
        if (!preg_match(MoIDPConstants::PATTERN_PHONE, $xh, $ar)) {
            goto rS;
        }
        return true;
        goto e7;
        rS:
        return false;
        e7:
    }
    public function getHiddenEmail($hc)
    {
        if (!(!isset($hc) || trim($hc) === '')) {
            goto nf;
        }
        return '';
        nf:
        $tR = strlen($hc);
        $AC = substr($hc, 0, 1);
        $oE = strrpos($hc, "\100");
        $Lf = substr($hc, $oE - 1, $tR);
        $Iv = 1;
        k_:
        if (!($Iv < $oE)) {
            goto D0;
        }
        $AC = $AC . "\170";
        Q6:
        $Iv++;
        goto k_;
        D0:
        $y0 = $AC . $Lf;
        return $y0;
    }
    public function getAdminSession()
    {
        return $this->adminSession;
    }
    public function setAdminSessionData($XV, $Dz)
    {
        return $this->adminSession->setData($XV, $Dz);
    }
    public function getImageUrl($NT)
    {
        return $this->assetRepo->getUrl(TwoFAConstants::MODULE_DIR . TwoFAConstants::MODULE_IMAGES . $NT);
    }
    public function tfaMethodArray()
    {
        return array("\117\x4f\x53" => array("\x6e\x61\x6d\x65" => "\117\124\x50\x20\117\x76\x65\x72\40\123\x4d\x53", "\x64\x65\163\x63\162\151\160\164\x69\157\x6e" => "\x45\x6e\164\x65\x72\x20\x74\x68\145\x20\117\x6e\x65\40\124\151\155\x65\x20\120\141\x73\x73\x63\x6f\144\x65\40\x73\x65\x6e\x74\40\x74\157\x20\x79\157\x75\x72\x20\160\150\x6f\x6e\x65\x20\x74\x6f\40\154\x6f\147\151\x6e\56"), "\x4f\x4f\105" => array("\x6e\141\155\145" => "\117\x54\120\x20\117\x76\x65\x72\40\x45\155\141\x69\x6c", "\144\145\163\x63\162\151\160\164\x69\157\156" => "\105\x6e\164\145\x72\40\164\150\x65\40\x4f\156\145\x20\x54\151\155\145\40\x50\141\x73\163\143\157\144\145\40\x73\x65\156\164\40\164\157\x20\171\x6f\x75\x72\40\x65\155\141\151\154\40\164\157\40\x6c\x6f\147\x69\156\56"), "\117\117\x53\x45" => array("\x6e\141\155\145" => "\x4f\x54\x50\x20\117\166\145\162\40\123\115\x53\x20\141\156\x64\40\x45\x6d\x61\151\154", "\x64\x65\x73\x63\x72\x69\160\164\151\x6f\x6e" => "\105\x6e\x74\145\162\40\164\x68\145\x20\x4f\156\x65\x20\124\x69\x6d\x65\x20\120\x61\163\x73\143\x6f\x64\x65\x20\x73\145\x6e\164\40\x74\x6f\x20\x79\157\165\162\40\x70\x68\x6f\x6e\x65\40\x61\156\144\40\x65\x6d\x61\151\x6c\40\x74\157\40\x6c\x6f\147\x69\x6e\x2e"), "\107\157\x6f\x67\154\x65\x41\x75\164\x68\x65\x6e\164\151\143\141\x74\157\x72" => array("\x6e\x61\x6d\x65" => "\x47\157\157\147\x6c\145\40\x41\165\164\150\145\156\x74\x69\143\141\164\157\x72", "\144\x65\x73\143\162\x69\160\164\151\x6f\156" => "\105\156\x74\145\x72\40\x74\x68\145\x20\163\157\x66\164\40\164\x6f\153\145\156\40\x66\162\157\155\40\164\150\145\x20\141\143\x63\x6f\165\156\164\40\x69\x6e\40\x79\157\165\x72\x20\x47\157\157\x67\154\x65\40\101\x75\x74\x68\145\156\x74\x69\x63\x61\164\157\x72\x20\101\160\160\40\164\x6f\40\154\157\x67\151\x6e\56"), "\115\x69\143\162\157\163\157\146\x74\101\165\164\x68\145\x6e\x74\151\x63\141\164\x6f\162" => array("\x6e\x61\155\x65" => "\115\x69\x63\x72\157\163\157\146\x74\x20\x41\165\x74\150\x65\156\x74\151\x63\x61\x74\157\162", "\144\x65\163\143\162\151\x70\x74\x69\x6f\156" => "\x45\156\164\145\x72\40\164\x68\145\40\x73\x6f\x66\x74\40\164\157\153\145\x6e\x20\x66\x72\x6f\x6d\x20\x74\150\x65\x20\141\x63\x63\157\x75\x6e\164\40\151\x6e\x20\171\x6f\165\x72\40\115\151\143\x72\x6f\163\x6f\146\x74\40\x41\165\164\x68\x65\156\x74\x69\x63\141\x74\157\x72\40\x41\160\160\40\x74\x6f\40\x6c\x6f\147\151\x6e\x2e"), "\117\x6b\164\141\126\145\162\151\x66\x79" => array("\156\141\x6d\x65" => "\x4f\153\164\x61\x20\x56\x65\162\x69\146\x79", "\144\145\163\143\x72\x69\160\164\151\x6f\156" => "\131\157\165\40\x68\141\x76\x65\40\x74\x6f\40\x73\143\x61\156\x20\164\150\x65\40\121\122\x20\x63\x6f\144\145\x20\x66\x72\x6f\x6d\40\x4f\153\164\141\x20\x56\x65\x72\x69\146\x79\x20\x41\x70\x70\40\x61\156\144\40\x65\x6e\164\145\162\x20\x63\157\144\x65\x20\x67\x65\x6e\x65\x72\141\x74\x65\x64\x20\142\x79\x20\x61\160\160\x20\164\x6f\x20\154\157\147\x69\156\x2e\40\x53\165\160\x70\x6f\x72\x74\x65\x64\x20\151\156\x20\x53\x6d\141\162\164\160\150\157\x6e\145\163\40\x6f\156\x6c\x79\x2e"), "\x44\x75\157\x41\x75\164\x68\145\x6e\164\x69\x63\x61\x74\157\162" => array("\156\141\155\x65" => "\x44\165\x6f\40\101\x75\164\150\x65\156\164\x69\x63\141\x74\157\162", "\x64\x65\x73\x63\162\x69\160\164\151\157\156" => "\131\157\x75\x20\x68\x61\166\145\x20\164\157\40\163\143\141\156\x20\x74\x68\145\x20\x51\122\x20\x63\157\x64\x65\40\146\162\157\155\x20\x44\x75\157\40\101\x75\164\150\x65\x6e\x74\151\x63\141\164\157\162\x20\x41\x70\x70\x20\141\x6e\x64\40\x65\156\164\145\162\x20\x63\157\x64\x65\40\x67\x65\x6e\x65\162\x61\x74\x65\144\40\x62\171\x20\141\x70\160\x20\164\157\x20\154\x6f\147\x69\156\x2e\40\123\x75\160\x70\157\162\x74\145\144\40\x69\x6e\x20\123\x6d\141\162\164\160\x68\157\x6e\x65\163\40\x6f\156\x6c\171\x2e"), "\x41\x75\164\x68\171\x41\x75\x74\150\145\x6e\164\151\143\x61\x74\x6f\162" => array("\x6e\141\x6d\x65" => "\101\165\164\150\171\x20\101\165\164\x68\145\x6e\x74\151\143\141\x74\x6f\x72", "\144\145\x73\x63\162\151\x70\164\151\x6f\x6e" => "\x59\157\x75\40\x68\141\x76\x65\x20\164\x6f\x20\163\x63\x61\x6e\40\164\150\x65\40\x51\122\x20\x63\157\x64\x65\40\x66\x72\x6f\155\40\x41\x75\x74\x68\171\x20\101\x75\x74\x68\x65\156\x74\151\x63\x61\164\157\x72\40\x41\x70\x70\40\141\156\144\x20\x65\156\164\145\x72\x20\143\157\x64\x65\40\x67\145\156\x65\x72\x61\x74\x65\144\40\142\171\x20\x61\x70\160\40\164\157\x20\x6c\x6f\147\x69\x6e\56\40\x53\165\x70\160\157\162\x74\x65\144\40\x69\156\40\123\x6d\141\x72\x74\160\150\157\x6e\x65\x73\40\x6f\156\x6c\171\x2e"), "\x4c\x61\x73\x74\120\x61\x73\x73\101\x75\x74\x68\145\156\164\x69\143\x61\164\157\x72" => array("\156\141\x6d\145" => "\x4c\141\163\x74\120\141\163\x73\x20\101\165\164\x68\x65\156\164\x69\x63\141\x74\x6f\162", "\144\145\x73\x63\162\x69\160\164\151\x6f\156" => "\x59\x6f\165\x20\150\x61\x76\145\x20\164\x6f\x20\163\x63\x61\x6e\x20\x74\150\145\x20\x51\x52\x20\143\x6f\x64\x65\40\146\x72\157\x6d\x20\114\x61\x73\x74\120\x61\x73\163\x20\x41\165\x74\x68\x65\156\x74\151\143\141\164\x6f\x72\x20\x41\160\x70\x20\141\156\x64\40\145\156\x74\145\x72\x20\x63\x6f\x64\x65\x20\147\145\156\x65\x72\141\164\145\144\40\x62\171\40\x61\160\160\x20\164\157\40\154\157\147\151\x6e\56\x20\123\165\x70\x70\x6f\x72\x74\x65\x64\40\151\156\40\123\155\x61\162\164\x70\x68\x6f\156\x65\163\40\x6f\156\154\171\x2e"), "\x51\x52\x43\x6f\x64\x65\x41\x75\164\150\x65\156\164\x69\143\141\x74\157\162" => array("\156\x61\155\145" => "\x51\122\40\x43\157\x64\145\40\101\x75\164\x68\x65\156\x74\x69\x63\141\x74\151\x6f\156", "\144\x65\163\143\162\151\160\x74\x69\157\156" => "\x59\157\x75\40\150\141\x76\145\40\164\x6f\40\x73\143\x61\156\x20\164\150\145\x20\121\122\x20\x43\157\144\145\40\146\x72\157\155\x20\171\157\x75\162\x20\160\150\x6f\156\145\x20\x75\163\151\156\x67\x20\x6d\151\x6e\x69\x4f\x72\x61\x6e\x67\x65\x20\101\x75\164\x68\145\x6e\164\x69\x63\x61\x74\x6f\162\40\x41\160\x70\x20\x74\157\x20\x6c\157\147\x69\x6e\x2e\x20\x53\x75\160\x70\157\x72\164\145\144\x20\x69\156\40\x53\x6d\141\162\x74\x70\150\x6f\156\x65\163\40\157\x6e\154\x79\x2e"), "\x4b\x42\101" => array("\156\141\x6d\x65" => "\123\145\143\165\x72\x69\164\171\40\x51\165\x65\163\164\151\x6f\x6e\163\x20\x28\113\x42\x41\x29", "\144\145\x73\x63\162\x69\160\164\x69\157\156" => "\131\157\165\40\x68\141\x76\x65\x20\x74\157\x20\x61\156\163\x77\x65\x72\163\40\x73\x6f\x6d\x65\x20\x6b\x6e\x6f\167\154\145\144\147\145\40\x62\x61\163\x65\144\40\163\145\143\x75\x72\151\x74\x79\40\x71\165\x65\163\x74\x69\x6f\156\163\40\x77\x68\x69\143\150\40\x61\x72\x65\x20\157\x6e\x6c\171\40\153\x6e\157\x77\156\40\164\x6f\40\171\x6f\165\x20\x74\157\x20\x61\165\x74\x68\x65\x6e\x74\x69\x63\141\164\x65\x20\x79\x6f\165\x72\x73\x65\x6c\x66\56"), "\x4f\x4f\x50" => array("\156\x61\x6d\145" => "\117\124\x50\40\x4f\166\145\x72\x20\x50\150\157\156\x65", "\x64\145\163\143\x72\151\160\x74\x69\x6f\156" => "\x59\x6f\x75\x20\167\x69\154\154\x20\162\x65\143\145\x69\166\x65\40\x61\40\157\156\x65\x20\x74\x69\155\145\40\x70\141\x73\x73\143\157\x64\145\40\x76\151\x61\x20\x70\150\x6f\156\x65\40\x63\141\x6c\154\56\40\131\157\165\x20\150\x61\166\x65\40\x74\x6f\40\145\x6e\164\145\x72\x20\x74\x68\145\40\x6f\x74\160\x20\157\156\x20\x79\x6f\x75\x72\x20\x73\x63\162\x65\x65\x6e\x20\164\157\40\x6c\x6f\x67\151\x6e\x2e\x20\x53\165\160\160\157\162\x74\x65\x64\x20\x69\156\40\x53\x6d\x61\162\x74\x70\150\x6f\x6e\145\163\54\40\x46\145\141\164\165\162\x65\40\120\150\157\x6e\x65\163\56"), "\x59\x75\142\151\x6b\145\x79\110\x61\x72\144\167\x61\162\145\124\x6f\x6b\145\156" => array("\156\x61\x6d\x65" => "\x59\x75\142\x69\x6b\x65\x79\x20\110\x61\162\144\167\x61\162\145\40\x54\157\x6b\145\156", "\x64\145\163\143\x72\151\160\x74\x69\157\156" => "\131\x6f\165\x20\x63\141\156\x20\160\162\x65\x73\x73\x20\x74\x68\x65\x20\142\165\164\164\x6f\x6e\x20\x6f\x6e\x20\171\x6f\165\162\40\x79\x75\142\x69\x6b\x65\171\x20\x48\x61\x72\144\x77\141\x72\x65\x20\x74\157\153\145\x6e\x20\167\x68\151\143\x68\x20\147\145\156\x65\x72\x61\164\x65\40\141\40\162\141\156\x64\157\155\x20\x6b\x65\x79\x2e\x20\x59\x6f\x75\40\143\x61\156\40\165\x73\x65\x20\164\150\x61\164\40\x6b\x65\x79\40\164\157\40\141\x75\x74\x68\x65\156\164\x69\143\141\x74\x65\x20\x79\x6f\165\x72\163\x65\x6c\146\56"), "\120\x75\163\150\116\157\x74\151\146\151\143\x61\164\x69\x6f\156\163\x72" => array("\x6e\141\155\145" => "\120\x75\x73\x68\40\116\157\x74\151\146\x69\143\x61\x74\x69\157\x6e\163", "\x64\145\x73\143\162\x69\x70\x74\x69\157\x6e" => "\x59\157\x75\40\x77\151\x6c\x6c\x20\162\145\x63\145\151\166\x65\40\141\x20\160\165\163\150\x20\156\157\164\151\146\151\143\141\x74\151\157\x6e\x20\x6f\x6e\x20\x79\157\165\162\x20\x70\x68\157\x6e\x65\56\40\x59\157\165\40\x68\x61\166\145\x20\164\x6f\x20\101\x43\103\105\120\124\x20\x6f\162\x20\x44\105\x4e\131\40\151\x74\x20\x74\x6f\x20\154\157\147\151\156\x2e\40\123\x75\x70\160\x6f\162\164\x65\144\x20\x69\x6e\x20\123\155\141\x72\x74\x70\x68\x6f\156\x65\163\x20\x6f\x6e\x6c\171\x2e"), "\x53\x6f\x66\164\x54\157\153\x65\156" => array("\156\x61\155\145" => "\x53\157\x66\x74\x20\124\x6f\x6b\x65\x6e", "\144\145\x73\143\162\x69\x70\164\x69\157\156" => "\x59\157\x75\40\x68\x61\x76\x65\x20\164\x6f\x20\145\156\x74\x65\162\40\x70\141\x73\x73\143\157\x64\145\x20\x67\145\156\x65\162\141\164\x65\144\40\142\171\x20\155\151\x6e\x69\x4f\x72\x61\156\147\145\x20\101\x75\x74\x68\145\156\164\x69\143\141\164\x6f\162\x20\x41\160\x70\x20\164\157\x20\154\157\x67\151\156\56\x20\x53\x75\160\160\157\162\x74\145\144\40\x69\156\40\123\x6d\141\x72\x74\x70\x68\x6f\156\x65\163\40\x6f\x6e\154\171\56"), "\105\x6d\x61\x69\154\126\x65\x72\x69\x66\x69\x63\141\164\151\x6f\x6e" => array("\x6e\x61\155\145" => "\105\x6d\x61\151\154\x20\x56\145\x72\x69\146\151\143\141\x74\x69\x6f\x6e", "\144\145\x73\143\x72\x69\x70\164\151\x6f\x6e" => "\x59\157\165\x20\167\x69\154\154\40\x72\145\x63\145\x69\x76\145\x20\x61\x6e\40\x65\x6d\141\x69\154\x20\x77\151\164\150\x20\x6c\151\x6e\x6b\56\40\131\157\x75\x20\x68\x61\166\x65\40\164\157\x20\x63\154\151\x63\x6b\40\x74\150\x65\40\x41\x43\103\105\x50\124\40\157\162\40\104\x45\x4e\131\40\154\x69\x6e\x6b\40\x74\x6f\40\166\x65\162\151\146\x79\x20\x79\157\x75\x72\x20\145\155\141\x69\154\56\x20\x53\165\x70\160\157\162\164\x65\144\x20\x69\156\40\104\x65\163\x6b\164\157\x70\x73\54\x20\114\141\x70\x74\157\x70\x73\54\40\123\155\x61\x72\x74\x70\x68\x6f\x6e\x65\163\56"));
    }
    public static function isFirstUser($YG)
    {
        $zb = self::getCustomerDetails();
        return $zb["\152\x69\144"] == $YG;
    }
    public function AuthenticatorUrl()
    {
        $this->log_debug("\x49\156\163\x69\144\x65\40\x61\165\164\150\145\x6e\x74\151\143\141\x74\157\x72\x20\x75\162\x6c");
        if ($this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE)) {
            goto Vl;
        }
        $NZ = $this->getCurrentAdminUser()->getUsername();
        goto cU;
        Vl:
        $NZ = $this->getSessionValue(TwoFAConstants::ADMIN_USERNAME);
        cU:
        $lE = $this->helperBackend->getAreaFrontName();
        $hY = $this->urlInterface->getCurrentUrl();
        if (strpos($hY, $lE) !== false) {
            goto px;
        }
        $rn = $this->getCustomerMoTfaUserDetails("\x6d\151\x6e\x69\157\162\141\156\x67\x65\x5f\164\146\x61\137\x75\x73\x65\162\x73", $NZ);
        goto jI;
        px:
        $rn = $this->getAllMoTfaUserDetails("\x6d\x69\156\x69\x6f\x72\x61\156\147\x65\137\x74\146\x61\137\x75\163\x65\x72\163", $NZ, -1);
        jI:
        $iL = $this->getAuthenticatorSecret($NZ);
        $WU = $this->getSessionValue(TwoFAConstants::PRE_SECRET);
        if (!$this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE)) {
            goto rj;
        }
        $WU = $this->getSessionValue(TwoFAConstants::ADMIN_SECRET);
        rj:
        if (!(!is_array($rn) || sizeof($rn) <= 0)) {
            goto jU;
        }
        if ($WU == NULL) {
            goto d9;
        }
        $iL = $WU;
        goto OI;
        d9:
        $iL = $this->generateRandomString();
        $this->setSessionValue(TwoFAConstants::PRE_SECRET, $iL);
        OI:
        jU:
        $B_ = $this->AuthenticatorIssuer();
        $jv = "\157\164\160\141\x75\x74\150\72\x2f\x2f\164\x6f\x74\x70\57";
        $jv .= $NZ . "\77\163\x65\143\x72\x65\x74\75" . $iL . "\x26\x69\163\x73\x75\145\162\75" . $B_;
        return $jv;
    }
    public function AuthenticatorCustomerUrl()
    {
        $this->log_debug("\x69\x6e\163\x69\144\x65\x20\x61\165\164\x68\145\x6e\164\151\x63\141\164\157\162\40\x63\x75\163\164\x6f\155\145\x72\40\165\x72\154");
        $hc = $_COOKIE["\x6d\x6f\x75\x73\145\162\156\x61\x6d\x65"];
        if (is_null($hc)) {
            goto PB;
        }
        $WU = $this->getSessionValue("\143\165\163\x74\x6f\x6d\145\x72\x5f\x69\156\x6c\151\x6e\145\x5f\163\145\x63\162\x65\x74");
        if ($WU == NULL) {
            goto Dg;
        }
        $iL = $WU;
        goto eI;
        Dg:
        $iL = $this->generateRandomString();
        $this->setSessionValue("\143\x75\x73\164\x6f\x6d\x65\162\137\151\x6e\x6c\151\156\x65\x5f\x73\145\143\162\x65\x74", $iL);
        eI:
        $B_ = $this->AuthenticatorIssuer();
        $jv = "\x6f\164\x70\141\x75\164\150\x3a\x2f\57\x74\157\x74\160\57";
        $jv .= $hc . "\77\163\145\143\x72\x65\x74\x3d" . $iL . "\x26\151\x73\163\x75\145\162\x3d" . $B_;
        return $jv;
        goto DG;
        PB:
        return false;
        DG:
    }
    public function AuthenticatorIssuer()
    {
        $Tm = $this->getStoreConfig(TwoFAConstants::TwoFA_AUTHENTICATOR_ISSUER);
        return $Tm != NULL && $Tm != '' ? $Tm : "\155\x69\x6e\x69\x4f\x72\141\x6e\x67\x65";
    }
    public function getAuthenticatorSecret($u2)
    {
        $this->log_debug("\111\156\163\x69\x64\x65\x20\147\145\164\101\x75\164\150\x65\156\164\x69\x63\x61\164\157\x72\x53\x65\143\x72\145\x74\x2e\40\147\145\x6e\x65\x72\x61\164\x69\156\x67\40\x73\145\x63\x72\145\164");
        $lE = $this->helperBackend->getAreaFrontName();
        $hY = $this->urlInterface->getCurrentUrl();
        if (strpos($hY, $lE) !== false) {
            goto LN;
        }
        $rn = $this->getCustomerMoTfaUserDetails("\155\x69\x6e\x69\x6f\162\141\156\147\x65\x5f\x74\146\141\x5f\165\x73\145\x72\x73", $u2);
        goto Kg;
        LN:
        $rn = $this->getAllMoTfaUserDetails("\155\x69\156\x69\157\162\x61\x6e\x67\145\137\x74\x66\x61\x5f\x75\x73\145\162\163", $u2, -1);
        Kg:
        if (is_array($rn) && sizeof($rn) > 0) {
            goto qH;
        }
        return false;
        goto cl;
        qH:
        return isset($rn[0]["\x73\x65\143\162\145\164"]) ? $rn[0]["\163\x65\143\x72\x65\164"] : false;
        cl:
    }
    function generateRandomString($q4 = 16)
    {
        $pT = "\x41\102\103\x44\105\x46\x47\x48\111\112\x4b\114\115\x4e\x4f\x50\121\122\x53\124\125\x56\x57\x58\131\132";
        $zY = strlen($pT);
        $CH = '';
        $Iv = 0;
        aJ:
        if (!($Iv < $q4)) {
            goto VD;
        }
        $CH .= $pT[rand(0, $zY - 1)];
        vW:
        $Iv++;
        goto aJ;
        VD:
        return $CH;
    }
    public function getCustomerSecret()
    {
        return $this->getSessionValue("\143\165\163\x74\x6f\x6d\x65\x72\x5f\x69\156\154\151\x6e\145\x5f\163\145\x63\x72\x65\x74");
    }
    public function getAdminSecret()
    {
        $WU = $this->getSessionValue(TwoFAConstants::PRE_SECRET);
        if (!$this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE)) {
            goto OG;
        }
        $WU = $this->getSessionValue(TwoFAConstants::ADMIN_SECRET);
        OG:
        return $WU;
    }
    public function getCustomerKeys($b_ = false)
    {
        $Te = array();
        if ($b_) {
            goto wP;
        }
        $zb = self::getCustomerDetails();
        $Te["\x63\165\163\164\157\x6d\x65\x72\x5f\x6b\145\171"] = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        $Te["\x61\160\x69\113\x65\x79"] = $Mq = $this->getStoreConfig(TwoFAConstants::API_KEY);
        goto xf;
        wP:
        $Te["\x63\165\163\x74\x6f\x6d\x65\162\x5f\153\145\171"] = "\x31\x36\x35\65\x35";
        $Te["\x61\x70\x69\113\x65\x79"] = "\146\106\144\x32\130\143\166\124\107\x44\x65\155\x5a\x76\x62\167\61\x62\143\125\x65\x73\116\x4a\127\x45\161\113\x62\142\x55\161";
        xf:
        return $Te;
    }
    static function getTransactionName()
    {
        return "\x4d\x61\x67\145\156\164\157\40\x32\106\101\40\120\x6c\x75\x67\151\156";
    }
    static function getApiUrls()
    {
        $UN = TwoFAConstants::HOSTNAME;
        return array("\143\x68\141\x6c\154\x61\156\147\145" => $UN . "\57\x6d\x6f\x61\163\x2f\141\160\151\x2f\141\165\x74\150\57\x63\x68\x61\154\x6c\x65\x6e\x67\145", "\165\x70\x64\x61\x74\x65" => $UN . "\x2f\x6d\x6f\x61\x73\57\x61\x70\x69\x2f\141\x64\155\x69\156\x2f\x75\163\145\x72\x73\x2f\165\160\x64\141\x74\x65", "\x76\x61\154\151\144\141\x74\x65" => $UN . "\x2f\x6d\x6f\x61\x73\57\x61\x70\151\x2f\x61\x75\x74\x68\57\x76\x61\x6c\151\x64\141\x74\145", "\x67\157\157\147\x6c\x65\101\x75\164\150\x53\x65\x72\x76\151\143\145" => $UN . "\57\x6d\x6f\x61\x73\x2f\141\x70\151\57\141\x75\164\150\x2f\x67\157\157\x67\154\145\55\x61\165\x74\150\x2d\163\x65\143\162\x65\164", "\x67\x6f\x6f\x67\154\145\x76\141\x6c\151\144\141\x74\145" => $UN . "\x2f\155\x6f\x61\163\x2f\141\160\151\57\x61\x75\164\x68\x2f\166\141\154\x69\144\x61\164\145\55\x67\157\x6f\x67\154\x65\55\x61\165\x74\150\55\x73\145\x63\162\145\x74", "\x63\x72\145\x61\164\145\125\x73\x65\162" => $UN . "\57\155\x6f\x61\163\x2f\141\x70\151\57\141\144\x6d\x69\x6e\x2f\165\163\x65\162\x73\x2f\143\x72\145\141\164\145", "\153\142\x61\122\145\147\151\x73\x74\145\x72" => $UN . "\57\x6d\157\141\163\x2f\141\160\x69\x2f\141\x75\x74\150\57\x72\x65\147\x69\163\164\x65\x72", "\x67\145\x74\125\x73\145\162\111\x6e\x66\x6f" => $UN . "\57\x6d\x6f\x61\163\57\141\x70\151\x2f\141\x64\x6d\151\156\x2f\165\163\145\162\163\x2f\147\145\x74", "\146\x65\145\144\142\x61\143\153" => $UN . "\x2f\x6d\157\x61\163\57\x61\160\x69\57\156\x6f\x74\x69\x66\x79\57\x73\x65\156\144");
    }
    public function getAdminSessionData($XV, $rH = false)
    {
        return $this->adminSession->getData($XV, $rH);
    }
    public function setSessionData($XV, $Dz)
    {
        return $this->customerSession->setData($XV, $Dz);
    }
    public function getSessionData($XV, $rH = false)
    {
        return $this->customerSession->getData($XV, $rH);
    }
    public function setSessionValueForCurrentUser($XV, $Dz)
    {
        if ($this->customerSession->isLoggedIn()) {
            goto R4;
        }
        if ($this->authSession->isLoggedIn()) {
            goto BX;
        }
        goto QE;
        R4:
        $this->setSessionValue($XV, $Dz);
        goto QE;
        BX:
        $this->setAdminSessionData($XV, $Dz);
        QE:
    }
    public function isTwoFAConfigured()
    {
        $kH = $this->getStoreConfig(TwoFAConstants::AUTHORIZE_URL);
        return $this->isBlank($kH) ? false : true;
    }
    public function removeSettingsAfterAccount()
    {
        $this->setStoreConfig(TwoFAConstants::CUSTOMER_EMAIL, NULL);
        $this->setStoreConfig(TwoFAConstants::CUSTOMER_KEY, NULL);
        $this->setStoreConfig(TwoFAConstants::API_KEY, NULL);
        $this->setStoreConfig(TwoFAConstants::PLAN_VERIFIED, NULL);
        $this->setStoreConfig(TwoFAConstants::INVOKE_INLINE_REGISTERATION, NULL);
        $this->setStoreConfig(TwoFAConstants::TOKEN, NULL);
        $this->setStoreConfig(TwoFAConstants::CUSTOMER_PHONE, NULL);
        $this->setStoreConfig(TwoFAConstants::REG_STATUS, NULL);
        $this->setStoreConfig(TwoFAConstants::TXT_ID, NULL);
        $this->setStoreConfig(TwoFAConstants::MODULE_TFA, NULL);
        $this->setStoreConfig(TwoFAConstants::LK_NO_OF_USERS, NULL);
        $this->setStoreConfig(TwoFAConstants::LK_VERIFY, NULL);
        $this->setStoreConfig(TwoFAConstants::KBA_METHOD, NULL);
        $this->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_EMAIL, NULL);
        $this->setStoreConfig(TwoFAConstants::ENABLE_CUSTOMGATEWAY_SMS, NULL);
    }
    public function isUserLoggedIn()
    {
        return $this->customerSession->isLoggedIn() || $this->authSession->isLoggedIn();
    }
    public function getCurrentAdminUser()
    {
        return $this->authSession->getUser();
    }
    public function getCurrentUser()
    {
        return $this->customerSession->getCustomer();
    }
    public function getAdminLoginUrl()
    {
        return $this->getAdminUrl("\141\144\x6d\151\x6e\x68\164\155\154\x2f\141\x75\164\150\57\x6c\x6f\x67\151\x6e");
    }
    public function getAdminPageUrl()
    {
        return $this->getAdminBaseUrl();
    }
    public function getCustomerLoginUrl()
    {
        return $this->getUrl("\143\165\x73\164\x6f\155\x65\162\x2f\141\143\x63\157\165\x6e\164\57\x6c\157\x67\x69\156");
    }
    public function getIsTestConfigurationClicked()
    {
        return $this->getStoreConfig(TwoFAConstants::IS_TEST);
    }
    public function getIsIp_for_CustomerClicked()
    {
        return $this->getStoreConfig(TwoFAConstants::IP_CUSTOMER);
    }
    public function getIsIp_for_AdminClicked()
    {
        return $this->getStoreConfig(TwoFAConstants::IP_ADMIN);
    }
    public function flushCache($j6 = '')
    {
        $bi = ["\144\x62\137\144\144\154"];
        foreach ($bi as $Ku) {
            $this->cacheTypeList->cleanType($Ku);
            cm:
        }
        yz:
        foreach ($this->cacheFrontendPool as $NB) {
            $NB->getBackend()->clean();
            BH:
        }
        kM:
    }
    public function getFileContents($p7)
    {
        return $this->fileSystem->fileGetContents($p7);
    }
    public function getRootDirectory()
    {
        return $this->dir->getRoot();
    }
    public function putFileContents($p7, $AP)
    {
        $this->fileSystem->filePutContents($p7, $AP);
    }
    public function getLogoutUrl()
    {
        if (!$this->customerSession->isLoggedIn()) {
            goto SN;
        }
        return $this->getUrl("\x63\165\163\x74\x6f\x6d\x65\162\x2f\141\x63\143\x6f\x75\156\x74\57\x6c\157\147\x6f\165\x74");
        SN:
        if (!$this->authSession->isLoggedIn()) {
            goto b4;
        }
        return $this->getAdminUrl("\x61\x64\x6d\x69\x6e\150\164\x6d\x6c\x2f\141\165\164\150\57\x6c\x6f\147\157\x75\x74");
        b4:
        return "\57";
    }
    public function getCallBackUrl()
    {
        return $this->getBaseUrl() . TwoFAConstants::CALLBACK_URL;
    }
    public function removeSignInSettFings()
    {
        $this->setStoreConfig(TwoFAConstants::SHOW_CUSTOMER_LINK, 0);
        $this->setStoreConfig(TwoFAConstants::SHOW_ADMIN_LINK, 0);
    }
    public function reinitConfig()
    {
        $this->reinitableConfig->reinit();
    }
    public function micr()
    {
        $hc = $this->getStoreConfig(TwoFAConstants::CUSTOMER_EMAIL);
        $XV = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        return !$this->isBlank($hc) && !$this->isBlank($XV) ? true : false;
    }
    public function mclv()
    {
        $k6 = $this->getStoreConfig(TwoFAConstants::TOKEN);
        $f1 = AESEncryption::decrypt_data($this->getStoreConfig(TwoFAConstants::SAMLSP_CKL), $k6);
        return $f1 == "\x74\162\165\145" ? TRUE : FALSE;
    }
    public function mius()
    {
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY);
        $k6 = $this->getStoreConfig(TwoFAConstants::TOKEN);
        $P8 = AESEncryption::decrypt_data($this->getStoreConfig(TwoFAConstants::SAMLSP_LK), $k6);
        $ce = Curl::mius($D_, $sI, $P8);
        return $ce;
    }
    public function vml($P8)
    {
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY);
        $ce = Curl::vml($D_, $sI, $P8, $this->getBaseUrl());
        return $ce;
    }
    public function ccl()
    {
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY);
        $ce = Curl::ccl($D_, $sI);
        return $ce;
    }
    public function log_debug($qf = '', $aW = null)
    {
        if (!(!is_object($qf) && !is_array($qf))) {
            goto YG;
        }
        $this->logger->info("\x4d\x4f\x20\x54\x77\157\x46\x41\x20\120\162\145\x6d\x69\165\155\40\x50\154\x61\x6e\x3a" . $qf);
        YG:
        if (!(null !== $aW)) {
            goto Uw;
        }
        if (is_object($aW) || is_array($aW)) {
            goto qQ;
        }
        $this->logger->info($aW);
        goto oB;
        qQ:
        oB:
        Uw:
    }
    public function insertRowInTable($xC, $AP)
    {
        $this->log_debug("\151\x6e\163\x65\162\x74\40\x72\x6f\x77\40");
        $this->resource->getConnection()->insertMultiple($xC, $AP);
    }
    public function updateColumnInTable($xC, $v8, $Vc, $wU, $ed, $N2)
    {
        $this->log_debug("\165\160\x64\141\x74\x65\103\x6f\x6c\x75\155\x6e\111\156\124\x61\x62\x6c\x65");
        $pq = [$wU . "\x20\x3d\40\x3f" => $ed, "\167\x65\x62\x73\151\x74\145\x5f\x69\144\x20\75\40\x3f" => $N2];
        $this->resource->getConnection()->update($xC, [$v8 => $Vc], $pq);
    }
    public function getCustomerMoTfaUserDetails($xC, $NZ = false)
    {
        $qu = $this->storeManager->getStore()->getWebsiteId();
        $OF = $this->resource->getConnection()->select()->from($xC, ["\165\163\x65\x72\156\141\155\145", "\x61\x63\x74\151\166\x65\x5f\155\145\x74\150\x6f\x64", "\x63\157\156\146\151\147\165\x72\145\x64\137\155\145\x74\x68\157\144\x73", "\145\155\x61\151\x6c", "\160\150\x6f\x6e\145", "\164\x72\141\x6e\x73\141\143\x74\151\x6f\156\111\x64", "\163\x65\143\x72\145\164", "\x69\144", "\x63\x6f\165\x6e\164\x72\171\x63\x6f\x64\145", "\153\142\x61\137\155\145\164\150\157\144", "\167\145\x62\163\151\164\x65\x5f\151\x64", "\163\153\x69\160\137\x74\x77\x6f\x66\x61", "\x77\x68\x69\164\x65\154\151\163\x74\x5f\145\x6e\x61\x62\x6c\x65\x64"])->where("\165\x73\145\162\x6e\x61\x6d\x65\x3d\x27" . $NZ . "\x27\x20\141\156\x64\40\x77\145\142\x73\151\x74\x65\137\x69\144\x3d\x27" . $qu . "\47");
        $gM = $this->resource->getConnection()->fetchAll($OF);
        return $gM;
    }
    public function getAllMoTfaUserDetails($xC, $NZ = false, $N2 = false)
    {
        $OF = $this->resource->getConnection()->select()->from($xC, ["\165\x73\145\x72\156\x61\155\x65", "\x61\143\164\x69\166\x65\137\x6d\145\164\x68\x6f\x64", "\x63\157\x6e\x66\x69\x67\x75\162\x65\144\137\x6d\x65\164\150\x6f\x64\163", "\x65\x6d\141\151\x6c", "\x70\150\x6f\x6e\x65", "\164\x72\141\156\x73\141\x63\164\x69\x6f\156\x49\144", "\163\x65\x63\x72\x65\164", "\x69\144", "\143\x6f\x75\156\x74\162\171\143\x6f\144\145", "\153\x62\x61\137\155\x65\x74\150\x6f\144", "\x77\x65\142\x73\151\164\x65\x5f\x69\x64"])->where("\165\x73\145\x72\x6e\x61\x6d\145\x3d\x27" . $NZ . "\x27\40\x61\x6e\x64\x20\167\x65\x62\163\x69\x74\145\x5f\151\144\75\x27" . $N2 . "\x27");
        $gM = $this->resource->getConnection()->fetchAll($OF);
        return $gM;
    }
    public function updateRowInTable($xC, $Qb, $wU, $ed)
    {
        $this->log_debug("\x75\x70\144\141\x74\145\x52\x6f\167\x49\x6e\x54\x61\x62\154\x65");
        $this->resource->getConnection()->update($xC, $Qb, [$wU . "\40\75\x20\77" => $ed]);
    }
    public function deleteRowInTable($xC, $wU, $ed)
    {
        $Ki = $this->resource->getConnection();
        $q0 = "\104\105\x4c\105\x54\x45\x20\106\122\117\x4d\40" . $xC . "\x20\127\x48\x45\122\x45\x20" . $wU . "\75" . $ed;
        $Ki->exec($q0);
    }
    public function deleteRowInTableWithWebsiteID($xC, $wU, $ed, $N2)
    {
        $this->log_debug("\144\145\154\x65\x74\x65\122\x6f\x77\x49\156\164\141\x62\x6c\145");
        $Ki = $this->resource->getConnection();
        $q0 = "\x44\105\114\105\124\105\x20\106\122\117\115\40" . $xC . "\x20\127\110\x45\122\x45\x20" . $wU . "\x3d\47" . $ed . "\x27\40\x61\156\x64\x20\167\145\x62\x73\151\164\145\x5f\x69\x64\75\47" . $N2 . "\x27";
        $Ki->exec($q0);
    }
    public function getValueFromTableSQL($xC, $jG, $wU, $ed)
    {
        $Ax = $this->resource->getConnection();
        $mn = "\123\x45\114\x45\x43\x54\x20" . $jG . "\x20\106\122\x4f\115\x20" . $xC . "\40\x57\x48\x45\122\x45\x20" . $wU . "\x20\75\x20" . $ed;
        $this->log_debug("\123\121\x4c\x3a\x20" . $mn);
        $DN = $Ax->fetchOne($mn);
        $this->log_debug("\162\x65\x73\165\154\x74\40\x73\x71\x6c\72\40" . $DN);
        return $DN;
    }
    public function verifyGauthCode($P8, $u2, $bU = 3, $y9 = null)
    {
        $this->log_debug("\124\x77\x6f\x46\101\125\164\154\151\164\171\72\40\166\x65\162\151\146\171\x47\141\x75\x74\x68\103\157\x64\x65\x3a\x20\145\170\145\x63\165\x74\x65");
        $iL = $this->getAuthenticatorSecret($u2);
        if (!($iL == false)) {
            goto E8;
        }
        $iL = $this->getSessionValue(TwoFAConstants::PRE_SECRET);
        E8:
        $W_ = $this->getSessionValue(TwoFAConstants::CUSTOMER_INLINE);
        if (!$W_) {
            goto ZE;
        }
        $iL = $this->getSessionValue("\x63\x75\x73\x74\157\155\x65\x72\x5f\151\x6e\154\x69\x6e\145\x5f\x73\145\x63\162\x65\x74");
        $this->setSessionValue(TwoFAConstants::CUSTOMER_SECRET, $iL);
        ZE:
        $sv = $this->getSessionValue(TwoFAConstants::ADMIN_IS_INLINE);
        if (!$sv) {
            goto tA;
        }
        $iL = $this->getSessionValue(TwoFAConstants::ADMIN_SECRET);
        tA:
        $Th = array("\163\x74\141\164\165\x73" => "\106\x41\114\123\x45");
        if (!($y9 === null)) {
            goto uZ;
        }
        $y9 = floor(time() / 30);
        uZ:
        if (!(strlen($P8) != 6)) {
            goto yM;
        }
        return json_encode($Th);
        yM:
        $Iv = -$bU;
        cf:
        if (!($Iv <= $bU)) {
            goto Zv;
        }
        $IX = $this->getCode($iL, $y9 + $Iv);
        if (!$this->timingSafeEquals($IX, $P8)) {
            goto EI;
        }
        $Th["\x73\x74\x61\x74\x75\163"] = "\123\x55\x43\103\x45\123\x53";
        return json_encode($Th);
        EI:
        fI:
        ++$Iv;
        goto cf;
        Zv:
        return json_encode($Th);
    }
    function timingSafeEquals($hA, $rF)
    {
        if (!function_exists("\150\141\163\x68\x5f\x65\161\165\x61\154\x73")) {
            goto HN;
        }
        return hash_equals($hA, $rF);
        HN:
        $Fa = strlen($hA);
        $yn = strlen($rF);
        if (!($yn != $Fa)) {
            goto hD;
        }
        return false;
        hD:
        $DN = 0;
        $Iv = 0;
        sj:
        if (!($Iv < $yn)) {
            goto S2;
        }
        $DN |= ord($hA[$Iv]) ^ ord($rF[$Iv]);
        G6:
        ++$Iv;
        goto sj;
        S2:
        return $DN === 0;
    }
    function getCode($iL, $KH = null)
    {
        if (!($KH === null)) {
            goto C3;
        }
        $KH = floor(time() / 30);
        C3:
        $au = $this->_base32Decode($iL);
        $Wj = chr(0) . chr(0) . chr(0) . chr(0) . pack("\x4e\52", $KH);
        $OB = hash_hmac("\x53\x48\x41\x31", $Wj, $au, true);
        $tp = ord(substr($OB, -1)) & 0xf;
        $g6 = substr($OB, $tp, 4);
        $Dz = unpack("\116", $g6);
        $Dz = $Dz[1];
        $Dz = $Dz & 0x7fffffff;
        $rb = pow(10, 6);
        return str_pad($Dz % $rb, 6, "\x30", STR_PAD_LEFT);
    }
    function _base32Decode($iL)
    {
        if (!empty($iL)) {
            goto qG;
        }
        return '';
        qG:
        $wJ = $this->_getBase32LookupTable();
        $oR = array_flip($wJ);
        $Bd = substr_count($iL, $wJ[32]);
        $dN = array(6, 4, 3, 1, 0);
        if (in_array($Bd, $dN)) {
            goto x3;
        }
        return false;
        x3:
        $Iv = 0;
        J3:
        if (!($Iv < 4)) {
            goto rh;
        }
        if (!($Bd == $dN[$Iv] && substr($iL, -$dN[$Iv]) != str_repeat($wJ[32], $dN[$Iv]))) {
            goto Cs;
        }
        return false;
        Cs:
        x2:
        ++$Iv;
        goto J3;
        rh:
        $iL = str_replace("\x3d", '', $iL);
        $iL = str_split($iL);
        $CK = '';
        $Iv = 0;
        ZW:
        if (!($Iv < count($iL))) {
            goto iw;
        }
        $b3 = '';
        if (in_array($iL[$Iv], $wJ)) {
            goto vi;
        }
        return false;
        vi:
        $ro = 0;
        o2:
        if (!($ro < 8)) {
            goto in;
        }
        $b3 .= str_pad(base_convert($oR[$iL[$Iv + $ro]], 10, 2), 5, "\60", STR_PAD_LEFT);
        fb:
        ++$ro;
        goto o2;
        in:
        $uC = str_split($b3, 8);
        $JJ = 0;
        PP:
        if (!($JJ < count($uC))) {
            goto k3;
        }
        $CK .= ($TY = chr(base_convert($uC[$JJ], 2, 10))) || ord($TY) == 48 ? $TY : '';
        tX:
        ++$JJ;
        goto PP;
        k3:
        AB:
        $Iv = $Iv + 8;
        goto ZW;
        iw:
        return $CK;
    }
    function _getBase32LookupTable()
    {
        return array("\x41", "\x42", "\x43", "\x44", "\105", "\x46", "\x47", "\110", "\x49", "\x4a", "\113", "\114", "\x4d", "\116", "\117", "\x50", "\121", "\122", "\x53", "\x54", "\x55", "\126", "\x57", "\130", "\131", "\x5a", "\x32", "\x33", "\64", "\x35", "\66", "\x37", "\x3d");
    }
    public function getCustomerPhoneFromEmail($hc = false)
    {
        $this->customerModel->setWebsiteId($this->storeManager->getStore()->getWebsiteId());
        $sQ = $this->customerModel->loadByEmail($hc);
        if (!($sQ->getId() && $sQ->getDefaultBillingAddress())) {
            goto yq;
        }
        $sa = $sQ->getDefaultBillingAddress();
        if (!$sa->getTelephone()) {
            goto Jr;
        }
        return $sa->getTelephone();
        Jr:
        yq:
        return null;
    }
    public function getCustomerCountryFromEmail($hc = false)
    {
        $this->customerModel->setWebsiteId($this->storeManager->getStore()->getWebsiteId());
        $sQ = $this->customerModel->loadByEmail($hc);
        if (!($sQ->getId() && $sQ->getDefaultBillingAddress())) {
            goto os;
        }
        $sa = $sQ->getDefaultBillingAddress();
        if (!$sa->getCountryId()) {
            goto xk;
        }
        return $sa->getCountryId();
        xk:
        os:
        return null;
    }
    public function Customgateway_GenerateOTP()
    {
        $N0 = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_OTP_LENGTH);
        $pT = "\x30\61\x32\63\x34\65\x36\67\70\x39";
        $zY = strlen($pT);
        $CH = '';
        $Iv = 0;
        rd:
        if (!($Iv < $N0)) {
            goto jp;
        }
        $CH .= $pT[rand(0, $zY - 1)];
        gG:
        $Iv++;
        goto rd;
        jp:
        $this->setSessionValue("\x63\165\163\164\x6f\155\147\141\164\x65\x77\141\171\137\x6f\x74\x70", $CH);
        return $CH;
    }
    public function customgateway_validateOTP($SQ)
    {
        $dB = $this->getSessionValue("\143\165\163\164\157\155\147\x61\x74\x65\167\x61\171\137\157\164\x70");
        if (!($dB == NULL)) {
            goto km;
        }
        return "\106\x41\111\x4c\105\104";
        km:
        if ($dB == $SQ) {
            goto Fa;
        }
        return "\x46\101\x49\x4c\105\104";
        goto fr;
        Fa:
        return "\x53\x55\103\103\105\x53\123";
        fr:
    }
    public function OTP_over_SMSandEMAIL_Message($hc, $xh, $q8, $MP)
    {
        $su = explode("\100", $hc);
        $xi = $su[0][0] . "\170\x78\x78\170\170\170\x78\170\x78\x78\x40" . $su[1];
        $zH = "\x78\x78\170\170\x78\170\170\170" . substr($xh, -2);
        if ($q8 == "\x53\125\103\x43\105\x53\123" && $MP == "\x53\125\103\103\x45\123\x53") {
            goto fO;
        }
        if ($q8 == "\123\125\x43\103\105\123\x53" && $MP == "\106\101\111\114\105\x44") {
            goto Fd;
        }
        if ($q8 == "\106\101\x49\x4c\105\x44" && $MP == "\123\x55\103\x43\105\x53\123") {
            goto vu;
        }
        return "\x46\141\x69\x6c\x65\144\40\164\x6f\40\163\x65\x6e\x64\40\x4f\x54\x50\x20\164\157\x20\x65\x6d\141\151\x6c\40\141\x6e\144\40\160\150\157\x6e\145\56\x20\x50\x6c\145\141\163\x65\x20\x43\x6f\x6e\x74\x61\x63\x74\x20\x59\157\165\162\x20\101\x64\x6d\151\156\151\x73\x74\x72\x61\164\157\162\x2e";
        goto Ks;
        fO:
        return "\x54\x68\145\x20\117\124\x50\40\x68\141\163\x20\142\145\x65\156\40\163\145\156\x74\40\164\157\x20\x79\x6f\x75\162\40\x50\x68\x6f\156\145\72\40" . $zH . "\40\141\156\x64\40\105\155\x61\151\154\x3a" . $xi . "\56\x20\x50\x6c\x65\x61\163\x65\40\x65\156\164\x65\162\x20\x74\x68\145\x20\x4f\x54\120\40\171\157\165\40\x72\145\143\x65\x69\166\x65\x64\x20\164\157\x20\126\x61\x6c\x69\144\x61\x74\145\56";
        goto Ks;
        Fd:
        return "\124\x68\x65\40\117\124\120\x20\x68\141\163\x20\x62\x65\x65\x6e\x20\x73\x65\x6e\164\x20\x74\157\x20\x79\157\165\162\x20\x45\x6d\141\151\x6c\72" . $xi . "\40\x61\x6e\x64\40\106\x61\151\x6c\x65\x64\x20\x74\157\x20\163\x65\156\x64\x20\117\124\120\40\x74\x6f\x20\120\150\x6f\156\x65\x2e\x20\x50\x6c\145\141\x73\145\x20\145\x6e\164\145\162\40\x74\150\x65\40\x4f\x54\x50\40\x79\157\165\40\x72\x65\x63\x65\x69\166\x65\144\40\x74\x6f\40\126\x61\x6c\151\144\141\164\145\56";
        goto Ks;
        vu:
        return "\124\150\145\x20\117\124\x50\40\150\x61\x73\40\142\x65\145\x6e\x20\x73\x65\156\164\x20\x74\x6f\x20\171\157\x75\x72\x20\x50\150\157\156\145\72\x20" . $zH . "\x20\141\156\x64\40\x46\x61\151\154\145\144\40\x74\x6f\x20\163\145\156\144\x20\117\124\120\40\x74\157\x20\x65\x6d\x61\x69\154\56\x20\120\154\145\141\x73\x65\40\145\x6e\x74\145\x72\x20\164\x68\x65\x20\x4f\x54\x50\40\171\157\x75\40\162\x65\143\x65\151\166\145\144\40\x74\157\40\x56\x61\154\x69\x64\141\x74\145\56";
        Ks:
    }
    public function check_customGateway_methodConfigured()
    {
        $j6 = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_EMAIL_FROM);
        $vG = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_EMAIL_NAME);
        $Sy = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_HOSTNAME);
        $AD = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_PORT);
        $JX = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_AUTHENTICATION);
        $JO = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_USERNAME);
        $zg = $this->getStoreConfig(TwoFAConstants::CUSTOM_GATEWAY_PASSWORD);
        $N0 = $this->getStoreConfig(TwoFAConstants::CUSTOMGATEWAY_OTP_LENGTH);
        if (is_null($j6) || is_null($vG) || is_null($Sy) || is_null($AD) || is_null($JX) || is_null($JO) || is_null($zg) || is_null($N0)) {
            goto JJ;
        }
        return false;
        goto K9;
        JJ:
        return true;
        K9:
    }
    public function update_status($P8)
    {
        $D_ = $this->getStoreConfig(TwoFAConstants::CUSTOMER_KEY);
        $sI = $this->getStoreConfig(TwoFAConstants::API_KEY);
        $ce = Curl::update_status($D_, $sI, $P8, $this->getBaseUrl());
        return $ce;
    }
    public function getCustomerFromAttributes($ek)
    {
        $this->log_debug("\x54\x77\157\106\x61\x55\x74\151\x6c\151\x74\x79\72\40\x67\145\164\x43\x75\163\164\157\x6d\x65\162\106\162\157\155\x41\164\164\162\x69\142\165\x74\145\163\x20");
        $this->customerModel->setWebsiteId($this->storeManager->getStore()->getWebsiteId());
        $sQ = $this->customerModel->loadByEmail($ek);
        return !is_null($sQ->getId()) ? $sQ : false;
    }
    public function getGroupNameById($YG)
    {
        $CE = $this->groupRepository->getById($YG);
        return $CE->getCode();
    }
    public function check2fa_enterprisePlan()
    {
        $tQ = $this->getStoreConfig(TwoFAConstants::PLAN_VERIFIED);
        $QU = TwoFAConstants::PLAN_NAME == "\155\x61\x67\x65\x6e\164\157\137\x32\146\141\x5f\x70\x72\145\x6d\151\x75\x6d\137\160\x6c\x61\x6e" && $tQ ? 1 : 0;
        return $QU;
    }
    public function getemailtemplatelist()
    {
        $OF = $this->resource->getConnection()->select()->from("\x65\x6d\141\151\154\x5f\164\145\x6d\x70\x6c\x61\x74\145", ["\164\145\x6d\160\x6c\141\164\x65\137\x63\157\x64\145", "\164\145\155\x70\154\x61\x74\x65\137\x69\x64"]);
        $gM = $this->resource->getConnection()->fetchAll($OF);
        return $gM;
    }
    public function get_client_ip()
    {
        $this->log_debug("\124\167\x6f\x46\101\125\x74\x69\154\151\164\171\x2e\x70\150\x70\40\72\40\151\x6e\x73\151\x64\x65\40\x67\145\x74\x5f\143\x6c\x69\x65\x6e\164\x5f\151\160");
        if (getenv("\110\x54\x54\120\x5f\103\x4c\x49\x45\x4e\124\137\111\x50")) {
            goto k2;
        }
        if (getenv("\x52\x45\x4d\x4f\x54\105\137\101\104\x44\122")) {
            goto Z1;
        }
        if (getenv("\x48\x54\x54\x50\137\130\x5f\106\x4f\122\x57\101\122\104\x45\x44\137\x46\117\122")) {
            goto a_;
        }
        if (getenv("\x48\124\124\x50\x5f\x58\137\x46\x4f\122\127\101\122\104\x45\x44")) {
            goto SU;
        }
        if (getenv("\110\x54\124\x50\x5f\106\117\122\127\x41\122\x44\x45\x44\x5f\106\117\x52")) {
            goto ki;
        }
        if (getenv("\x48\x54\x54\120\137\x46\x4f\122\127\x41\122\104\x45\104")) {
            goto kI;
        }
        $Xi = "\125\116\113\116\x4f\x57\116";
        goto QW;
        kI:
        $Xi = getenv("\110\124\x54\120\x5f\x46\117\122\x57\x41\x52\x44\x45\x44");
        QW:
        goto wl;
        ki:
        $Xi = getenv("\110\x54\x54\120\x5f\106\117\122\x57\101\x52\x44\x45\x44\x5f\106\x4f\x52");
        wl:
        goto PV;
        SU:
        $Xi = getenv("\110\x54\x54\120\137\x58\x5f\106\117\x52\x57\101\x52\104\105\104");
        PV:
        goto xX;
        a_:
        $Xi = getenv("\x48\124\124\120\137\x58\x5f\x46\x4f\122\x57\101\x52\104\105\x44\137\106\x4f\122");
        xX:
        goto Cu;
        Z1:
        $Xi = getenv("\x52\105\115\117\x54\x45\137\x41\104\104\x52");
        Cu:
        goto m0;
        k2:
        $Xi = getenv("\x48\124\x54\120\137\103\114\x49\x45\x4e\x54\137\x49\120");
        m0:
        return $Xi;
    }
    public function getIpWhitelistedIpAddresses($T9)
    {
        try {
            $this->log_debug("\124\x77\x6f\106\101\125\164\x69\x6c\151\164\171\56\160\x68\160\x3a\40\111\156\x73\x69\144\145\x20\x67\145\164\x49\x70\x41\x64\144\162\x65\163\163\x65\x73\102\x79\x54\x79\x70\145\x20\x77\151\x74\x68\40\111\120\40\124\171\160\x65\x3a\x20" . $T9);
            if ($T9 == "\x63\165\x73\x74\x6f\155\x65\162") {
                goto d2;
            }
            if ($T9 == "\141\x64\155\x69\x6e") {
                goto c2;
            }
            return [];
            goto hm;
            d2:
            $If = $this->ipWhitelistedFactory->create();
            goto hm;
            c2:
            $If = $this->ipWhitelistedAdminFactory->create();
            hm:
            $WI = $If->getCollection()->getColumnValues("\151\160\x5f\x61\144\x64\x72\145\x73\163");
            return $WI;
        } catch (\Exception $qW) {
            return [];
        }
    }
    public function checkTrustedIPs($T9)
    {
        $this->log_debug("\124\167\157\x46\101\125\x74\151\154\x69\164\171\x2e\160\150\160\40\x3a\x20\151\156\x73\x69\144\x65\x20\x63\x68\x65\x63\x6b\x54\x72\165\163\164\145\144\111\x50\163");
        $o4 = $this->get_client_ip();
        $bL = $this->getIpWhitelistedIpAddresses($T9);
        if (!empty($bL)) {
            goto w3;
        }
        return false;
        w3:
        if (!($T9 == "\x63\x75\x73\x74\x6f\x6d\145\162")) {
            goto Eq;
        }
        if (!($this->getStoreConfig(TwoFAConstants::IP_CUSTOMER) != 1)) {
            goto sF;
        }
        return false;
        sF:
        Eq:
        if (!($T9 == "\x61\144\155\151\x6e")) {
            goto Ng;
        }
        if (!($this->getStoreConfig(TwoFAConstants::IP_ADMIN) != 1)) {
            goto vo;
        }
        return false;
        vo:
        Ng:
        $q7 = false;
        foreach ($bL as $Dz) {
            if (stristr($Dz, "\x2d")) {
                goto PZ;
            }
            if (!($o4 == $Dz)) {
                goto br;
            }
            $q7 = true;
            goto Xu;
            br:
            goto uS;
            PZ:
            list($k0, $EK) = explode("\55", $Dz, 2);
            $Br = ip2long($k0);
            $Z8 = ip2long($EK);
            $we = ip2long($o4);
            if (!($Br !== false && $Z8 !== false && $we !== false && $we >= $Br && $we <= $Z8)) {
                goto go;
            }
            $q7 = true;
            goto Xu;
            go:
            uS:
            TH:
        }
        Xu:
        return $q7;
    }

    public function getClearSessionForSkipTwoFA()
    {
        $this->setSessionValue(TwoFAConstants::CUSTOMER_INLINE, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_SECRET, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_TRANSACTIONID, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_USERNAME, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_ACTIVE_METHOD, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_CONFIG_METHOD, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER__PHONE, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_COUNTRY_CODE, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER__EMAIL, NULL);
        $this->setSessionValue(TwoFAConstants::CUSTOMER_WEBSITE_ID, NULL);
    }
    public function whitelistCustomerThroughSession($lV = false)
    {
        $u2 = $this->getSessionValue("\x6d\x6f\x75\x73\x65\162\x6e\x61\155\145");
        $rn = $this->getCustomerMoTfaUserDetails("\155\x69\156\151\x6f\162\x61\156\147\145\137\x74\x66\141\x5f\x75\163\145\x72\163", $u2);
        $N2 = $this->getSessionValue(TwoFAConstants::CUSTOMER_WEBSITE_ID);
        if (is_array($rn) && sizeof($rn) > 0) {
            goto gK;
        }
        $this->getSessionValue(TwoFAConstants::CUSTOMER_INLINE);
        $xh = $this->getSessionValue(TwoFAConstants::CUSTOMER__PHONE);
        $hc = $this->getSessionValue(TwoFAConstants::CUSTOMER__EMAIL);
        $YR = $this->getSessionValue(TwoFAConstants::CUSTOMER_COUNTRY_CODE);
        $iR = $this->getSessionValue(TwoFAConstants::CUSTOMER_TRANSACTIONID);
        if ($lV) {
            goto pJ;
        }
        $ea = $this->getSessionValue(TwoFAConstants::CUSTOMER_ACTIVE_METHOD) ?? "\125\x73\145\x72\137\163\153\x69\x70\124\x77\157\146\141\137\x70\x65\x72\155\x61\x6e\x65\156\164\x6c\x79";
        $vw = $this->getSessionValue(TwoFAConstants::CUSTOMER_CONFIG_METHOD) ?? "\125\163\x65\162\x5f\163\153\151\160\x54\167\157\146\x61\x5f\160\x65\162\155\141\x6e\145\x6e\x74\154\171";
        $iL = $this->getSessionValue(TwoFAConstants::CUSTOMER_SECRET) ?? "\x55\x73\145\162\x5f\x73\x6b\x69\160\124\167\x6f\x66\141\137\160\145\x72\155\x61\x6e\145\x6e\x74\154\171";
        $AP = [["\x75\163\x65\x72\156\141\155\x65" => $u2, "\x63\x6f\x6e\146\151\x67\165\x72\x65\144\137\155\145\x74\150\157\144\x73" => $vw, "\x61\x63\164\x69\166\x65\137\x6d\145\164\150\x6f\x64" => $ea, "\x73\x65\x63\162\145\x74" => $iL, "\x77\x65\142\x73\151\164\x65\137\x69\144" => $N2, "\167\150\x69\164\x65\x6c\151\163\x74\137\145\156\141\142\154\145\144" => true]];
        goto tG;
        pJ:
        $ea = $this->getSessionValue(TwoFAConstants::CUSTOMER_ACTIVE_METHOD) ?? "\x55\163\145\162\137\x73\x6b\151\x70\124\x77\157\x66\141";
        $vw = $this->getSessionValue(TwoFAConstants::CUSTOMER_CONFIG_METHOD) ?? "\x55\163\x65\x72\137\x73\x6b\x69\x70\124\x77\x6f\x66\x61";
        $iL = $this->getSessionValue(TwoFAConstants::CUSTOMER_SECRET) ?? "\x55\163\145\x72\x5f\x73\x6b\151\160\x54\x77\157\146\x61";
        $AP = [["\x75\x73\145\x72\x6e\141\155\x65" => $u2, "\143\x6f\156\146\151\147\x75\x72\x65\x64\x5f\155\x65\x74\x68\157\144\x73" => $vw, "\141\143\x74\x69\x76\x65\x5f\x6d\145\x74\x68\x6f\x64" => $ea, "\163\x65\143\162\145\164" => $iL, "\167\145\142\x73\x69\164\x65\137\x69\144" => $N2, "\x77\150\x69\164\145\x6c\151\163\x74\137\x65\x6e\141\x62\x6c\x65\x64" => false]];
        tG:
        $this->insertRowInTable("\155\151\x6e\x69\157\162\x61\156\147\x65\137\164\146\141\137\x75\163\145\x72\x73", $AP);
        if (!$lV) {
            goto gh;
        }
        $this->updateColumnInTable("\155\x69\156\151\157\x72\x61\x6e\147\x65\x5f\164\146\x61\x5f\x75\163\145\162\163", "\x73\x6b\151\160\137\x74\167\157\146\x61", (int) 1, "\x75\163\x65\x72\156\141\x6d\145", $u2, $N2);
        gh:
        if (!($ea == "\x4f\x4f\x53" || $ea == "\x4f\x4f\x53\105")) {
            goto AU;
        }
        if (!($xh != NULL)) {
            goto yJ;
        }
        $this->updateColumnInTable("\155\151\156\151\157\162\x61\x6e\147\x65\x5f\164\146\x61\137\x75\x73\x65\162\163", "\x70\150\157\x6e\x65", $xh, "\165\x73\x65\x72\156\x61\x6d\145", $u2, $N2);
        $this->updateColumnInTable("\155\x69\156\x69\157\x72\x61\x6e\147\145\137\x74\146\141\137\165\163\x65\x72\163", "\x63\157\x75\x6e\164\x72\x79\x63\157\x64\x65", $YR, "\x75\163\x65\162\156\141\155\x65", $u2, $N2);
        yJ:
        AU:
        if (!($ea == "\117\x4f\105" || $ea == "\x4f\117\x53\105")) {
            goto dS;
        }
        if (!($hc != NULL)) {
            goto Mg;
        }
        $this->updateColumnInTable("\x6d\151\156\x69\x6f\x72\x61\x6e\x67\x65\137\x74\146\x61\x5f\165\x73\145\162\x73", "\145\155\x61\151\154", $hc, "\x75\163\145\x72\x6e\141\x6d\145", $u2, $N2);
        Mg:
        dS:
        goto h5;
        gK:
        if ($lV) {
            goto UG;
        }
        $this->updateColumnInTable("\155\151\156\151\157\162\141\156\x67\x65\137\164\146\141\x5f\165\163\x65\x72\x73", "\167\150\x69\x74\145\154\x69\163\x74\x5f\x65\156\141\x62\x6c\x65\x64", true, "\165\x73\145\x72\x6e\141\x6d\x65", $u2, $N2);
        $this->updateColumnInTable("\155\x69\156\x69\x6f\162\141\156\x67\x65\137\x74\x66\141\x5f\x75\163\x65\x72\x73", "\x61\x63\164\151\166\x65\137\x6d\x65\164\150\157\x64", "\125\x73\x65\x72\x5f\163\x6b\x69\x70\124\167\157\146\x61\137\x70\x65\x72\x6d\x61\x6e\x65\156\164\154\x79", "\x75\163\x65\162\x6e\141\155\x65", $u2, $N2);
        $this->updateColumnInTable("\155\151\x6e\x69\157\x72\141\x6e\x67\145\x5f\x74\x66\x61\137\x75\163\x65\162\163", "\x73\x65\143\x72\x65\164", "\x55\x73\145\162\x5f\x73\x6b\151\160\x54\167\157\x66\x61\137\x70\145\162\x6d\141\156\145\156\x74\x6c\171", "\165\x73\x65\162\x6e\x61\x6d\x65", $u2, $N2);
        $this->updateColumnInTable("\x6d\x69\x6e\x69\157\x72\x61\x6e\x67\145\137\x74\x66\141\137\x75\x73\x65\162\163", "\143\157\x6e\146\x69\147\165\162\145\144\x5f\155\145\x74\150\157\x64\163", "\125\x73\145\x72\137\x73\x6b\x69\x70\x54\167\x6f\146\x61\x5f\x70\145\x72\155\141\156\145\x6e\x74\x6c\x79", "\x75\x73\x65\162\156\x61\155\x65", $u2, $N2);
        goto MA;
        UG:
        $rn = $this->getCustomerMoTfaUserDetails("\x6d\151\x6e\151\157\x72\x61\156\147\145\137\x74\146\x61\137\x75\163\x65\162\x73", $u2);
        if (!empty($rn) && isset($rn[0]["\163\153\x69\160\x5f\164\167\157\146\141"])) {
            goto iQ;
        }
        $Jb = 1;
        goto Wa;
        iQ:
        $RG = $rn[0]["\163\153\151\160\x5f\164\167\157\146\x61"];
        $Jb = (int) $RG + 1;
        Wa:
        $this->updateColumnInTable("\x6d\151\156\x69\x6f\x72\x61\156\147\x65\137\x74\x66\x61\x5f\x75\163\145\x72\x73", "\163\x6b\151\x70\x5f\164\167\x6f\x66\x61", $Jb, "\165\x73\145\162\156\x61\x6d\145", $u2, $N2);
        MA:
        h5:
    }
    public function loginAndRedirectCustomer()
    {
        $I3 = $this->getSessionValue("\x6d\157\x75\163\x65\162\x6e\x61\155\145");
        $user = $this->getCustomerFromAttributes($I3);
        $this->customerSession->setCustomerAsLoggedIn($user);
        $Pb = $this->url->getUrl("\x63\x75\x73\164\157\155\x65\162\x2f\x61\143\143\157\165\x6e\x74");
        $dP = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT);
        $dP->setUrl($Pb);
        return $dP;
    }
    public function getPermanentlySkipTwoFa()
    {
        $this->log_debug("\x54\167\x6f\x46\101\x55\164\151\x6c\151\164\171\56\160\150\x70\40\x3a\40\151\x6e\x73\x69\144\x65\x20\147\145\164\120\145\x72\x6d\141\x6e\x65\156\164\154\171\123\x6b\x69\160\x54\x77\157\x46\x61");
        $this->whitelistCustomerThroughSession(false);
        $this->getClearSessionForSkipTwoFA();
        return $this->loginAndRedirectCustomer();
    }
    public function getSkipTwoFa()
    {
        $this->log_debug("\124\167\157\x46\101\125\164\151\154\x69\x74\171\x2e\x70\150\160\40\x3a\40\x69\x6e\x73\x69\144\145\x20\x67\x65\164\x53\153\151\160\124\167\157\x46\x61");
        $this->whitelistCustomerThroughSession(true);
        $this->getClearSessionForSkipTwoFA();
        return $this->loginAndRedirectCustomer();
    }
}

Function Calls

None

Variables

None

Stats

MD5 a083100c5e1178a12590007ab17a7653
Eval Count 0
Decode Time 167 ms