/* Decoded by unphp.net */ plugin = $aJso6; goto SKTL1; N4nx9: $this->verifyLicense(); goto ZORrq; E8w9N: $this->shopDomain = str_replace("https://", '', str_replace("http://", '', URL_SHOP)); goto N4nx9; SKTL1: $this->db = $SokTl; goto E8w9N; ZORrq: } public function getLicense() : string { return $this->license; } public function isLicenseValid() : bool { return $this->licenseIsValid; } private function isExecutedFromCLI() : bool { goto V1D7V; V1D7V: if (!(http_response_code() === false)) { goto cEOp5; } goto oz6qC; QkDmp: cEOp5: goto HLaSA; oz6qC: return true; goto QkDmp; HLaSA: return false; goto OyRaJ; OyRaJ: } private function loadLicenseData() : void { $this->license = trim($this->plugin->getConfig()->getOption("esi_license")->value); } private function loadVerificationData() : void { goto EvGF6; oe6sE: $this->verificationLastChecked = (int) $fL9OM["lastChecked"]; goto m2SZp; m2SZp: $this->verificationDidFail = (bool) $fL9OM["didFail"]; goto q43Vr; EvGF6: $fL9OM = $this->db->query("SELECT `license`, `localkey`, `lastChecked`, `didFail` FROM `xplugin_ecomdata_lscache5_license`", ReturnType::SINGLE_ASSOC_ARRAY); goto lljEy; cCrt9: $this->verificationLicense = $fL9OM["license"]; goto WZOiX; D0nC5: goto m0F_O; goto Jz1zN; Jz1zN: nQ8g3: goto cCrt9; q43Vr: m0F_O: goto NXUWK; WZOiX: $this->verificationLocalkey = $fL9OM["localkey"]; goto oe6sE; lljEy: if (!is_null($fL9OM)) { goto nQ8g3; } goto M53KY; M53KY: $this->db->query("INSERT INTO `xplugin_ecomdata_lscache5_license` (`license`, `localkey`, `lastChecked`, `didFail`) VALUES ("", "", 0, 0)"); goto D0nC5; NXUWK: } private function verifyLicense() : void { goto X64_k; ZnN1t: $this->licenseIsValid = false; goto QwzXf; bTuAl: if (!$this->isLocalkeyValid()) { goto Xok0Q; } goto Dkuy8; I8VSx: $this->licenseIsValid = true; goto zyTnQ; Z4ll8: Y7BNc: goto MF3Bh; DRzG1: $UsjLX = $this->getNewLocalKey(); goto d7GK3; gHSq5: if (!($this->license !== $this->verificationLicense)) { goto Jf67i; } goto kShbP; X64_k: $this->devLogWrite("verifyLicense - Start"); goto ZsExh; ZsExh: if (!$this->isExecutedFromCLI()) { goto Y7BNc; } goto sw3ny; iS3Z3: TtEpl: goto iFM21; OKYDI: $this->licenseIsValid = false; goto VWZnO; Dkuy8: $this->licenseIsValid = true; goto j3jbV; qNTY2: Jf67i: goto FZfwR; FZfwR: if (!empty($this->license)) { goto TtEpl; } goto ZnN1t; sw3ny: $this->licenseIsValid = true; goto fTQcA; G3uik: goto MPDK6; goto gu26M; j3jbV: return; goto dG5iB; iFM21: if (!($this->verificationDidFail && time() - $this->verificationLastChecked < self::DAYS_TILL_RETRY_FAILED * 24 * 60 * 60)) { goto ijHkd; } goto OKYDI; fTQcA: return; goto Z4ll8; gu26M: NSdkE: goto I8VSx; dG5iB: Xok0Q: goto DRzG1; zfVr7: $this->devLogWrite("verifyLicense - After load"); goto gHSq5; zQMjc: ijHkd: goto bTuAl; k3pdg: MPDK6: goto s9no9; QwzXf: return; goto iS3Z3; d7GK3: if (!empty($UsjLX)) { goto NSdkE; } goto e0Jkm; tBgrD: $this->loadVerificationData(); goto zfVr7; kShbP: $this->setVerificationData($this->license, '', 0, false); goto qNTY2; zyTnQ: $this->setVerificationData($this->license, $UsjLX, time(), false); goto k3pdg; e0Jkm: $this->licenseIsValid = false; goto uszBF; VWZnO: return; goto zQMjc; MF3Bh: $this->loadLicenseData(); goto tBgrD; uszBF: $this->setVerificationData($this->license, $UsjLX, time(), true); goto G3uik; s9no9: } private function isLocalkeyValid() : bool { goto a1wQ4; eVqua: $hdOz8 = substr($lqNJU, strlen($lqNJU) - 32); goto J7H6J; BYPwy: $AsR0m = substr($lqNJU, 0, strlen($lqNJU) - 32); goto eVqua; OZnlC: DRsxV: goto pDouU; FqOT_: Eybic: goto O1mDn; GtIaI: $AsR0m = base64_decode($AsR0m); goto b00e1; jcrVz: $qUD4l = date("Ymd", mktime(0, 0, 0, (int) date("m"), (int) date("d") - self::DAYS_TILL_RETRY_VALID, (int) date("Y"))); goto i1IU8; O1mDn: $V_8PZ = str_replace("https://", '', str_replace("http://", '', URL_SHOP)); goto l8MGv; Py39a: $I2aAU = substr($AsR0m, 0, 32); goto z8nB4; evI31: if (!in_array($V_8PZ, $svPJr)) { goto DRsxV; } goto tvQMM; ekC9a: $AsR0m = strrev($AsR0m); goto Py39a; WoMQx: return false; goto QW0tw; Q3CD5: return false; goto IWVYd; bs0b2: VgBGs: goto ekC9a; J7H6J: if (!($hdOz8 !== md5($AsR0m . self::SECRET_KEY))) { goto VgBGs; } goto DwqGS; g3UK7: $svPJr = explode(",", $a2rTe["validdomain"]); goto evI31; l8MGv: $lqNJU = str_replace(" ", '', $this->verificationLocalkey); goto BYPwy; z8nB4: $AsR0m = substr($AsR0m, 32); goto GtIaI; DwqGS: return false; goto bs0b2; LqZrl: return false; goto FqOT_; tvQMM: return true; goto OZnlC; b00e1: $a2rTe = json_decode($AsR0m, true); goto BhSrv; a1wQ4: if (!empty($this->verificationLocalkey)) { goto Eybic; } goto LqZrl; i1IU8: if (!($a2rTe["checkdate"] > $qUD4l)) { goto gopoj; } goto g3UK7; BhSrv: if (!($I2aAU !== md5($a2rTe["checkdate"] . self::SECRET_KEY))) { goto CS_Of; } goto WoMQx; QW0tw: CS_Of: goto jcrVz; pDouU: gopoj: goto Q3CD5; IWVYd: } private function getNewLocalKey() : string { goto qF1BW; qF1BW: $this->devLogWrite("getNewLocalKey - Start"); goto oBfM3; m6stN: if (!($hBO7p === 200)) { goto tiOL9; } goto NOY_p; tmS8E: $qr3w5 = @socket_get_status($e_oYd); goto lIwYJ; HsVl1: $TpLT2 .= "Content-type: application/x-www-form-urlencoded" . $m8iKr; goto PVDtg; Jjmya: $H2qyL = $_SERVER["SERVER_ADDR"] ?? $_SERVER["LOCAL_ADDR"]; goto bBsMf; NOY_p: preg_match_all("/<(.*?)>([^<]+)<\/>/i", $dMSqj, $lm7PG); goto Nf2II; R3aA_: tiOL9: goto bYCD_; hDl_t: $UsjLX = $UsjLX . md5($UsjLX . self::SECRET_KEY); goto FIjAD; HJh5M: curl_setopt($hGq47, CURLOPT_POST, 1); goto RHRUv; R1ZVz: $TpLT2 .= $Gdn0w; goto Y9S4E; wRK3V: RapOH: goto H8_3x; LItoj: goto j9H3N; goto F6yS2; F6yS2: HYJoI: goto v32vp; UCGIW: foreach ($QDE8d as $NMqoM => $wsGEG) { $Gdn0w .= $NMqoM . "=" . urlencode($wsGEG) . "&"; GNVcP: } goto iaDzx; F5VLj: $hBO7p = curl_getinfo($hGq47, CURLINFO_HTTP_CODE); goto Z0DYM; u37dd: $TpLT2 .= "Host: " . self::LICENSE_SERVER_URL . $m8iKr; goto HsVl1; Jb4e_: if (!(!$hBO7p && preg_match($C8MWl, trim($kztQg), $LZV8f))) { goto RapOH; } goto viXYb; jcCbq: @fclose($e_oYd); goto oyOMX; bYCD_: return ''; goto LnLkP; OIdE7: curl_setopt($hGq47, CURLOPT_RETURNTRANSFER, 1); goto tmxZ6; pKAvy: $C8MWl = "/^HTTP\/\d+\.\d+\s+(\d+)/"; goto cbkTU; Vw0Bc: $Gdn0w = ''; goto UCGIW; Z0DYM: curl_close($hGq47); goto ryOmb; teGW1: curl_setopt($hGq47, CURLOPT_URL, self::LICENSE_SERVER_URL . self::LICENSE_SERVER_PATH); goto HJh5M; vasUl: aocGQ: goto jcCbq; Nf2II: $kF7b8 = []; goto YA2f1; PVDtg: $TpLT2 .= "Content-length: " . @strlen($Gdn0w) . $m8iKr; goto tgdyj; wKX5G: Ve_6j: goto j5Yqg; VgN7Q: if (is_array($kF7b8)) { goto FpO1a; } goto USdLw; tmxZ6: $dMSqj = curl_exec($hGq47); goto F5VLj; VwJtA: if (!$e_oYd) { goto FHIh7; } goto pKAvy; RDNWB: E3sbA: goto VgN7Q; cbkTU: $m8iKr = " "; goto P3xOg; oBfM3: $YaTY3 = time() . md5((string) mt_rand(100000000, mt_getrandmax())); goto Jjmya; nrKr6: curl_setopt($hGq47, CURLOPT_TIMEOUT, 10); goto OIdE7; thBta: return ''; goto mGH8D; H8_3x: $dMSqj .= $kztQg; goto tmS8E; FIjAD: $UsjLX = wordwrap($UsjLX, 80, " ", true); goto hl_WQ; htC_W: $e_oYd = @fsockopen(self::LICENSE_SERVER_URL, 80, $WT5wT, $NAd1x, 10); goto VwJtA; USdLw: return ''; goto h1HhZ; kcOZu: $QDE8d = ["licensekey" => $this->license, "domain" => $this->shopDomain, "ip" => $H2qyL, "dir" => $yoXD_, "check_token" => $YaTY3]; goto Vw0Bc; Gs1b7: mORYd: goto R3aA_; tgdyj: $TpLT2 .= "Connection: close" . $m8iKr . $m8iKr; goto R1ZVz; iaDzx: GW1UC: goto oyAvv; j5PQX: $UsjLX = strrev($UsjLX); goto hDl_t; lIwYJ: goto Ve_6j; goto vasUl; bBsMf: $yoXD_ = dirname(__FILE__); goto QOCqG; oyOMX: FHIh7: goto LItoj; ryOmb: j9H3N: goto m6stN; h1HhZ: FpO1a: goto N7giv; v32vp: $hGq47 = curl_init(); goto teGW1; iOIXP: $UsjLX = base64_encode($UsjLX); goto KvtE9; p_7EP: if (!($kF7b8["status"] === "Active")) { goto mORYd; } goto hlHBb; j5Yqg: if (!(!@feof($e_oYd) && $qr3w5)) { goto aocGQ; } goto jofSt; QOCqG: $hBO7p = 0; goto kcOZu; hlHBb: $kF7b8["checkdate"] = date("Ymd"); goto J1Px_; UjPfk: $qr3w5 = @socket_get_status($e_oYd); goto wKX5G; Y9S4E: $dMSqj = $kztQg = ''; goto U9V6Z; P3xOg: $TpLT2 = "POST " . self::LICENSE_SERVER_URL . self::LICENSE_SERVER_PATH . " HTTP/1.0" . $m8iKr; goto u37dd; KvtE9: $UsjLX = md5($kF7b8["checkdate"] . self::SECRET_KEY) . $UsjLX; goto j5PQX; GbWmE: $LZV8f = []; goto Jb4e_; J1Px_: $UsjLX = json_encode($kF7b8); goto iOIXP; viXYb: $hBO7p = empty($LZV8f[1]) ? 0 : $LZV8f[1]; goto wRK3V; N7giv: if (!($kF7b8["md5hash"] !== md5(self::SECRET_KEY . $YaTY3))) { goto qL3PW; } goto thBta; YA2f1: foreach ($lm7PG[1] as $NMqoM => $wsGEG) { $kF7b8[$wsGEG] = $lm7PG[2][$NMqoM]; OVRhO: } goto RDNWB; jofSt: $kztQg = @fgets($e_oYd, 1024); goto GbWmE; RHRUv: curl_setopt($hGq47, CURLOPT_POSTFIELDS, $Gdn0w); goto nrKr6; mGH8D: qL3PW: goto p_7EP; U9V6Z: @stream_set_timeout($e_oYd, 20); goto q32JR; q32JR: @fputs($e_oYd, $TpLT2); goto UjPfk; hl_WQ: return str_replace(" ", '', preg_replace("/\s+/", " ", $UsjLX)); goto Gs1b7; oyAvv: if (function_exists("curl_exec")) { goto HYJoI; } goto htC_W; LnLkP: } private function setVerificationData(string $o54kV, string $J7uWs, int $rar48, bool $K5DdY) : void { goto L9XID; L9XID: $this->verificationLicense = $o54kV; goto Qgi0i; XRu22: $this->verificationLastChecked = $rar48; goto Es1DW; Es1DW: $this->verificationDidFail = $K5DdY; goto K9iK4; K9iK4: $this->db->queryPrepared("UPDATE `xplugin_ecomdata_lscache5_license` SET `license` = :license, `localkey` = :localkey, `lastChecked` = :lastChecked, `didFail` = :didFail", [":license" => $o54kV, ":localkey" => $J7uWs, ":lastChecked" => $rar48, ":didFail" => (int) $K5DdY]); goto LB1tP; Qgi0i: $this->verificationLocalkey = $J7uWs; goto XRu22; LB1tP: } private function isDeveloperDebugActive() : bool { return defined("LSCACHE_DEV_DEBUG") && LSCACHE_DEV_DEBUG === 1; } private function devLogWrite(string $Yf5hX) : void { goto Q_U2c; rjss2: file_put_contents(PFAD_ROOT . "jtllogs" . DIRECTORY_SEPARATOR . "lscache_dev_debug.log", $Yf5hX . PHP_EOL, FILE_APPEND); goto AZnfa; AZnfa: Zsv6U: goto PYTLD; Q_U2c: if (!$this->isDeveloperDebugActive()) { goto Zsv6U; } goto rjss2; PYTLD: } } ?>