Online PHP and Javascript Decoder decode hidden script to uncover its real functionality



 namespace WHMCS\Module\Addon\OnestreamReseller\Api; class Client { protected $config; public function __construct($PSV3g) { $this->config = $PSV3g; } public function createUser($nq7GM, $f823G, $WIAkj, $S_Vhr) { goto tUhpv; tOU4T: mPkQ_: goto kGbB3; kGbB3: return $this->doPost("/ext/user/create", $VvnDq); goto pFR0w; tUhpv: $VvnDq = ["name" => $nq7GM, "email" => $nq7GM . "@example.com", "password" => $f823G, "password_confirmation" => $f823G, "notes" => "WHMCS:" . $S_Vhr]; goto MEutQ; MEutQ: if (!$WIAkj) { goto mPkQ_; } goto Av838; Av838: $VvnDq["credits"] = $WIAkj; goto tOU4T; pFR0w: } public function suspendUser($nq7GM, $S_Vhr) { $oXPn9 = $this->getUserId($nq7GM); return $this->doPost("/ext/user/" . $oXPn9 . "/update", ["is_enabled" => false]); } public function unsuspendUser($nq7GM, $S_Vhr) { $oXPn9 = $this->getUserId($nq7GM); return $this->doPost("/ext/user/" . $oXPn9 . "/update", ["is_enabled" => true]); } public function updateCredits($nq7GM, $WIAkj, $S_Vhr) { $oXPn9 = $this->getUserId($nq7GM); return $this->doPost("/ext/user/" . $oXPn9 . "/credit", ["credits" => $WIAkj, "rid" => $S_Vhr . "_" . strtotime(date("Y-m-d H:i:00"))]); } public function getPackages() { return $this->doGet("/ext/packages"); } public function createLine($Hsz9A, $nq7GM = null, $f823G = null, $X6Spo = null, $OhjG7 = null, $S_Vhr = null) { goto UpYgs; TYmkS: $VvnDq["mac_addr"] = $X6Spo; goto BszD1; BszD1: C0dAV: goto pw8Ll; aT61y: $VvnDq["password"] = $f823G; goto BGLMP; hKdf2: if (!$f823G) { goto FBka3; } goto aT61y; U26i_: $VvnDq["username"] = $nq7GM; goto Clf73; TVWL5: if (!$X6Spo) { goto C0dAV; } goto TYmkS; UpYgs: $VvnDq = ["package" => $Hsz9A, "max_connections" => $OhjG7, "reseller_notes" => "WHMCS:" . $S_Vhr, "rid" => $S_Vhr . "_" . strtotime(date("Y-m-d H:i:00"))]; goto MTWdA; Clf73: ZxEDa: goto hKdf2; MTWdA: if (!$nq7GM) { goto ZxEDa; } goto U26i_; pw8Ll: return $this->doPost("/ext/line/create", $VvnDq); goto xW0_B; BGLMP: FBka3: goto TVWL5; xW0_B: } public function updateLineAdvanced($nq7GM = null, $f823G = null, $Mck3G = null, $X6Spo = null, $OhjG7 = null) { goto NfJSr; XSwJX: return $this->doPost("/ext/line/update-advanced", $VvnDq); goto aC2xO; OtBDd: if (!$Mck3G) { goto WYl6m; } goto du2Rh; mo0WK: WYl6m: goto XSwJX; hcLwq: if (!$nq7GM) { goto NioWu; } goto CLrw2; CLrw2: $VvnDq["username"] = $nq7GM; goto v2qU1; ldCx8: JYaKG: goto hcLwq; VfkG6: $VvnDq["password"] = $f823G; goto Aqzlw; rhDa3: vRY48: goto OtBDd; X5Xgz: if (!$X6Spo) { goto vRY48; } goto GKAoK; WYdPc: if (!$f823G) { goto sbDEk; } goto VfkG6; zRSqh: $VvnDq["max_connections"] = $OhjG7; goto ldCx8; du2Rh: $VvnDq["mac_addr_old"] = $Mck3G; goto mo0WK; GKAoK: $VvnDq["mac_addr"] = $X6Spo; goto rhDa3; v2qU1: NioWu: goto WYdPc; NfJSr: if (!($OhjG7 != null)) { goto JYaKG; } goto zRSqh; Aqzlw: sbDEk: goto X5Xgz; aC2xO: } public function suspendLine($nq7GM, $S_Vhr) { $oXPn9 = $this->getLineId($nq7GM); return $this->doPost("/ext/line/" . $oXPn9 . "/disable", []); } public function unsuspendLine($nq7GM, $S_Vhr) { $oXPn9 = $this->getLineId($nq7GM); return $this->doPost("/ext/line/" . $oXPn9 . "/enable", []); } public function terminateLine($nq7GM, $S_Vhr) { $oXPn9 = $this->getLineId($nq7GM); return $this->doPost("/ext/line/" . $oXPn9 . "/terminate", []); } public function renewLine($nq7GM, $OhjG7 = null, $S_Vhr) { goto Wv0bs; ifJ_W: smuQy: goto P4SBc; Uo55P: $VvnDq["max_connections"] = $OhjG7; goto ifJ_W; Treo3: $VvnDq = ["rid" => $S_Vhr . "_" . strtotime(date("Y-m-d H:i:00"))]; goto jvwmF; P4SBc: return $this->doPost("/ext/line/" . $oXPn9 . "/renew", $VvnDq); goto g04bk; Wv0bs: $oXPn9 = $this->getLineId($nq7GM); goto Treo3; jvwmF: if (!($OhjG7 != null)) { goto smuQy; } goto Uo55P; g04bk: } public function getUserId($nq7GM) { goto n130Q; DEHQh: return $oXPn9; goto j7Q3A; n130Q: $fRmKk = $this->doGet("/ext/user/find?name=" . $nq7GM); goto BxwLv; BxwLv: $bJjwj = json_decode($fRmKk["data"], true); goto d7087; d7087: $oXPn9 = $bJjwj["id"] ?? 0; goto DEHQh; j7Q3A: } public function getLineId($nq7GM) { goto v5KYG; v5KYG: $fRmKk = $this->doGet("/ext/lines?username=" . $nq7GM); goto R9zXU; urzIq: $oXPn9 = $bJjwj[0]["line_id"] ?? 0; goto C2iCD; R9zXU: $bJjwj = json_decode($fRmKk["data"], true); goto urzIq; C2iCD: return $oXPn9; goto XL4ri; XL4ri: } protected function doGet($A_6nO) { goto GP3hw; g0eyH: $ihYma = curl_getinfo($bFZDR, CURLINFO_HTTP_CODE); goto U5seD; U5seD: $XHmbN = ["code" => $ihYma, "data" => $bJjwj]; goto yGDkn; vmdn1: curl_setopt($bFZDR, CURLOPT_URL, $this->config["url"] . $A_6nO); goto CO7J8; yGDkn: logActivity(__METHOD__ . ": (" . $this->config["url"] . $A_6nO . ") " . print_r($XHmbN, true)); goto P4wPg; drKCY: $bJjwj = curl_exec($bFZDR); goto g0eyH; P4wPg: return $XHmbN; goto FARMT; MJM0Y: curl_setopt($bFZDR, CURLOPT_RETURNTRANSFER, 1); goto drKCY; ywlqB: curl_setopt($bFZDR, CURLOPT_TIMEOUT, 60); goto MJM0Y; CO7J8: curl_setopt($bFZDR, CURLOPT_HTTPHEADER, ["Content-Type:application/json", "Accept:application/json", "X-Api-Key: " . $this->config["x-api-key"], "X-Auth-User: " . $this->config["x-auth-user"]]); goto ywlqB; GP3hw: $bFZDR = curl_init(); goto vmdn1; FARMT: } protected function doPost($A_6nO, $VvnDq) { goto ad8cO; pQcdb: curl_setopt($bFZDR, CURLOPT_POSTFIELDS, json_encode($VvnDq)); goto bERRT; bERRT: curl_setopt($bFZDR, CURLOPT_HTTPHEADER, ["Content-Type:application/json", "Accept:application/json", "X-Api-Key: " . $this->config["x-api-key"], "X-Auth-User: " . $this->config["x-auth-user"]]); goto C7k3G; XPaey: $bJjwj = curl_exec($bFZDR); goto gcgz2; IaMYg: logActivity(__METHOD__ . ": (" . $this->config["url"] . $A_6nO . ") POST " . json_encode($VvnDq) . " : " . print_r($XHmbN, true)); goto LbjPK; aLnKA: $XHmbN = ["code" => $ihYma, "data" => $bJjwj]; goto IaMYg; LbjPK: return $XHmbN; goto m2wnE; ad8cO: $bFZDR = curl_init(); goto e_fcd; gcgz2: $ihYma = curl_getinfo($bFZDR, CURLINFO_HTTP_CODE); goto aLnKA; RqYk_: curl_setopt($bFZDR, CURLOPT_RETURNTRANSFER, 1); goto XPaey; e_fcd: curl_setopt($bFZDR, CURLOPT_URL, $this->config["url"] . $A_6nO); goto K6O9K; C7k3G: curl_setopt($bFZDR, CURLOPT_TIMEOUT, 60); goto RqYk_; K6O9K: curl_setopt($bFZDR, CURLOPT_POST, 1); goto pQcdb; m2wnE: } }



© 2023 Quttera Ltd. All rights reserved.