/* Decoded by unphp.net */ FreePBX = $freepbx; goto QSmyx; E1C3r: if (!($freepbx == null)) { goto mE6ll; } goto iLoPn; QSmyx: $this->db = $freepbx->Database; goto KePM7; vPETM: mE6ll: goto RIema; KePM7: } public function install() { } public function uninstall() { } public function backup() { } public function restor e($backup) { } public function showView($view = '') { } public function doConfigPageInit() { } public function ajaxRequest($command, $setting) { goto BfT9f; sdf2Q: return true; goto dYH8X; OnWTT: return false; goto JqUH1; dYH8X: lMPc1: goto OnWTT; BfT9f: if (!($command == "licgri\x6 4")) { goto lMPc1; } goto sdf2Q; JqUH1: } public function ajaxHandler() { goto ZMwWn; yttZc: oHfK5: goto LBNJs; ZMwWn: if (!($_REQUEST["command"] == "licgrid")) { goto oHfK5; } goto JAHlA; JAHlA: return $this->licenseGrid(); goto yttZc; LBNJs: } public functi on showPage() { return \load_view(__DIR__ . "/views/HardwareId.php", array("hardwareId" => $this->getHardwareId())); } public function getHardwareId() { goto cnhRm; y3hj2: $hostvars = array(); goto fSyRv; KKM27 : $mid = "no_machine_id"; goto JnV1e; InV4d: jFIcx: goto Eby1b; fSyRv: foreach ($vars as $x) { goto iI8sO; M82n3: $hostvars[$filename] = trim(file_get_contents($x)); goto tQ_em; iI8sO: $filename = basename($x); goto dLkoR; ImBF_: RGN6U: goto M82n3; lXosN: goto o uSXh; goto ImBF_; ekvbG: $hostvars[$filename] = "__unreadable__"; goto lXosN; yfwQd: NPd04: goto Bl0Wa; tQ_em: ouSXh: goto yfwQd; dLkoR: if (!is_dir($x) && is_readable($x)) { goto RGN6U; } goto ekvbG; Bl0Wa: } goto Yfb16; SAhe_: return hash("sha2\ 656", $hash); goto UBg3Y; FeHET: tNycO: goto t8GkQ; Eby1b: $mid = trim(file_get_contents("/etc/machine-id")); goto gE23O; cnhRm: $vars = glob("/sys/class/dmi/id/*"); goto y3hj2; Iev7T: QTL65: goto h_Krt ; P0C3K: $macs = array(); goto zNvgc; gE23O: eDpAj: goto BeYQ3; Yfb16: F0n0U: goto kIulp; t8GkQ: asort($macs, \SORT_STRING); goto focTH; JnV1e: goto eDpAj; goto InV4d; zNvgc: foreach ($nics as $x) { goto M06xr; GMdCv: $mac = str_replace(":", '', trim(file_get_contents($x))); goto F1TOa; W053r: H1B kD: goto t27xB; hlVZ6: if (!is_readable($x)) { goto m0mx1; } goto GMdCv; jjYPW: goto H1BkD; goto CMOtY; CMOtY: m0mx1: goto plMLh; plMLh: $macs[$nic] = "__unreadable__"; goto W053r; t27xB: nYKiq: goto mHVlx; F1TOa: $macs[$nic] = $mac; goto jjYPW; M06xr: $nic = basename(dirname($x)); goto hlVZ6; mHVlx: } goto FeHET; focTH: $authmacs = array(); goto Rlbr2; BeYQ3: $hash = json_encode(array("hostvars" => $hostvars, "macs" => $authmacs, "mid" => $mid)); goto SAhe_; h_Krt: if (file_exists("/etc/ma chine-id") && is_readable("/etc/machine-id")) { goto jFIcx; } goto KKM27; Rlbr2: foreach ($macs as $nic => $mac) { goto tpJJ1; Rojfo: goto QTL65; goto wErpW; tto1x: $authmacs[] = $mac; goto wxb4K; tpJJ1: if (!(count($authmacs) >= 2)) { goto ABzVM; } goto Rojfo; wxb4K: jb8Vl: goto ECT5F; QHsc0: if (!($mac === "00:00:00:00:00:00")) { goto MmcAW; } goto mVSqW; y7fRT: goto jb8Vl; goto JMGVB; JMGVB: C1uo8: goto QHsc0; ZPaRD: MmcAW: goto tto1x; aP15U: if (!preg_match("/^(lo|\1 44ocker|br\-|veth)/", $nic)) { goto C1uo8; } goto y7fRT; mVSqW: goto jb8Vl; goto ZPaRD; wErpW: ABzVM: goto aP15U; ECT5F: } goto Iev7T; kIulp: $nics = glob("/sys/class/net/*/address"); goto P0C3K; UBg3Y: } public static function parse($licenseKey) { goto n_PGe; SR0YH: $success = openssl_public_decrypt($sign, $decryptedData, $publicKey); goto oX3VX; yZKbn: $key = openssl_pkey_get_public($publicKey); goto NhGc2; yuUwI: XtExk: goto SR0YH; AECz1: if ($success) { goto t9Wkr; } goto Mnp Vz; N1znk: throw new Exception("OpenSSL: Unable to get public key"); goto yuUwI; NhGc2: if ($key) { goto XtExk; } goto N1znk; e7u1t: t9Wkr: goto o07AE; o07AE: return json_decode($decryptedData, true); goto d92cV; H2_of: $publicKey = base64_decode("LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBU\ x55VGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFxamM3QjVnQ0pOMjZ6dy9mK2svbQpTMFVtZFlSM0Q5NytJR0 kzdGtLWlFNN3BEcFl1TTV4WGhQOGc2WTdScHFybnN4WDV1NTJ1MVdsQWl4ckFzbzZsCjZBdDFQcU h3NXRFTGFxT1ZCcGkzRkdLQ1dTcmJKNjg0aWRERklHMWtqblMxY1BqN1JVRXZPbDBoMk15VzY4aU8 KdmIzb05Ca1FUa2RGWW1SZTEwZlc4MVl4VG9DRmF3ZEFxTkFGV2tNajl1Ti90SDgrY1lxeTdYaGp\x 72M3dnSVV6QwpreW5yYnFKNjBrS25JeXJJTHAyUlZieEpjVW5NeFhMcWtDWnRudWR1UWU5STMxSDF\x6 aVGJPUDJpWnZMUXA2UUdiCnRmSnlkUkY2UzJEZmsxUWQvTHJCeFZHekQreHFGYkR1OVBjMGtDRkt\ 130R0pEVHo3MHlvNEp6cFM1OGVEZFBHYysKOVFJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0\ x74Cg=="); goto yZKbn; oX3VX: openssl_free_key($key); goto AECz1; n_PGe: $sign = base64_decode($licenseKey); goto H2_of; MnpVz: throw new Exception("OpenSSL: Unable to decrypt - " . openssl_error_string() ); goto e7u1t; d92cV: } public function getAllLicences() { goto MBS9j; Pq3Gl: Ql7Nb: goto cdFqN; cdFqN: return $files; goto I6tZy; MBS9j: $files = array(); goto eG1f1; eG1f1: foreach (glob("/etc/clearlyip/*.lic") as $filename) { goto mpM2A; j275 N: $files[$key] = parse_ini_file($filename, false, INI_SCANNER_RAW); goto x2ufy; mpM2A: $key = basename($filename, ".lic"); goto j275N; x2ufy: B1E8y: goto WbR2u; WbR2u: } goto Pq3Gl; I6tZy: } public function getLicenceData($module = '') { goto yhWmr; C09eI: return $final; goto tao71; qt1V O: foreach ($licences as $module => $data) { $final[$module] = $this->parse($data["key"]); AhFM5: } goto w42cq; PLk8h: $final = array(); goto qt1VO; w42cq: IN6pJ: goto C09eI; yhWmr: $licences = $this->getAllLicences(); goto PLk8h; tao71: } public function licenseGrid() { goto LovBK; LovBK: $ data = $this->getLicenceData(); goto QRLvA; kPMEi: return $output; goto G5DrM; QRLvA: $hardwareid = $this->getHardwareId(); goto I7l_N; SdD3_: foreach ($data as $item => $info) { goto l5RqO; y4txL: $installed = $this->FreePBX->Modules->checkStatus($item) ? _("Installed") : _("Not Installed"); goto AoJFb; CO07t: $badServer = true; goto sqb98; l3g2T: vpaE0: goto Aub1m; lOpFH: $badServer = false; goto u2QPB; zYn0m: $thisMachine = "Not Valid on this hardware"; g oto CO07t; AoJFb: $f = array("name" => $item, "product" => isset($info["product"]) ? $info["product"] : "Not Set", "expires" => isset($info["validUntil"]) ? $this->FreePBX->View->getDateTime($info["validUntil"]) : "Not Set", "thisMachine" => $thisMachine, "badServer" => $badServer, "expired" => $expired, "inst\x 61lled" => $installed); goto RhMuV; Tmsc2: $validFormatted = sprintf(_("Expired %s"), $validFormatted); goto cob9i; u2QPB: if (!(isset($info["hardware_id"]) && $info["hardware_id"] != $hardware id)) { goto zt9At; } goto zYn0m; kHmJs: if (!($info["validUntil"] < time())) { goto T3LkJ; } goto Tmsc2; cob9i: $expired = true; goto tzGYT; RhMuV: $output[] = $f; goto l3g2T; sqb98: zt9At: goto HNpRy; IaVG3: $validFormatted = $this->FreePBX->View->getDateTime($info["\x7 6alidUntil"]); goto kHmJs; tzGYT: T3LkJ: goto I18cB; l5RqO: $thisMachine = "Not Hardware Locked"; goto lOpFH; HNpRy: $expired = false; goto u7aDk; u7aDk: if (!isset($info["validUntil"])) { goto TAaFm; } goto IaVG3; I18cB: TAaFm: goto y4txL; Aub1m: } goto Ze4LM; I7l_N: $output = array(); goto SdD3_; Ze4LM: HoCjK: goto kPMEi; G5DrM: } } ?>