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 Cart2Quote\License\Model; final class License implements \Cart2Quote\Quo..

Decoded Output download

<?php 
 namespace Cart2Quote\License\Model; final class License implements \Cart2Quote\Quotation\Model\LicenseInterface { const INACTIVE_STATE = "inactive"; const PENDING_STATE = "pending"; const ACTIVE_STATE = "active"; const UNREACHABLE = "unreachable"; const ALLOWED_PROPOSAL_AMOUNT = 15; private $TX81t = "CART2QUOTE_QUOTATION_LICENSE_CACHE"; private $ZRGoD = "jqxVgbz9o3vX06DN988BWWiLsysWJ91nx5J2AbcR"; private $fmMhX = "5sX&JUuWHtrxr)6A0z_BqWLxNTqKZ)G(aPG#Fr-X"; private $yp_N1 = "trial"; private $bv0TS = License::INACTIVE_STATE; private $EoBDN = "one_off"; private $lXir0; private $edition; private $licenseState; private $licenseType; private $expiryDate; private $orderId; private $vp33Q; private $fBhUL; private $w0_2b; private $Kq9fP; private $DqzSc; private $QlCr7; private $gtFPN; private $ouYSs; private $vADbp; private $KRj37; private $pG2eb; private function __construct() { goto jnTr7; h2ofr: $this->gtFPN = "3805a9df66b6ddcc36de19ec9f9fd4a97134e6a0a943bb8697cfc8accc1f38b1"; goto buQNX; FBJMn: $this->w0_2b = \Magento\Framework\App\ObjectManager::getInstance()->create(\Cart2Quote\License\Cache\Type\License::class); goto qPbkB; jnTr7: $this->vADbp = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\App\Filesystem\DirectoryList::class); goto l8JW2; FKuFb: $this->pG2eb = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Io\File::class); goto qJvii; l8JW2: $this->ouYSs = \Magento\Framework\App\ObjectManager::getInstance()->create(\Magento\Framework\Math\Random::class); goto FBJMn; qPbkB: $this->vp33Q = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Backend\Model\UrlInterface::class); goto wrt7Z; buQNX: $this->init(); goto TcaeR; wrt7Z: $this->fBhUL = \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class); goto wipBc; wipBc: $this->DqzSc = \Magento\Framework\App\ObjectManager::getInstance()->get(\Cart2Quote\License\Model\Session::class); goto FKuFb; qJvii: $this->QlCr7 = "85bb3e1655355bf5161d42f8439c3b60fa1b1a97"; goto h2ofr; TcaeR: } private function init() { goto kq0bZ; YleVR: if (!isset($ka9sA)) { goto GDqVU; } goto olCd6; TIOmz: $f1l1K = $this->getTempPath($this->getRandomTempFileName()); goto HpN8Y; jB_H1: if (!(!$f1l1K || !file_exists($f1l1K))) { goto okpMU; } goto TIOmz; xfrPd: $FWTtS = ["date" => date("Y-m-d"), "edition" => $this->yp_N1, "licenseState" => $this->bv0TS, "licenseType" => $this->EoBDN]; goto NSjq9; O85GN: if (!(!isset($ka9sA) || $ka9sA["date"] !== date("Y-m-d"))) { goto m9V3S; } goto i0xZb; kq0bZ: $f1l1K = $this->getFilePathFromSession(); goto jB_H1; o9fKs: $this->setLicenseProperties($FWTtS); goto CXDk2; NSjq9: $ka9sA = $this->getFromCache(); goto YleVR; VZ_bU: $this->storeInCache($FWTtS); goto xYrqb; i0xZb: $this->fetchLicenseData($FWTtS); goto VZ_bU; xYrqb: m9V3S: goto o9fKs; fpgEQ: okpMU: goto xfrPd; G9BCu: GDqVU: goto O85GN; HpN8Y: $this->storeFilePathInSession($f1l1K); goto fpgEQ; olCd6: $FWTtS = array_merge($FWTtS, $ka9sA); goto G9BCu; CXDk2: } private function setLicenseProperties($ceLqU) { goto DLuI0; b9onO: M4J7H: goto O1pUJ; HpSU_: foreach ($e0Zgt as $J1yAc) { goto EbTFV; EbTFV: if (!isset($ceLqU[$J1yAc])) { goto UgBHi; } goto dqgL1; gwjy8: UgBHi: goto jC_kR; dqgL1: $this->{$J1yAc} = $ceLqU[$J1yAc]; goto gwjy8; jC_kR: J_ql2: goto PseZD; PseZD: } goto b9onO; DLuI0: $e0Zgt = ["licenseState", "licenseType", "expiryDate", "edition", "proposalAmount", "orderId"]; goto HpSU_; O1pUJ: } private function getSessionDataName() { return hash("sha256", "last_failed_attempt_date"); } private function encrypt($FWTtS, $t6hKM = null, $QlX6_ = null) { goto DCyKx; WGIsA: xeenA: goto wqeXT; yvDQL: $QlX6_ = $this->gtFPN; goto WGIsA; ZewMW: $t6hKM = $this->QlCr7; goto z6JTo; wqeXT: return \Cart2Quote\License\Security\Security::encrypt($FWTtS, $t6hKM, $QlX6_); goto nqXMw; z6JTo: gfQnh: goto HMJBJ; DCyKx: if ($t6hKM) { goto gfQnh; } goto ZewMW; HMJBJ: if ($QlX6_) { goto xeenA; } goto yvDQL; nqXMw: } private function getTempPath($Fewgr) { return sprintf("%s" . DIRECTORY_SEPARATOR . "%s", rtrim($this->vADbp->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP), DIRECTORY_SEPARATOR), ltrim($Fewgr, DIRECTORY_SEPARATOR)); } private function getRandomTempFileName() { return sprintf(".%s", $this->ouYSs->getRandomString(10, \Magento\Framework\Math\Random::CHARS_LOWERS)); } private function getFromCache() { goto IVWe2; IVWe2: $ldVGF = $this->w0_2b->load($this->TX81t); goto PiJA3; lQCFz: $FyTAn = $this->decrypt($ldVGF, $this->ZRGoD, $this->fmMhX); goto mRlsq; PiJA3: if ($ldVGF) { goto HI1Fd; } goto VtzJh; VtzJh: return null; goto TKE5L; TKE5L: HI1Fd: goto lQCFz; mRlsq: return json_decode($FyTAn, true); goto REWKG; REWKG: } private function decrypt($FWTtS, $t6hKM = null, $QlX6_ = null) { goto rm3fB; g3Dto: ffViI: goto b4VM3; VC_ux: return \Cart2Quote\License\Security\Security::decrypt($FWTtS, $t6hKM, $QlX6_); goto Xyhhg; seK2X: $t6hKM = $this->QlCr7; goto g3Dto; xM8rK: I_WJD: goto VC_ux; hoM1m: $QlX6_ = $this->gtFPN; goto xM8rK; rm3fB: if ($t6hKM) { goto ffViI; } goto seK2X; b4VM3: if ($QlX6_) { goto I_WJD; } goto hoM1m; Xyhhg: } private function fetchLicenseData(&$FWTtS) { try { goto hNM9S; dFcvK: $ceLqU = $this->decrypt($ceLqU); goto x1_O3; aQcBj: $FWTtS["edition"] = $ceLqU["domain"]["license"]["edition_id"]; goto flsbe; hNM9S: $ceLqU = \Cart2Quote\License\Http\Client::getInstance()->getLicense(); goto dFcvK; aAD6r: $FWTtS["licenseState"] = $ceLqU["domain"]["license"]["license_state_id"]; goto Gclih; uCg6n: p1eAF: goto Lm84x; Gclih: $FWTtS["licenseType"] = $ceLqU["domain"]["license"]["license_type_id"]; goto JCs9M; Q0QC7: $FWTtS["orderId"] = isset($ceLqU["domain"]["license"]["order_id"]) ? $ceLqU["domain"]["license"]["order_id"] : null; goto leIQV; KKgkj: $FWTtS["date"] = date("Y-m-d"); goto aAD6r; x1_O3: $ceLqU = json_decode($ceLqU, true); goto kZX9d; leIQV: $this->resetFailedAttempt(); goto uCg6n; kZX9d: if (!isset($ceLqU["domain"]["license"], $ceLqU["domain"]["license"]["edition_id"], $ceLqU["domain"]["license"]["license_state_id"], $ceLqU["domain"]["license"]["license_type_id"])) { goto p1eAF; } goto KKgkj; JCs9M: $FWTtS["expiryDate"] = $ceLqU["domain"]["license"]["license_expiry_date"]; goto aQcBj; flsbe: $FWTtS["proposalAmount"] = $ceLqU["domain"]["proposals_sent"]; goto Q0QC7; Lm84x: } catch (\Exception $zGzVs) { goto hhos4; rR2Yn: $this->failedAttempt(); goto H8N2X; cyyw5: jjYaK: goto uxqZ7; EQB2x: $FWTtS["edition"] = $FWTtS["licenseType"] = $FWTtS["licenseState"] = License::UNREACHABLE; goto SrXRr; hhos4: $OqgOM = $this->getFailedAttemptDate(); goto UQJrm; SrXRr: goto PxgWr; goto cyyw5; uxqZ7: $FWTtS["licenseState"] = License::INACTIVE_STATE; goto R9mpV; UQJrm: if ($OqgOM && strtotime($OqgOM) <= strtotime("-7 day")) { goto jjYaK; } goto EQB2x; R9mpV: PxgWr: goto rR2Yn; H8N2X: } } private function getFilePathFromSession() { goto X1e7W; RalEY: R0wUY: goto G277m; G277m: return $this->decrypt($n2Zfz); goto ys5J1; XBNt_: return false; goto RalEY; SFR1V: if (isset($n2Zfz)) { goto R0wUY; } goto XBNt_; X1e7W: $n2Zfz = $this->DqzSc->getSessionData($this->getSessionDataName()); goto SFR1V; ys5J1: } private function storeFilePathInSession($n2Zfz) { $this->DqzSc->setSessionData($this->getSessionDataName(), $this->encrypt($n2Zfz)); } private function resetFailedAttempt() { goto DLT0e; L6S8G: unlink($t3Sxk); goto gXG1N; gXG1N: q8zSg: goto HGkXG; hbwZE: if (!file_exists($t3Sxk)) { goto q8zSg; } goto L6S8G; DLT0e: $t3Sxk = $this->getFilePathFromSession(); goto hbwZE; HGkXG: } private function getFailedAttemptDate() { try { goto d5kl4; wvlzO: return $this->decrypt(file_get_contents($n2Zfz)); goto k0sVM; k0sVM: h5buV: goto hM1aM; uJo8U: if (!file_exists($n2Zfz)) { goto h5buV; } goto wvlzO; d5kl4: $n2Zfz = $this->getFilePathFromSession(); goto uJo8U; hM1aM: } catch (\Exception $Bxw11) { } return null; } private function failedAttempt() { goto p1mnw; wVaHW: return $QZx0R; goto dlsI4; nfbDq: try { goto pcrRG; m6_nY: t1otc: goto lrt7_; fNe5F: $this->pG2eb->checkAndCreateFolder($xXs0_); goto m6_nY; tgOyF: if (is_dir($xXs0_)) { goto t1otc; } goto fNe5F; lrt7_: @file_put_contents($this->getFilePathFromSession(), $this->encrypt($QZx0R)); goto GzFqk; pcrRG: $xXs0_ = $this->vADbp->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP); goto tgOyF; GzFqk: } catch (\Exception $Bxw11) { } goto wVaHW; p1mnw: $QZx0R = date("Y-m-d"); goto nfbDq; dlsI4: } private function storeInCache($ldVGF) { goto HNZPg; HNZPg: $Bih_S = json_encode($ldVGF); goto WKIwX; LWK1y: $this->w0_2b->save($IFmBx, $this->TX81t); goto CKhlj; WKIwX: $IFmBx = $this->encrypt($Bih_S, $this->ZRGoD, $this->fmMhX); goto LWK1y; CKhlj: } public final function getDomain() { goto ig_3L; fbF1o: return $this->lXir0; goto FDGd2; v1weh: LcXg_: goto fbF1o; ig_3L: if (isset($this->lXir0)) { goto LcXg_; } goto ZJxKx; ZJxKx: $this->lXir0 = parse_url($this->vp33Q->getBaseUrl(), PHP_URL_HOST); goto v1weh; FDGd2: } public final function getEdition() { goto Se2sa; Se2sa: if (isset($this->{"edition"})) { goto gTrr3; } goto i3R0n; oBbNb: gTrr3: goto mybnt; mybnt: return $this->{"edition"}; goto ZdVwp; i3R0n: $this->{"edition"} = $this->yp_N1; goto oBbNb; ZdVwp: } public final function isActiveState() { return $this->getLicenseState() == License::ACTIVE_STATE; } public final function getLicenseState() { goto NSNmR; NSNmR: if (!(!isset($this->{"licenseState"}) || !License::isValid())) { goto tGWvE; } goto fEzWs; fEzWs: return $this->bv0TS; goto wCwpe; Nfh30: return $this->{"licenseState"}; goto DebZ4; wCwpe: tGWvE: goto Nfh30; DebZ4: } public final function getLicenseType() { goto ZhgNM; vJEV0: return $this->{"licenseType"}; goto FRjM9; ZhgNM: if (isset($this->{"licenseType"})) { goto nh32t; } goto SjYej; RZrnT: nh32t: goto vJEV0; SjYej: return $this->EoBDN; goto RZrnT; FRjM9: } public static final function isValid() { goto QPyTG; E12s6: try { goto SEPlb; s44Ff: $sJCZU = get_class($jqZVy); goto bLo9r; i7u98: $sbGah = \Cart2Quote\Features\Feature\FeatureList::getInstance($jqZVy); goto JJuu9; F8SCt: $x3xQC = $sbGah->getAllPlugins(); goto kgB5_; JJuu9: if (!($sbGah === null)) { goto cwSvM; } goto s44Ff; SEPlb: $jqZVy = self::getInstance(); goto i7u98; bLo9r: $jqZVy->fBhUL->error("Cart2Quote: The class: " . $sJCZU . " needs a check for: " . get_called_class()); goto ccDXI; qe0SR: cwSvM: goto F8SCt; ccDXI: return false; goto qe0SR; kgB5_: } catch (\Exception $Bxw11) { $nBP__ = "After installing Cart2Quote run "bin/magento setup:upgrade" before proceeding."; throw new \Magento\Framework\Exception\LocalizedException(xRZK6($nBP__)); } goto PSE0m; ZeYJ1: $hQhtv = true; goto G8QXI; QPyTG: if (!(self::getInstance()->getDomain() == "localhost")) { goto HZDtq; } goto jRaqV; gvG13: return self::getInstance()->Kq9fP = $hQhtv; goto x_OB1; jRaqV: return true; goto KZvm5; PSE0m: $DSkvE = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Interception\PluginList\PluginList::class); goto ZeYJ1; KZvm5: HZDtq: goto yEeJN; yEeJN: if (!self::getInstance()->Kq9fP) { goto Td_LJ; } goto VjlQ4; layc_: t0zfV: goto gvG13; SkI_v: Td_LJ: goto E12s6; VjlQ4: return true; goto SkI_v; G8QXI: foreach ($x3xQC as $n1EpM => $TvozX) { goto WVYjS; WVYjS: foreach ($TvozX["plugins"] as $SikyM => $CLeS_) { goto wk1gw; moKKk: goto VEV3Q; goto HxuQx; wk1gw: if ($DSkvE->isPluginLoaded($n1EpM, $CLeS_["instance"])) { goto fCExF; } goto OWU11; HxuQx: fCExF: goto djWxz; djWxz: vtAii: goto UJpK0; OWU11: $hQhtv = false; goto moKKk; UJpK0: } goto IPIQs; AQfdP: qVHvD: goto nO1ST; IPIQs: VEV3Q: goto AQfdP; nO1ST: } goto layc_; x_OB1: } public static final function getInstance() { goto N7MvL; YfztT: $FaoL0 = new License(); goto aQjR3; Veack: if (!($FaoL0 === null)) { goto x2g66; } goto YfztT; aQjR3: x2g66: goto Z1sh9; Z1sh9: return $FaoL0; goto vjjEq; N7MvL: static $FaoL0 = null; goto Veack; vjjEq: } public final function isInactiveState() { return $this->getLicenseState() == License::INACTIVE_STATE; } public final function isPendingState() { return $this->getLicenseState() == License::PENDING_STATE; } public final function isUnreachable() { return $this->getLicenseState() == License::UNREACHABLE; } public final function isUnreachableState() { return $this->isUnreachable(); } public final function setProposalSent() { goto q2MPm; BiUlP: \Cart2Quote\License\Http\Client::getInstance()->setProposalSent(); goto L1x66; q2MPm: if (!($this->getEdition() == "lite")) { goto D2YXi; } goto BiUlP; L1x66: $this->invalidateCache(); goto o4RdH; o4RdH: D2YXi: goto KgMTs; KgMTs: } public final function getProposalAmount() { return @$this->{"proposalAmount"}; } private function invalidateCache() { $this->w0_2b->remove($this->TX81t); } public final function reload() { $this->invalidateCache(); $this->init(); } public function getExpiryDate() { return @$this->{"expiryDate"}; } public function getOrderId() { return @$this->{"orderId"}; } public final function isAllowedForEdition($TDDqZ = "opensource") { $HNDlm = \Cart2Quote\License\Feature\Feature::getInstance($this); return $HNDlm->isAllowedForEdition($TDDqZ); } } ?>

Did this file decode correctly?

Original Code

<?php
 namespace Cart2Quote\License\Model; final class License implements \Cart2Quote\Quotation\Model\LicenseInterface { const INACTIVE_STATE = "\x69\156\141\143\164\151\166\x65"; const PENDING_STATE = "\160\x65\x6e\x64\151\x6e\x67"; const ACTIVE_STATE = "\x61\143\164\x69\166\x65"; const UNREACHABLE = "\165\x6e\162\x65\x61\x63\150\141\142\154\145"; const ALLOWED_PROPOSAL_AMOUNT = 15; private $TX81t = "\103\101\122\124\x32\x51\125\x4f\124\105\137\x51\x55\x4f\x54\x41\x54\111\117\x4e\137\x4c\111\x43\x45\116\123\x45\x5f\103\101\103\x48\105"; private $ZRGoD = "\x6a\161\x78\126\x67\142\x7a\71\157\63\x76\x58\60\66\104\116\x39\70\70\102\x57\x57\151\x4c\x73\171\x73\x57\112\71\61\156\170\65\112\x32\101\142\x63\122"; private $fmMhX = "\65\163\130\x26\x4a\x55\165\x57\110\164\162\x78\162\51\x36\x41\60\x7a\x5f\x42\x71\x57\x4c\170\116\x54\x71\x4b\x5a\51\x47\x28\x61\120\107\x23\x46\x72\x2d\130"; private $yp_N1 = "\164\162\151\141\x6c"; private $bv0TS = License::INACTIVE_STATE; private $EoBDN = "\x6f\x6e\145\x5f\157\146\x66"; private $lXir0; private $edition; private $licenseState; private $licenseType; private $expiryDate; private $orderId; private $vp33Q; private $fBhUL; private $w0_2b; private $Kq9fP; private $DqzSc; private $QlCr7; private $gtFPN; private $ouYSs; private $vADbp; private $KRj37; private $pG2eb; private function __construct() { goto jnTr7; h2ofr: $this->gtFPN = "\x33\70\x30\65\141\71\144\x66\66\66\142\66\144\x64\x63\x63\x33\x36\144\145\61\x39\145\x63\x39\146\x39\x66\144\64\x61\x39\x37\61\63\64\145\66\141\60\141\71\64\x33\142\x62\x38\66\x39\x37\x63\146\x63\x38\x61\x63\143\x63\x31\146\x33\x38\x62\61"; goto buQNX; FBJMn: $this->w0_2b = \Magento\Framework\App\ObjectManager::getInstance()->create(\Cart2Quote\License\Cache\Type\License::class); goto qPbkB; jnTr7: $this->vADbp = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\App\Filesystem\DirectoryList::class); goto l8JW2; FKuFb: $this->pG2eb = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Io\File::class); goto qJvii; l8JW2: $this->ouYSs = \Magento\Framework\App\ObjectManager::getInstance()->create(\Magento\Framework\Math\Random::class); goto FBJMn; qPbkB: $this->vp33Q = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Backend\Model\UrlInterface::class); goto wrt7Z; buQNX: $this->init(); goto TcaeR; wrt7Z: $this->fBhUL = \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class); goto wipBc; wipBc: $this->DqzSc = \Magento\Framework\App\ObjectManager::getInstance()->get(\Cart2Quote\License\Model\Session::class); goto FKuFb; qJvii: $this->QlCr7 = "\x38\x35\x62\x62\63\x65\x31\x36\x35\65\x33\x35\65\142\x66\65\x31\66\61\x64\x34\62\x66\70\64\x33\x39\x63\x33\142\66\60\x66\141\61\142\x31\141\71\x37"; goto h2ofr; TcaeR: } private function init() { goto kq0bZ; YleVR: if (!isset($ka9sA)) { goto GDqVU; } goto olCd6; TIOmz: $f1l1K = $this->getTempPath($this->getRandomTempFileName()); goto HpN8Y; jB_H1: if (!(!$f1l1K || !file_exists($f1l1K))) { goto okpMU; } goto TIOmz; xfrPd: $FWTtS = ["\x64\x61\164\145" => date("\131\x2d\155\x2d\x64"), "\145\x64\151\x74\151\x6f\156" => $this->yp_N1, "\x6c\151\143\145\156\x73\x65\123\x74\x61\x74\x65" => $this->bv0TS, "\154\151\x63\x65\x6e\x73\145\x54\x79\x70\145" => $this->EoBDN]; goto NSjq9; O85GN: if (!(!isset($ka9sA) || $ka9sA["\144\141\164\145"] !== date("\x59\55\x6d\x2d\x64"))) { goto m9V3S; } goto i0xZb; kq0bZ: $f1l1K = $this->getFilePathFromSession(); goto jB_H1; o9fKs: $this->setLicenseProperties($FWTtS); goto CXDk2; NSjq9: $ka9sA = $this->getFromCache(); goto YleVR; VZ_bU: $this->storeInCache($FWTtS); goto xYrqb; i0xZb: $this->fetchLicenseData($FWTtS); goto VZ_bU; xYrqb: m9V3S: goto o9fKs; fpgEQ: okpMU: goto xfrPd; G9BCu: GDqVU: goto O85GN; HpN8Y: $this->storeFilePathInSession($f1l1K); goto fpgEQ; olCd6: $FWTtS = array_merge($FWTtS, $ka9sA); goto G9BCu; CXDk2: } private function setLicenseProperties($ceLqU) { goto DLuI0; b9onO: M4J7H: goto O1pUJ; HpSU_: foreach ($e0Zgt as $J1yAc) { goto EbTFV; EbTFV: if (!isset($ceLqU[$J1yAc])) { goto UgBHi; } goto dqgL1; gwjy8: UgBHi: goto jC_kR; dqgL1: $this->{$J1yAc} = $ceLqU[$J1yAc]; goto gwjy8; jC_kR: J_ql2: goto PseZD; PseZD: } goto b9onO; DLuI0: $e0Zgt = ["\x6c\151\x63\145\156\x73\145\x53\164\141\x74\145", "\154\x69\x63\x65\x6e\x73\x65\x54\171\160\145", "\145\x78\160\x69\162\x79\104\141\x74\x65", "\x65\144\151\x74\x69\157\156", "\x70\162\x6f\x70\x6f\163\141\154\x41\x6d\x6f\x75\x6e\x74", "\157\x72\144\145\x72\x49\x64"]; goto HpSU_; O1pUJ: } private function getSessionDataName() { return hash("\163\x68\141\x32\x35\x36", "\x6c\141\163\x74\x5f\x66\x61\151\154\145\144\x5f\x61\164\x74\145\155\160\164\137\144\x61\164\145"); } private function encrypt($FWTtS, $t6hKM = null, $QlX6_ = null) { goto DCyKx; WGIsA: xeenA: goto wqeXT; yvDQL: $QlX6_ = $this->gtFPN; goto WGIsA; ZewMW: $t6hKM = $this->QlCr7; goto z6JTo; wqeXT: return \Cart2Quote\License\Security\Security::encrypt($FWTtS, $t6hKM, $QlX6_); goto nqXMw; z6JTo: gfQnh: goto HMJBJ; DCyKx: if ($t6hKM) { goto gfQnh; } goto ZewMW; HMJBJ: if ($QlX6_) { goto xeenA; } goto yvDQL; nqXMw: } private function getTempPath($Fewgr) { return sprintf("\45\x73" . DIRECTORY_SEPARATOR . "\x25\x73", rtrim($this->vADbp->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP), DIRECTORY_SEPARATOR), ltrim($Fewgr, DIRECTORY_SEPARATOR)); } private function getRandomTempFileName() { return sprintf("\56\45\x73", $this->ouYSs->getRandomString(10, \Magento\Framework\Math\Random::CHARS_LOWERS)); } private function getFromCache() { goto IVWe2; IVWe2: $ldVGF = $this->w0_2b->load($this->TX81t); goto PiJA3; lQCFz: $FyTAn = $this->decrypt($ldVGF, $this->ZRGoD, $this->fmMhX); goto mRlsq; PiJA3: if ($ldVGF) { goto HI1Fd; } goto VtzJh; VtzJh: return null; goto TKE5L; TKE5L: HI1Fd: goto lQCFz; mRlsq: return json_decode($FyTAn, true); goto REWKG; REWKG: } private function decrypt($FWTtS, $t6hKM = null, $QlX6_ = null) { goto rm3fB; g3Dto: ffViI: goto b4VM3; VC_ux: return \Cart2Quote\License\Security\Security::decrypt($FWTtS, $t6hKM, $QlX6_); goto Xyhhg; seK2X: $t6hKM = $this->QlCr7; goto g3Dto; xM8rK: I_WJD: goto VC_ux; hoM1m: $QlX6_ = $this->gtFPN; goto xM8rK; rm3fB: if ($t6hKM) { goto ffViI; } goto seK2X; b4VM3: if ($QlX6_) { goto I_WJD; } goto hoM1m; Xyhhg: } private function fetchLicenseData(&$FWTtS) { try { goto hNM9S; dFcvK: $ceLqU = $this->decrypt($ceLqU); goto x1_O3; aQcBj: $FWTtS["\x65\144\151\x74\151\x6f\x6e"] = $ceLqU["\144\157\x6d\141\151\156"]["\x6c\151\x63\145\x6e\163\145"]["\145\144\151\164\x69\157\156\x5f\x69\144"]; goto flsbe; hNM9S: $ceLqU = \Cart2Quote\License\Http\Client::getInstance()->getLicense(); goto dFcvK; aAD6r: $FWTtS["\x6c\151\143\145\x6e\163\x65\x53\164\x61\x74\x65"] = $ceLqU["\x64\157\155\141\151\x6e"]["\154\x69\143\x65\x6e\x73\145"]["\154\151\x63\x65\156\x73\x65\137\x73\x74\x61\164\145\x5f\x69\x64"]; goto Gclih; uCg6n: p1eAF: goto Lm84x; Gclih: $FWTtS["\154\x69\x63\145\x6e\163\x65\x54\171\160\145"] = $ceLqU["\144\x6f\155\x61\151\x6e"]["\x6c\151\x63\x65\x6e\x73\145"]["\154\151\x63\x65\x6e\x73\x65\137\164\171\x70\x65\x5f\x69\x64"]; goto JCs9M; Q0QC7: $FWTtS["\157\x72\144\145\x72\111\144"] = isset($ceLqU["\144\157\155\x61\x69\156"]["\x6c\x69\x63\145\156\x73\145"]["\157\x72\144\x65\x72\137\151\x64"]) ? $ceLqU["\144\157\155\141\x69\x6e"]["\x6c\x69\x63\145\x6e\x73\x65"]["\157\x72\144\145\162\137\x69\x64"] : null; goto leIQV; KKgkj: $FWTtS["\x64\141\164\145"] = date("\131\x2d\155\x2d\x64"); goto aAD6r; x1_O3: $ceLqU = json_decode($ceLqU, true); goto kZX9d; leIQV: $this->resetFailedAttempt(); goto uCg6n; kZX9d: if (!isset($ceLqU["\x64\157\x6d\141\151\x6e"]["\154\151\x63\145\156\x73\x65"], $ceLqU["\x64\x6f\155\x61\151\x6e"]["\x6c\151\x63\x65\x6e\x73\x65"]["\145\144\151\164\151\157\156\x5f\151\x64"], $ceLqU["\144\157\x6d\x61\x69\156"]["\154\x69\143\x65\156\x73\x65"]["\154\151\143\x65\x6e\163\x65\137\163\x74\141\164\145\x5f\x69\144"], $ceLqU["\144\x6f\155\x61\x69\156"]["\154\x69\x63\x65\156\163\x65"]["\x6c\151\143\x65\156\163\x65\x5f\x74\171\160\145\x5f\151\x64"])) { goto p1eAF; } goto KKgkj; JCs9M: $FWTtS["\145\170\x70\x69\x72\171\104\x61\x74\x65"] = $ceLqU["\x64\157\155\141\x69\x6e"]["\154\x69\143\x65\156\x73\145"]["\x6c\x69\x63\x65\156\163\x65\137\x65\170\160\151\162\171\x5f\x64\141\164\145"]; goto aQcBj; flsbe: $FWTtS["\x70\x72\x6f\160\157\x73\x61\154\x41\155\x6f\x75\156\x74"] = $ceLqU["\144\157\x6d\x61\x69\156"]["\160\162\x6f\160\x6f\163\x61\154\x73\x5f\163\145\156\x74"]; goto Q0QC7; Lm84x: } catch (\Exception $zGzVs) { goto hhos4; rR2Yn: $this->failedAttempt(); goto H8N2X; cyyw5: jjYaK: goto uxqZ7; EQB2x: $FWTtS["\145\x64\x69\164\x69\x6f\156"] = $FWTtS["\154\x69\x63\145\156\x73\145\124\x79\x70\145"] = $FWTtS["\x6c\151\x63\145\156\163\x65\123\164\141\x74\145"] = License::UNREACHABLE; goto SrXRr; hhos4: $OqgOM = $this->getFailedAttemptDate(); goto UQJrm; SrXRr: goto PxgWr; goto cyyw5; uxqZ7: $FWTtS["\x6c\x69\x63\x65\156\x73\x65\x53\164\141\x74\x65"] = License::INACTIVE_STATE; goto R9mpV; UQJrm: if ($OqgOM && strtotime($OqgOM) <= strtotime("\55\x37\40\144\x61\171")) { goto jjYaK; } goto EQB2x; R9mpV: PxgWr: goto rR2Yn; H8N2X: } } private function getFilePathFromSession() { goto X1e7W; RalEY: R0wUY: goto G277m; G277m: return $this->decrypt($n2Zfz); goto ys5J1; XBNt_: return false; goto RalEY; SFR1V: if (isset($n2Zfz)) { goto R0wUY; } goto XBNt_; X1e7W: $n2Zfz = $this->DqzSc->getSessionData($this->getSessionDataName()); goto SFR1V; ys5J1: } private function storeFilePathInSession($n2Zfz) { $this->DqzSc->setSessionData($this->getSessionDataName(), $this->encrypt($n2Zfz)); } private function resetFailedAttempt() { goto DLT0e; L6S8G: unlink($t3Sxk); goto gXG1N; gXG1N: q8zSg: goto HGkXG; hbwZE: if (!file_exists($t3Sxk)) { goto q8zSg; } goto L6S8G; DLT0e: $t3Sxk = $this->getFilePathFromSession(); goto hbwZE; HGkXG: } private function getFailedAttemptDate() { try { goto d5kl4; wvlzO: return $this->decrypt(file_get_contents($n2Zfz)); goto k0sVM; k0sVM: h5buV: goto hM1aM; uJo8U: if (!file_exists($n2Zfz)) { goto h5buV; } goto wvlzO; d5kl4: $n2Zfz = $this->getFilePathFromSession(); goto uJo8U; hM1aM: } catch (\Exception $Bxw11) { } return null; } private function failedAttempt() { goto p1mnw; wVaHW: return $QZx0R; goto dlsI4; nfbDq: try { goto pcrRG; m6_nY: t1otc: goto lrt7_; fNe5F: $this->pG2eb->checkAndCreateFolder($xXs0_); goto m6_nY; tgOyF: if (is_dir($xXs0_)) { goto t1otc; } goto fNe5F; lrt7_: @file_put_contents($this->getFilePathFromSession(), $this->encrypt($QZx0R)); goto GzFqk; pcrRG: $xXs0_ = $this->vADbp->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP); goto tgOyF; GzFqk: } catch (\Exception $Bxw11) { } goto wVaHW; p1mnw: $QZx0R = date("\131\55\x6d\x2d\144"); goto nfbDq; dlsI4: } private function storeInCache($ldVGF) { goto HNZPg; HNZPg: $Bih_S = json_encode($ldVGF); goto WKIwX; LWK1y: $this->w0_2b->save($IFmBx, $this->TX81t); goto CKhlj; WKIwX: $IFmBx = $this->encrypt($Bih_S, $this->ZRGoD, $this->fmMhX); goto LWK1y; CKhlj: } public final function getDomain() { goto ig_3L; fbF1o: return $this->lXir0; goto FDGd2; v1weh: LcXg_: goto fbF1o; ig_3L: if (isset($this->lXir0)) { goto LcXg_; } goto ZJxKx; ZJxKx: $this->lXir0 = parse_url($this->vp33Q->getBaseUrl(), PHP_URL_HOST); goto v1weh; FDGd2: } public final function getEdition() { goto Se2sa; Se2sa: if (isset($this->{"\145\144\151\164\151\157\x6e"})) { goto gTrr3; } goto i3R0n; oBbNb: gTrr3: goto mybnt; mybnt: return $this->{"\x65\x64\151\x74\x69\157\x6e"}; goto ZdVwp; i3R0n: $this->{"\x65\x64\151\164\151\x6f\x6e"} = $this->yp_N1; goto oBbNb; ZdVwp: } public final function isActiveState() { return $this->getLicenseState() == License::ACTIVE_STATE; } public final function getLicenseState() { goto NSNmR; NSNmR: if (!(!isset($this->{"\x6c\151\143\145\x6e\x73\x65\123\x74\x61\164\145"}) || !License::isValid())) { goto tGWvE; } goto fEzWs; fEzWs: return $this->bv0TS; goto wCwpe; Nfh30: return $this->{"\x6c\151\143\x65\x6e\x73\145\x53\x74\141\x74\145"}; goto DebZ4; wCwpe: tGWvE: goto Nfh30; DebZ4: } public final function getLicenseType() { goto ZhgNM; vJEV0: return $this->{"\154\151\143\145\156\163\x65\124\x79\160\x65"}; goto FRjM9; ZhgNM: if (isset($this->{"\154\151\x63\145\x6e\x73\145\124\x79\160\145"})) { goto nh32t; } goto SjYej; RZrnT: nh32t: goto vJEV0; SjYej: return $this->EoBDN; goto RZrnT; FRjM9: } public static final function isValid() { goto QPyTG; E12s6: try { goto SEPlb; s44Ff: $sJCZU = get_class($jqZVy); goto bLo9r; i7u98: $sbGah = \Cart2Quote\Features\Feature\FeatureList::getInstance($jqZVy); goto JJuu9; F8SCt: $x3xQC = $sbGah->getAllPlugins(); goto kgB5_; JJuu9: if (!($sbGah === null)) { goto cwSvM; } goto s44Ff; SEPlb: $jqZVy = self::getInstance(); goto i7u98; bLo9r: $jqZVy->fBhUL->error("\x43\141\x72\x74\62\121\x75\157\164\x65\x3a\x20\124\150\x65\40\x63\154\141\163\x73\72\x20" . $sJCZU . "\x20\x6e\145\145\x64\x73\40\x61\40\x63\150\x65\143\x6b\x20\x66\157\x72\x3a\40" . get_called_class()); goto ccDXI; qe0SR: cwSvM: goto F8SCt; ccDXI: return false; goto qe0SR; kgB5_: } catch (\Exception $Bxw11) { $nBP__ = "\101\146\164\145\162\x20\x69\156\163\x74\141\x6c\x6c\x69\156\x67\x20\103\141\162\164\x32\121\165\157\164\145\x20\x72\165\156\x20\x22\142\x69\156\x2f\x6d\141\x67\x65\156\x74\157\x20\163\x65\x74\165\160\72\165\160\x67\162\141\144\x65\x22\x20\x62\145\x66\x6f\162\145\40\x70\x72\157\x63\145\145\144\151\156\147\x2e"; throw new \Magento\Framework\Exception\LocalizedException(xRZK6($nBP__)); } goto PSE0m; ZeYJ1: $hQhtv = true; goto G8QXI; QPyTG: if (!(self::getInstance()->getDomain() == "\x6c\x6f\143\x61\x6c\x68\157\x73\x74")) { goto HZDtq; } goto jRaqV; gvG13: return self::getInstance()->Kq9fP = $hQhtv; goto x_OB1; jRaqV: return true; goto KZvm5; PSE0m: $DSkvE = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Interception\PluginList\PluginList::class); goto ZeYJ1; KZvm5: HZDtq: goto yEeJN; yEeJN: if (!self::getInstance()->Kq9fP) { goto Td_LJ; } goto VjlQ4; layc_: t0zfV: goto gvG13; SkI_v: Td_LJ: goto E12s6; VjlQ4: return true; goto SkI_v; G8QXI: foreach ($x3xQC as $n1EpM => $TvozX) { goto WVYjS; WVYjS: foreach ($TvozX["\x70\x6c\x75\147\x69\156\x73"] as $SikyM => $CLeS_) { goto wk1gw; moKKk: goto VEV3Q; goto HxuQx; wk1gw: if ($DSkvE->isPluginLoaded($n1EpM, $CLeS_["\151\x6e\x73\x74\x61\x6e\143\x65"])) { goto fCExF; } goto OWU11; HxuQx: fCExF: goto djWxz; djWxz: vtAii: goto UJpK0; OWU11: $hQhtv = false; goto moKKk; UJpK0: } goto IPIQs; AQfdP: qVHvD: goto nO1ST; IPIQs: VEV3Q: goto AQfdP; nO1ST: } goto layc_; x_OB1: } public static final function getInstance() { goto N7MvL; YfztT: $FaoL0 = new License(); goto aQjR3; Veack: if (!($FaoL0 === null)) { goto x2g66; } goto YfztT; aQjR3: x2g66: goto Z1sh9; Z1sh9: return $FaoL0; goto vjjEq; N7MvL: static $FaoL0 = null; goto Veack; vjjEq: } public final function isInactiveState() { return $this->getLicenseState() == License::INACTIVE_STATE; } public final function isPendingState() { return $this->getLicenseState() == License::PENDING_STATE; } public final function isUnreachable() { return $this->getLicenseState() == License::UNREACHABLE; } public final function isUnreachableState() { return $this->isUnreachable(); } public final function setProposalSent() { goto q2MPm; BiUlP: \Cart2Quote\License\Http\Client::getInstance()->setProposalSent(); goto L1x66; q2MPm: if (!($this->getEdition() == "\x6c\151\164\x65")) { goto D2YXi; } goto BiUlP; L1x66: $this->invalidateCache(); goto o4RdH; o4RdH: D2YXi: goto KgMTs; KgMTs: } public final function getProposalAmount() { return @$this->{"\160\162\x6f\160\157\163\x61\x6c\101\155\157\165\156\164"}; } private function invalidateCache() { $this->w0_2b->remove($this->TX81t); } public final function reload() { $this->invalidateCache(); $this->init(); } public function getExpiryDate() { return @$this->{"\145\170\160\x69\162\x79\104\141\x74\x65"}; } public function getOrderId() { return @$this->{"\x6f\x72\144\x65\x72\111\144"}; } public final function isAllowedForEdition($TDDqZ = "\157\160\x65\x6e\x73\157\x75\162\143\145") { $HNDlm = \Cart2Quote\License\Feature\Feature::getInstance($this); return $HNDlm->isAllowedForEdition($TDDqZ); } }

Function Calls

None

Variables

None

Stats

MD5 e60f68ba7f7c73fa970fe07b99fb86ae
Eval Count 0
Decode Time 42 ms