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 $bkrIP = "CART2QUOTE_QUOTATION_LICENSE_CACHE";
private $fubF7 = "jqxVgbz9o3vX06DN988BWWiLsysWJ91nx5J2AbcR";
private $O6Hab = "5sX&JUuWHtrxr)6A0z_BqWLxNTqKZ)G(aPG#Fr-X";
private $zvZ_Z = "trial";
private $Myesy = License::INACTIVE_STATE;
private $znfpE = "one_off";
private $qPyjD;
private $edition;
private $licenseState;
private $licenseType;
private $expiryDate;
private $orderId;
private $q2CQH;
private $yCzQk;
private $CKghA;
private $X8IEP;
private $eJXH8;
private $iOz_A;
private $qbbYE;
private $kCxKu;
private $g4rl1;
private $XNN1G;
private $c1P2r;
private function __construct()
{
goto jELfE;
VhDOd:
$this->CKghA = \Magento\Framework\App\ObjectManager::getInstance()->create(\Cart2Quote\License\Cache\Type\License::class);
goto E3Pxd;
jELfE:
$this->g4rl1 = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\App\Filesystem\DirectoryList::class);
goto ceHJA;
ceHJA:
$this->kCxKu = \Magento\Framework\App\ObjectManager::getInstance()->create(\Magento\Framework\Math\Random::class);
goto VhDOd;
HZb0p:
$this->c1P2r = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Io\File::class);
goto Jbjdk;
ERof7:
$this->eJXH8 = \Magento\Framework\App\ObjectManager::getInstance()->get(\Cart2Quote\License\Model\Session::class);
goto HZb0p;
Jbjdk:
$this->iOz_A = "85bb3e1655355bf5161d42f8439c3b60fa1b1a97";
goto nuAJx;
LcgE3:
$this->yCzQk = \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class);
goto ERof7;
nuAJx:
$this->qbbYE = "3805a9df66b6ddcc36de19ec9f9fd4a97134e6a0a943bb8697cfc8accc1f38b1";
goto xx_mw;
E3Pxd:
$this->q2CQH = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Backend\Model\UrlInterface::class);
goto LcgE3;
xx_mw:
$this->init();
goto ZRyac;
ZRyac:
}
private function init()
{
goto l24ja;
xGfAV:
$tvUJG = ["date" => date("Y-m-d"), "edition" => $this->zvZ_Z, "licenseState" => $this->Myesy, "licenseType" => $this->znfpE];
goto AgUhE;
jFj4m:
$this->fetchLicenseData($tvUJG);
goto dOAFr;
zWc_P:
drEdb:
goto OOuMf;
yiFQU:
GXk4W:
goto yJP3o;
YwVpk:
$tvUJG = array_merge($tvUJG, $DB_NI);
goto yiFQU;
yJP3o:
if (!(!isset($DB_NI) || $DB_NI["date"] !== date("Y-m-d"))) {
goto drEdb;
}
goto jFj4m;
ElSBK:
$this->storeFilePathInSession($Dc7DT);
goto blhSJ;
AgUhE:
$DB_NI = $this->getFromCache();
goto IEfKZ;
iN8pk:
$Dc7DT = $this->getTempPath($this->getRandomTempFileName());
goto ElSBK;
l24ja:
$Dc7DT = $this->getFilePathFromSession();
goto qCWtA;
dOAFr:
$this->storeInCache($tvUJG);
goto zWc_P;
OOuMf:
$this->setLicenseProperties($tvUJG);
goto yesBa;
qCWtA:
if (!(!$Dc7DT || !file_exists($Dc7DT))) {
goto wSYtX;
}
goto iN8pk;
blhSJ:
wSYtX:
goto xGfAV;
IEfKZ:
if (!isset($DB_NI)) {
goto GXk4W;
}
goto YwVpk;
yesBa:
}
private function setLicenseProperties($H8sam)
{
goto kIAIk;
kIAIk:
$NALF5 = ["licenseState", "licenseType", "expiryDate", "edition", "proposalAmount", "orderId"];
goto Q2iZb;
thibR:
C2hed:
goto wCjnC;
Q2iZb:
foreach ($NALF5 as $QSO0A) {
goto pf3Zq;
pf3Zq:
if (!isset($H8sam[$QSO0A])) {
goto f2SVK;
}
goto SphEq;
wudOw:
f2SVK:
goto qyJzi;
qyJzi:
iWGuw:
goto vEWHf;
SphEq:
$this->{$QSO0A} = $H8sam[$QSO0A];
goto wudOw;
vEWHf:
}
goto thibR;
wCjnC:
}
private function getSessionDataName()
{
return hash("sha256", "last_failed_attempt_date");
}
private function encrypt($tvUJG, $q_shP = null, $QRo_c = null)
{
goto nqxHn;
Q3EIO:
$QRo_c = $this->qbbYE;
goto Eq9tA;
nqxHn:
if ($q_shP) {
goto UfPNI;
}
goto pNLhM;
aTSGw:
UfPNI:
goto IJR2E;
h6f22:
return \Cart2Quote\License\Security\Security::encrypt($tvUJG, $q_shP, $QRo_c);
goto p1fcs;
Eq9tA:
YMt4_:
goto h6f22;
IJR2E:
if ($QRo_c) {
goto YMt4_;
}
goto Q3EIO;
pNLhM:
$q_shP = $this->iOz_A;
goto aTSGw;
p1fcs:
}
private function getTempPath($FHISd)
{
return sprintf("%s" . DIRECTORY_SEPARATOR . "%s", rtrim($this->g4rl1->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP), DIRECTORY_SEPARATOR), ltrim($FHISd, DIRECTORY_SEPARATOR));
}
private function getRandomTempFileName()
{
return sprintf(".%s", $this->kCxKu->getRandomString(10, \Magento\Framework\Math\Random::CHARS_LOWERS));
}
private function getFromCache()
{
goto NHZ_I;
GmJg4:
if ($epsus) {
goto dLroH;
}
goto Lh9k0;
SANLU:
return json_decode($uOonT, true);
goto PVLgr;
TgJky:
$uOonT = $this->decrypt($epsus, $this->fubF7, $this->O6Hab);
goto SANLU;
Lh9k0:
return null;
goto DyBTN;
NHZ_I:
$epsus = $this->CKghA->load($this->bkrIP);
goto GmJg4;
DyBTN:
dLroH:
goto TgJky;
PVLgr:
}
private function decrypt($tvUJG, $q_shP = null, $QRo_c = null)
{
goto YxeLx;
KqzfB:
return \Cart2Quote\License\Security\Security::decrypt($tvUJG, $q_shP, $QRo_c);
goto M2t3z;
bgFnP:
$q_shP = $this->iOz_A;
goto WL2cm;
gSaX3:
$QRo_c = $this->qbbYE;
goto CshDX;
YxeLx:
if ($q_shP) {
goto REmyx;
}
goto bgFnP;
dMNnE:
if ($QRo_c) {
goto xApzO;
}
goto gSaX3;
CshDX:
xApzO:
goto KqzfB;
WL2cm:
REmyx:
goto dMNnE;
M2t3z:
}
private function fetchLicenseData(&$tvUJG)
{
try {
goto wwoBA;
LiBBZ:
if (!isset($H8sam["domain"]["license"], $H8sam["domain"]["license"]["edition_id"], $H8sam["domain"]["license"]["license_state_id"], $H8sam["domain"]["license"]["license_type_id"])) {
goto QK155;
}
goto V8jFt;
hbvem:
$tvUJG["licenseType"] = $H8sam["domain"]["license"]["license_type_id"];
goto yUG7Z;
zAaOu:
$H8sam = $this->decrypt($H8sam);
goto stq3p;
stq3p:
$H8sam = json_decode($H8sam, true);
goto LiBBZ;
Pmh4k:
$tvUJG["licenseState"] = $H8sam["domain"]["license"]["license_state_id"];
goto hbvem;
wwoBA:
$H8sam = \Cart2Quote\License\Http\Client::getInstance()->getLicense();
goto zAaOu;
Yt1oM:
QK155:
goto RH19Y;
V8jFt:
$tvUJG["date"] = date("Y-m-d");
goto Pmh4k;
X7O0O:
$tvUJG["orderId"] = isset($H8sam["domain"]["license"]["order_id"]) ? $H8sam["domain"]["license"]["order_id"] : null;
goto relPW;
pPCBo:
$tvUJG["edition"] = $H8sam["domain"]["license"]["edition_id"];
goto VxVaU;
VxVaU:
$tvUJG["proposalAmount"] = $H8sam["domain"]["proposals_sent"];
goto X7O0O;
relPW:
$this->resetFailedAttempt();
goto Yt1oM;
yUG7Z:
$tvUJG["expiryDate"] = $H8sam["domain"]["license"]["license_expiry_date"];
goto pPCBo;
RH19Y:
} catch (\Exception $eIAZm) {
goto n_lm_;
a_Ovy:
goto hIQ3I;
goto S0UUS;
uM4kr:
$tvUJG["edition"] = $tvUJG["licenseType"] = $tvUJG["licenseState"] = License::UNREACHABLE;
goto a_Ovy;
Ml1jL:
if ($LOUzf && strtotime($LOUzf) <= strtotime("-7 day")) {
goto udnM2;
}
goto uM4kr;
ttR3V:
$tvUJG["licenseState"] = License::INACTIVE_STATE;
goto plDTY;
plDTY:
hIQ3I:
goto Xn0Ml;
S0UUS:
udnM2:
goto ttR3V;
n_lm_:
$LOUzf = $this->getFailedAttemptDate();
goto Ml1jL;
Xn0Ml:
$this->failedAttempt();
goto bNqDc;
bNqDc:
}
}
private function getFilePathFromSession()
{
goto BZvNH;
YUBr6:
return false;
goto cKPww;
cIrNc:
return $this->decrypt($Q37d7);
goto hNR_q;
cKPww:
juFug:
goto cIrNc;
lq6aJ:
if (isset($Q37d7)) {
goto juFug;
}
goto YUBr6;
BZvNH:
$Q37d7 = $this->eJXH8->getSessionData($this->getSessionDataName());
goto lq6aJ;
hNR_q:
}
private function storeFilePathInSession($Q37d7)
{
$this->eJXH8->setSessionData($this->getSessionDataName(), $this->encrypt($Q37d7));
}
private function resetFailedAttempt()
{
goto XRsoj;
FpIEb:
agOmD:
goto ISFDe;
XRsoj:
$ca49p = $this->getFilePathFromSession();
goto EYaUs;
EYaUs:
if (!file_exists($ca49p)) {
goto agOmD;
}
goto NSqVj;
NSqVj:
unlink($ca49p);
goto FpIEb;
ISFDe:
}
private function getFailedAttemptDate()
{
try {
goto qgu1u;
vgFWg:
urKTQ:
goto vA1RH;
qgu1u:
$Q37d7 = $this->getFilePathFromSession();
goto dwA6Q;
dwA6Q:
if (!file_exists($Q37d7)) {
goto urKTQ;
}
goto n604G;
n604G:
return $this->decrypt(file_get_contents($Q37d7));
goto vgFWg;
vA1RH:
} catch (\Exception $RX0ed) {
}
return null;
}
private function failedAttempt()
{
goto gGiuO;
dgYRx:
try {
goto cxExD;
cxExD:
$D_q2C = $this->g4rl1->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP);
goto tQket;
tQket:
if (is_dir($D_q2C)) {
goto mgaXO;
}
goto HJMNm;
HJMNm:
$this->c1P2r->checkAndCreateFolder($D_q2C);
goto rCLQt;
rCLQt:
mgaXO:
goto R0QUv;
R0QUv:
@file_put_contents($this->getFilePathFromSession(), $this->encrypt($cbxyi));
goto ASOls;
ASOls:
} catch (\Exception $RX0ed) {
}
goto poYQw;
poYQw:
return $cbxyi;
goto efKUY;
gGiuO:
$cbxyi = date("Y-m-d");
goto dgYRx;
efKUY:
}
private function storeInCache($epsus)
{
goto x6S61;
x6S61:
$zMIwf = json_encode($epsus);
goto bmaNy;
VP58r:
$this->CKghA->save($EDtrO, $this->bkrIP);
goto X5tCE;
bmaNy:
$EDtrO = $this->encrypt($zMIwf, $this->fubF7, $this->O6Hab);
goto VP58r;
X5tCE:
}
public final function getDomain()
{
goto zrXv3;
tShbg:
$this->qPyjD = parse_url($this->q2CQH->getBaseUrl(), PHP_URL_HOST);
goto KU8Ol;
vVis5:
return $this->qPyjD;
goto FxsN8;
KU8Ol:
yZORB:
goto vVis5;
zrXv3:
if (isset($this->qPyjD)) {
goto yZORB;
}
goto tShbg;
FxsN8:
}
public final function getEdition()
{
goto VqWSc;
ue06K:
return $this->{"edition"};
goto utXxc;
iRywk:
LgYsy:
goto ue06K;
rZXp1:
$this->{"edition"} = $this->zvZ_Z;
goto iRywk;
VqWSc:
if (isset($this->{"edition"})) {
goto LgYsy;
}
goto rZXp1;
utXxc:
}
public final function isActiveState()
{
return $this->getLicenseState() == License::ACTIVE_STATE;
}
public final function getLicenseState()
{
goto NGECg;
CvC8Y:
WXtBb:
goto cOaO5;
cOaO5:
return $this->{"licenseState"};
goto ejKrb;
NGECg:
if (!(!isset($this->{"licenseState"}) || !License::isValid())) {
goto WXtBb;
}
goto i_Diq;
i_Diq:
return $this->Myesy;
goto CvC8Y;
ejKrb:
}
public final function getLicenseType()
{
goto yYpre;
B0YVy:
return $this->{"licenseType"};
goto BRJ4z;
yYpre:
if (isset($this->{"licenseType"})) {
goto GrKrS;
}
goto gLGKY;
gLGKY:
return $this->znfpE;
goto SUqgp;
SUqgp:
GrKrS:
goto B0YVy;
BRJ4z:
}
public static final function isValid()
{
goto pPwdy;
Hb1ij:
return self::getInstance()->X8IEP = $ApmYi;
goto fJXgR;
W_215:
foreach ($ypyqy as $b5nRy => $jyajV) {
goto DZdAt;
V8Nze:
Y89zA:
goto NH_FD;
NH_FD:
G_zZ1:
goto oLdRM;
DZdAt:
foreach ($jyajV["plugins"] as $tJfod => $QFGZZ) {
goto oWHeP;
qNJ0w:
kAsuw:
goto CSauF;
CSauF:
q1pfX:
goto L9q1x;
oWHeP:
if ($PIgFj->isPluginLoaded($b5nRy, $QFGZZ["instance"])) {
goto kAsuw;
}
goto QEvss;
zHmiI:
goto Y89zA;
goto qNJ0w;
QEvss:
$ApmYi = false;
goto zHmiI;
L9q1x:
}
goto V8Nze;
oLdRM:
}
goto JXj5E;
IZESy:
$ApmYi = true;
goto W_215;
haeEX:
return true;
goto ugbG7;
jzNUX:
try {
goto lb3_S;
qvhlZ:
$giyBk->yCzQk->error("Cart2Quote: The class: " . $or1zI . " needs a check for: " . get_called_class());
goto IwAXk;
lb3_S:
$giyBk = self::getInstance();
goto NlkDy;
ZpRKb:
zAJR6:
goto GEqmm;
GEqmm:
$ypyqy = $oUj0p->getAllPlugins();
goto sKCTj;
mkde5:
$or1zI = get_class($giyBk);
goto qvhlZ;
IwAXk:
return false;
goto ZpRKb;
jTced:
if (!($oUj0p === null)) {
goto zAJR6;
}
goto mkde5;
NlkDy:
$oUj0p = \Cart2Quote\Features\Feature\FeatureList::getInstance($giyBk);
goto jTced;
sKCTj:
} catch (\Exception $RX0ed) {
$hD31D = "After installing Cart2Quote run "bin/magento setup:upgrade" before proceeding.";
throw new \Magento\Framework\Exception\LocalizedException(bR89v($hD31D));
}
goto j0k2x;
atjRh:
return true;
goto LB31x;
JXj5E:
R1vhN:
goto Hb1ij;
LB31x:
tllgA:
goto GqRJR;
ugbG7:
oxng4:
goto jzNUX;
pPwdy:
if (!(self::getInstance()->getDomain() == "localhost")) {
goto tllgA;
}
goto atjRh;
j0k2x:
$PIgFj = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Interception\PluginList\PluginList::class);
goto IZESy;
GqRJR:
if (!self::getInstance()->X8IEP) {
goto oxng4;
}
goto haeEX;
fJXgR:
}
public static final function getInstance()
{
goto DMUyh;
f44ia:
$SQZl4 = new License();
goto aE781;
w6m4k:
if (!($SQZl4 === null)) {
goto p9wlN;
}
goto f44ia;
aE781:
p9wlN:
goto MGDru;
MGDru:
return $SQZl4;
goto ABVx2;
DMUyh:
static $SQZl4 = null;
goto w6m4k;
ABVx2:
}
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 Yh0V5;
qyS7t:
tgVIO:
goto vy5N6;
OKdIs:
\Cart2Quote\License\Http\Client::getInstance()->setProposalSent();
goto r9KH2;
r9KH2:
$this->invalidateCache();
goto qyS7t;
Yh0V5:
if (!($this->getEdition() == "lite")) {
goto tgVIO;
}
goto OKdIs;
vy5N6:
}
public final function getProposalAmount()
{
return @$this->{"proposalAmount"};
}
private function invalidateCache()
{
$this->CKghA->remove($this->bkrIP);
}
public final function reload()
{
$this->invalidateCache();
$this->init();
}
public function getExpiryDate()
{
return @$this->{"expiryDate"};
}
public function getOrderId()
{
return @$this->{"orderId"};
}
public final function isAllowedForEdition($bfylE = "opensource")
{
$TP5ck = \Cart2Quote\License\Feature\Feature::getInstance($this);
return $TP5ck->isAllowedForEdition($bfylE);
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace Cart2Quote\License\Model;
final class License implements \Cart2Quote\Quotation\Model\LicenseInterface
{
const INACTIVE_STATE = "\151\x6e\141\x63\164\151\166\x65";
const PENDING_STATE = "\160\145\x6e\144\x69\156\147";
const ACTIVE_STATE = "\141\x63\x74\x69\166\x65";
const UNREACHABLE = "\x75\156\162\x65\x61\143\150\141\x62\x6c\x65";
const ALLOWED_PROPOSAL_AMOUNT = 15;
private $bkrIP = "\103\x41\x52\124\62\121\x55\117\x54\105\137\121\x55\117\x54\x41\124\x49\x4f\x4e\x5f\x4c\111\x43\x45\116\x53\x45\137\103\x41\103\x48\105";
private $fubF7 = "\x6a\161\170\126\147\x62\172\x39\x6f\63\x76\x58\x30\66\x44\116\x39\x38\x38\x42\127\x57\x69\x4c\x73\x79\x73\127\x4a\x39\61\x6e\x78\x35\x4a\62\101\x62\143\122";
private $O6Hab = "\65\163\130\x26\112\125\165\127\110\x74\162\x78\x72\51\x36\x41\60\x7a\137\102\x71\127\114\x78\x4e\124\x71\113\132\51\x47\x28\141\120\x47\x23\106\x72\55\x58";
private $zvZ_Z = "\164\x72\x69\141\x6c";
private $Myesy = License::INACTIVE_STATE;
private $znfpE = "\x6f\156\145\137\x6f\x66\x66";
private $qPyjD;
private $edition;
private $licenseState;
private $licenseType;
private $expiryDate;
private $orderId;
private $q2CQH;
private $yCzQk;
private $CKghA;
private $X8IEP;
private $eJXH8;
private $iOz_A;
private $qbbYE;
private $kCxKu;
private $g4rl1;
private $XNN1G;
private $c1P2r;
private function __construct()
{
goto jELfE;
VhDOd:
$this->CKghA = \Magento\Framework\App\ObjectManager::getInstance()->create(\Cart2Quote\License\Cache\Type\License::class);
goto E3Pxd;
jELfE:
$this->g4rl1 = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\App\Filesystem\DirectoryList::class);
goto ceHJA;
ceHJA:
$this->kCxKu = \Magento\Framework\App\ObjectManager::getInstance()->create(\Magento\Framework\Math\Random::class);
goto VhDOd;
HZb0p:
$this->c1P2r = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Io\File::class);
goto Jbjdk;
ERof7:
$this->eJXH8 = \Magento\Framework\App\ObjectManager::getInstance()->get(\Cart2Quote\License\Model\Session::class);
goto HZb0p;
Jbjdk:
$this->iOz_A = "\x38\65\x62\x62\63\x65\61\x36\x35\65\63\x35\65\x62\x66\x35\x31\x36\61\144\x34\x32\146\x38\64\x33\71\143\63\142\x36\x30\146\141\61\x62\61\x61\x39\x37";
goto nuAJx;
LcgE3:
$this->yCzQk = \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class);
goto ERof7;
nuAJx:
$this->qbbYE = "\63\70\x30\x35\x61\71\x64\x66\x36\x36\142\66\144\144\x63\x63\63\x36\144\x65\x31\71\x65\x63\71\146\x39\146\x64\x34\x61\71\67\x31\63\64\x65\x36\141\x30\x61\71\64\63\142\142\x38\66\x39\x37\x63\x66\143\70\141\143\143\x63\x31\x66\x33\x38\142\x31";
goto xx_mw;
E3Pxd:
$this->q2CQH = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Backend\Model\UrlInterface::class);
goto LcgE3;
xx_mw:
$this->init();
goto ZRyac;
ZRyac:
}
private function init()
{
goto l24ja;
xGfAV:
$tvUJG = ["\144\x61\164\145" => date("\131\55\155\55\144"), "\x65\x64\x69\164\151\157\156" => $this->zvZ_Z, "\x6c\151\x63\x65\156\x73\145\123\164\141\164\x65" => $this->Myesy, "\x6c\x69\x63\x65\x6e\x73\145\124\x79\x70\145" => $this->znfpE];
goto AgUhE;
jFj4m:
$this->fetchLicenseData($tvUJG);
goto dOAFr;
zWc_P:
drEdb:
goto OOuMf;
yiFQU:
GXk4W:
goto yJP3o;
YwVpk:
$tvUJG = array_merge($tvUJG, $DB_NI);
goto yiFQU;
yJP3o:
if (!(!isset($DB_NI) || $DB_NI["\x64\x61\164\x65"] !== date("\x59\x2d\155\55\144"))) {
goto drEdb;
}
goto jFj4m;
ElSBK:
$this->storeFilePathInSession($Dc7DT);
goto blhSJ;
AgUhE:
$DB_NI = $this->getFromCache();
goto IEfKZ;
iN8pk:
$Dc7DT = $this->getTempPath($this->getRandomTempFileName());
goto ElSBK;
l24ja:
$Dc7DT = $this->getFilePathFromSession();
goto qCWtA;
dOAFr:
$this->storeInCache($tvUJG);
goto zWc_P;
OOuMf:
$this->setLicenseProperties($tvUJG);
goto yesBa;
qCWtA:
if (!(!$Dc7DT || !file_exists($Dc7DT))) {
goto wSYtX;
}
goto iN8pk;
blhSJ:
wSYtX:
goto xGfAV;
IEfKZ:
if (!isset($DB_NI)) {
goto GXk4W;
}
goto YwVpk;
yesBa:
}
private function setLicenseProperties($H8sam)
{
goto kIAIk;
kIAIk:
$NALF5 = ["\154\151\143\145\x6e\x73\x65\x53\x74\141\164\145", "\x6c\151\143\145\156\x73\145\124\171\160\145", "\145\170\160\x69\x72\171\x44\x61\x74\x65", "\145\x64\151\164\151\x6f\x6e", "\x70\162\x6f\160\x6f\x73\x61\x6c\x41\x6d\x6f\x75\x6e\164", "\x6f\162\x64\x65\162\x49\144"];
goto Q2iZb;
thibR:
C2hed:
goto wCjnC;
Q2iZb:
foreach ($NALF5 as $QSO0A) {
goto pf3Zq;
pf3Zq:
if (!isset($H8sam[$QSO0A])) {
goto f2SVK;
}
goto SphEq;
wudOw:
f2SVK:
goto qyJzi;
qyJzi:
iWGuw:
goto vEWHf;
SphEq:
$this->{$QSO0A} = $H8sam[$QSO0A];
goto wudOw;
vEWHf:
}
goto thibR;
wCjnC:
}
private function getSessionDataName()
{
return hash("\163\x68\x61\x32\x35\66", "\154\141\x73\x74\x5f\x66\141\151\x6c\x65\144\137\x61\x74\x74\x65\x6d\160\164\137\x64\x61\x74\x65");
}
private function encrypt($tvUJG, $q_shP = null, $QRo_c = null)
{
goto nqxHn;
Q3EIO:
$QRo_c = $this->qbbYE;
goto Eq9tA;
nqxHn:
if ($q_shP) {
goto UfPNI;
}
goto pNLhM;
aTSGw:
UfPNI:
goto IJR2E;
h6f22:
return \Cart2Quote\License\Security\Security::encrypt($tvUJG, $q_shP, $QRo_c);
goto p1fcs;
Eq9tA:
YMt4_:
goto h6f22;
IJR2E:
if ($QRo_c) {
goto YMt4_;
}
goto Q3EIO;
pNLhM:
$q_shP = $this->iOz_A;
goto aTSGw;
p1fcs:
}
private function getTempPath($FHISd)
{
return sprintf("\x25\163" . DIRECTORY_SEPARATOR . "\x25\x73", rtrim($this->g4rl1->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP), DIRECTORY_SEPARATOR), ltrim($FHISd, DIRECTORY_SEPARATOR));
}
private function getRandomTempFileName()
{
return sprintf("\56\x25\x73", $this->kCxKu->getRandomString(10, \Magento\Framework\Math\Random::CHARS_LOWERS));
}
private function getFromCache()
{
goto NHZ_I;
GmJg4:
if ($epsus) {
goto dLroH;
}
goto Lh9k0;
SANLU:
return json_decode($uOonT, true);
goto PVLgr;
TgJky:
$uOonT = $this->decrypt($epsus, $this->fubF7, $this->O6Hab);
goto SANLU;
Lh9k0:
return null;
goto DyBTN;
NHZ_I:
$epsus = $this->CKghA->load($this->bkrIP);
goto GmJg4;
DyBTN:
dLroH:
goto TgJky;
PVLgr:
}
private function decrypt($tvUJG, $q_shP = null, $QRo_c = null)
{
goto YxeLx;
KqzfB:
return \Cart2Quote\License\Security\Security::decrypt($tvUJG, $q_shP, $QRo_c);
goto M2t3z;
bgFnP:
$q_shP = $this->iOz_A;
goto WL2cm;
gSaX3:
$QRo_c = $this->qbbYE;
goto CshDX;
YxeLx:
if ($q_shP) {
goto REmyx;
}
goto bgFnP;
dMNnE:
if ($QRo_c) {
goto xApzO;
}
goto gSaX3;
CshDX:
xApzO:
goto KqzfB;
WL2cm:
REmyx:
goto dMNnE;
M2t3z:
}
private function fetchLicenseData(&$tvUJG)
{
try {
goto wwoBA;
LiBBZ:
if (!isset($H8sam["\144\x6f\x6d\x61\x69\156"]["\x6c\151\143\145\x6e\163\x65"], $H8sam["\144\x6f\155\141\x69\156"]["\x6c\x69\143\x65\x6e\x73\x65"]["\x65\144\151\x74\x69\157\156\x5f\151\144"], $H8sam["\144\157\x6d\141\151\x6e"]["\x6c\x69\143\145\x6e\x73\145"]["\154\x69\143\145\x6e\x73\x65\x5f\163\x74\141\164\x65\137\x69\x64"], $H8sam["\144\x6f\x6d\141\x69\x6e"]["\x6c\151\x63\145\x6e\x73\x65"]["\x6c\151\143\145\156\x73\x65\137\164\x79\x70\x65\137\x69\144"])) {
goto QK155;
}
goto V8jFt;
hbvem:
$tvUJG["\x6c\x69\143\x65\x6e\163\145\124\x79\160\145"] = $H8sam["\x64\157\x6d\x61\x69\156"]["\154\x69\x63\x65\156\163\x65"]["\154\151\x63\x65\x6e\x73\145\137\x74\171\x70\145\137\x69\x64"];
goto yUG7Z;
zAaOu:
$H8sam = $this->decrypt($H8sam);
goto stq3p;
stq3p:
$H8sam = json_decode($H8sam, true);
goto LiBBZ;
Pmh4k:
$tvUJG["\154\x69\x63\145\x6e\x73\x65\x53\164\141\164\x65"] = $H8sam["\x64\157\155\x61\151\156"]["\154\x69\x63\x65\156\163\x65"]["\154\x69\x63\145\x6e\163\x65\x5f\x73\x74\x61\164\145\x5f\x69\144"];
goto hbvem;
wwoBA:
$H8sam = \Cart2Quote\License\Http\Client::getInstance()->getLicense();
goto zAaOu;
Yt1oM:
QK155:
goto RH19Y;
V8jFt:
$tvUJG["\x64\x61\x74\x65"] = date("\131\55\155\55\144");
goto Pmh4k;
X7O0O:
$tvUJG["\157\162\144\x65\x72\x49\144"] = isset($H8sam["\x64\157\155\x61\151\156"]["\x6c\x69\x63\x65\156\x73\x65"]["\157\162\x64\145\x72\137\x69\144"]) ? $H8sam["\x64\157\155\x61\x69\x6e"]["\x6c\x69\x63\x65\x6e\x73\145"]["\157\x72\x64\x65\162\x5f\151\x64"] : null;
goto relPW;
pPCBo:
$tvUJG["\x65\x64\151\164\151\x6f\156"] = $H8sam["\x64\x6f\155\141\151\x6e"]["\x6c\x69\143\x65\156\x73\145"]["\x65\144\x69\x74\x69\157\156\137\151\144"];
goto VxVaU;
VxVaU:
$tvUJG["\x70\x72\157\x70\x6f\163\141\x6c\101\x6d\157\x75\156\164"] = $H8sam["\144\157\155\141\x69\156"]["\160\162\157\160\157\x73\x61\154\x73\x5f\x73\145\156\x74"];
goto X7O0O;
relPW:
$this->resetFailedAttempt();
goto Yt1oM;
yUG7Z:
$tvUJG["\x65\x78\x70\x69\162\x79\x44\141\164\x65"] = $H8sam["\144\157\155\x61\x69\156"]["\154\151\x63\145\x6e\163\145"]["\x6c\x69\x63\145\x6e\x73\145\x5f\x65\x78\x70\x69\162\171\137\x64\x61\x74\145"];
goto pPCBo;
RH19Y:
} catch (\Exception $eIAZm) {
goto n_lm_;
a_Ovy:
goto hIQ3I;
goto S0UUS;
uM4kr:
$tvUJG["\x65\x64\x69\x74\151\x6f\156"] = $tvUJG["\x6c\151\x63\145\156\163\145\x54\x79\x70\x65"] = $tvUJG["\x6c\x69\143\145\156\x73\x65\x53\x74\141\x74\145"] = License::UNREACHABLE;
goto a_Ovy;
Ml1jL:
if ($LOUzf && strtotime($LOUzf) <= strtotime("\55\x37\x20\x64\x61\x79")) {
goto udnM2;
}
goto uM4kr;
ttR3V:
$tvUJG["\154\x69\143\x65\x6e\163\x65\123\164\141\x74\x65"] = License::INACTIVE_STATE;
goto plDTY;
plDTY:
hIQ3I:
goto Xn0Ml;
S0UUS:
udnM2:
goto ttR3V;
n_lm_:
$LOUzf = $this->getFailedAttemptDate();
goto Ml1jL;
Xn0Ml:
$this->failedAttempt();
goto bNqDc;
bNqDc:
}
}
private function getFilePathFromSession()
{
goto BZvNH;
YUBr6:
return false;
goto cKPww;
cIrNc:
return $this->decrypt($Q37d7);
goto hNR_q;
cKPww:
juFug:
goto cIrNc;
lq6aJ:
if (isset($Q37d7)) {
goto juFug;
}
goto YUBr6;
BZvNH:
$Q37d7 = $this->eJXH8->getSessionData($this->getSessionDataName());
goto lq6aJ;
hNR_q:
}
private function storeFilePathInSession($Q37d7)
{
$this->eJXH8->setSessionData($this->getSessionDataName(), $this->encrypt($Q37d7));
}
private function resetFailedAttempt()
{
goto XRsoj;
FpIEb:
agOmD:
goto ISFDe;
XRsoj:
$ca49p = $this->getFilePathFromSession();
goto EYaUs;
EYaUs:
if (!file_exists($ca49p)) {
goto agOmD;
}
goto NSqVj;
NSqVj:
unlink($ca49p);
goto FpIEb;
ISFDe:
}
private function getFailedAttemptDate()
{
try {
goto qgu1u;
vgFWg:
urKTQ:
goto vA1RH;
qgu1u:
$Q37d7 = $this->getFilePathFromSession();
goto dwA6Q;
dwA6Q:
if (!file_exists($Q37d7)) {
goto urKTQ;
}
goto n604G;
n604G:
return $this->decrypt(file_get_contents($Q37d7));
goto vgFWg;
vA1RH:
} catch (\Exception $RX0ed) {
}
return null;
}
private function failedAttempt()
{
goto gGiuO;
dgYRx:
try {
goto cxExD;
cxExD:
$D_q2C = $this->g4rl1->getPath(\Magento\Framework\App\Filesystem\DirectoryList::TMP);
goto tQket;
tQket:
if (is_dir($D_q2C)) {
goto mgaXO;
}
goto HJMNm;
HJMNm:
$this->c1P2r->checkAndCreateFolder($D_q2C);
goto rCLQt;
rCLQt:
mgaXO:
goto R0QUv;
R0QUv:
@file_put_contents($this->getFilePathFromSession(), $this->encrypt($cbxyi));
goto ASOls;
ASOls:
} catch (\Exception $RX0ed) {
}
goto poYQw;
poYQw:
return $cbxyi;
goto efKUY;
gGiuO:
$cbxyi = date("\x59\x2d\x6d\x2d\x64");
goto dgYRx;
efKUY:
}
private function storeInCache($epsus)
{
goto x6S61;
x6S61:
$zMIwf = json_encode($epsus);
goto bmaNy;
VP58r:
$this->CKghA->save($EDtrO, $this->bkrIP);
goto X5tCE;
bmaNy:
$EDtrO = $this->encrypt($zMIwf, $this->fubF7, $this->O6Hab);
goto VP58r;
X5tCE:
}
public final function getDomain()
{
goto zrXv3;
tShbg:
$this->qPyjD = parse_url($this->q2CQH->getBaseUrl(), PHP_URL_HOST);
goto KU8Ol;
vVis5:
return $this->qPyjD;
goto FxsN8;
KU8Ol:
yZORB:
goto vVis5;
zrXv3:
if (isset($this->qPyjD)) {
goto yZORB;
}
goto tShbg;
FxsN8:
}
public final function getEdition()
{
goto VqWSc;
ue06K:
return $this->{"\145\144\151\x74\151\x6f\156"};
goto utXxc;
iRywk:
LgYsy:
goto ue06K;
rZXp1:
$this->{"\x65\144\x69\x74\x69\x6f\156"} = $this->zvZ_Z;
goto iRywk;
VqWSc:
if (isset($this->{"\x65\144\151\x74\151\x6f\156"})) {
goto LgYsy;
}
goto rZXp1;
utXxc:
}
public final function isActiveState()
{
return $this->getLicenseState() == License::ACTIVE_STATE;
}
public final function getLicenseState()
{
goto NGECg;
CvC8Y:
WXtBb:
goto cOaO5;
cOaO5:
return $this->{"\x6c\x69\143\x65\x6e\x73\145\123\x74\x61\x74\x65"};
goto ejKrb;
NGECg:
if (!(!isset($this->{"\154\151\x63\145\x6e\x73\x65\x53\x74\141\164\145"}) || !License::isValid())) {
goto WXtBb;
}
goto i_Diq;
i_Diq:
return $this->Myesy;
goto CvC8Y;
ejKrb:
}
public final function getLicenseType()
{
goto yYpre;
B0YVy:
return $this->{"\154\151\143\145\x6e\163\x65\x54\x79\x70\145"};
goto BRJ4z;
yYpre:
if (isset($this->{"\154\x69\x63\x65\x6e\x73\x65\124\171\160\145"})) {
goto GrKrS;
}
goto gLGKY;
gLGKY:
return $this->znfpE;
goto SUqgp;
SUqgp:
GrKrS:
goto B0YVy;
BRJ4z:
}
public static final function isValid()
{
goto pPwdy;
Hb1ij:
return self::getInstance()->X8IEP = $ApmYi;
goto fJXgR;
W_215:
foreach ($ypyqy as $b5nRy => $jyajV) {
goto DZdAt;
V8Nze:
Y89zA:
goto NH_FD;
NH_FD:
G_zZ1:
goto oLdRM;
DZdAt:
foreach ($jyajV["\160\154\x75\147\x69\x6e\x73"] as $tJfod => $QFGZZ) {
goto oWHeP;
qNJ0w:
kAsuw:
goto CSauF;
CSauF:
q1pfX:
goto L9q1x;
oWHeP:
if ($PIgFj->isPluginLoaded($b5nRy, $QFGZZ["\x69\156\x73\164\x61\x6e\x63\145"])) {
goto kAsuw;
}
goto QEvss;
zHmiI:
goto Y89zA;
goto qNJ0w;
QEvss:
$ApmYi = false;
goto zHmiI;
L9q1x:
}
goto V8Nze;
oLdRM:
}
goto JXj5E;
IZESy:
$ApmYi = true;
goto W_215;
haeEX:
return true;
goto ugbG7;
jzNUX:
try {
goto lb3_S;
qvhlZ:
$giyBk->yCzQk->error("\x43\x61\x72\x74\62\121\165\157\164\145\72\40\124\x68\x65\40\143\154\141\x73\163\x3a\x20" . $or1zI . "\x20\x6e\145\145\x64\x73\x20\x61\x20\x63\150\145\x63\153\40\x66\x6f\162\x3a\40" . get_called_class());
goto IwAXk;
lb3_S:
$giyBk = self::getInstance();
goto NlkDy;
ZpRKb:
zAJR6:
goto GEqmm;
GEqmm:
$ypyqy = $oUj0p->getAllPlugins();
goto sKCTj;
mkde5:
$or1zI = get_class($giyBk);
goto qvhlZ;
IwAXk:
return false;
goto ZpRKb;
jTced:
if (!($oUj0p === null)) {
goto zAJR6;
}
goto mkde5;
NlkDy:
$oUj0p = \Cart2Quote\Features\Feature\FeatureList::getInstance($giyBk);
goto jTced;
sKCTj:
} catch (\Exception $RX0ed) {
$hD31D = "\101\x66\x74\145\162\x20\x69\x6e\x73\x74\x61\154\154\151\x6e\147\40\103\141\x72\164\x32\121\165\157\164\x65\40\x72\165\156\40\x22\x62\x69\x6e\57\155\x61\147\145\156\x74\x6f\x20\x73\x65\164\165\160\72\165\x70\x67\162\141\144\x65\42\x20\142\145\146\157\x72\145\40\160\x72\x6f\143\145\x65\x64\x69\156\x67\x2e";
throw new \Magento\Framework\Exception\LocalizedException(bR89v($hD31D));
}
goto j0k2x;
atjRh:
return true;
goto LB31x;
JXj5E:
R1vhN:
goto Hb1ij;
LB31x:
tllgA:
goto GqRJR;
ugbG7:
oxng4:
goto jzNUX;
pPwdy:
if (!(self::getInstance()->getDomain() == "\154\157\143\141\x6c\x68\x6f\163\x74")) {
goto tllgA;
}
goto atjRh;
j0k2x:
$PIgFj = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Interception\PluginList\PluginList::class);
goto IZESy;
GqRJR:
if (!self::getInstance()->X8IEP) {
goto oxng4;
}
goto haeEX;
fJXgR:
}
public static final function getInstance()
{
goto DMUyh;
f44ia:
$SQZl4 = new License();
goto aE781;
w6m4k:
if (!($SQZl4 === null)) {
goto p9wlN;
}
goto f44ia;
aE781:
p9wlN:
goto MGDru;
MGDru:
return $SQZl4;
goto ABVx2;
DMUyh:
static $SQZl4 = null;
goto w6m4k;
ABVx2:
}
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 Yh0V5;
qyS7t:
tgVIO:
goto vy5N6;
OKdIs:
\Cart2Quote\License\Http\Client::getInstance()->setProposalSent();
goto r9KH2;
r9KH2:
$this->invalidateCache();
goto qyS7t;
Yh0V5:
if (!($this->getEdition() == "\x6c\151\164\145")) {
goto tgVIO;
}
goto OKdIs;
vy5N6:
}
public final function getProposalAmount()
{
return @$this->{"\x70\162\x6f\x70\157\x73\x61\154\101\155\x6f\x75\156\x74"};
}
private function invalidateCache()
{
$this->CKghA->remove($this->bkrIP);
}
public final function reload()
{
$this->invalidateCache();
$this->init();
}
public function getExpiryDate()
{
return @$this->{"\145\170\x70\x69\x72\171\x44\141\x74\x65"};
}
public function getOrderId()
{
return @$this->{"\157\162\144\145\x72\x49\144"};
}
public final function isAllowedForEdition($bfylE = "\157\x70\145\x6e\x73\157\165\x72\x63\x65")
{
$TP5ck = \Cart2Quote\License\Feature\Feature::getInstance($this);
return $TP5ck->isAllowedForEdition($bfylE);
}
}
Function Calls
None |
Stats
MD5 | 66a241e8992d07646e195e39ef1aff6e |
Eval Count | 0 |
Decode Time | 70 ms |