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 ${"GLOBALS"}["prygznjtmfut"]="installedVersion";${"GLOBALS"}["fpdjmcic"]="latestVers..

Decoded Output download

<?php ${"GLOBALS"}["prygznjtmfut"]="installedVersion";${"GLOBALS"}["fpdjmcic"]="latestVersion";${"GLOBALS"}["sxremccmjgw"]="showday";${"GLOBALS"}["pqsnxuhvvk"]="expiry";${"GLOBALS"}["ybtsli"]="activeAddons";${"GLOBALS"}["skyfmw"]="addon";${"GLOBALS"}["ndbxgjjlgt"]="licensedAddons";${"GLOBALS"}["dkcmwunmb"]="rawData";${"GLOBALS"}["gdzjnjjhre"]="listData";${"GLOBALS"}["btidxhrjdh"]="var";${"GLOBALS"}["fmbjekq"]="validips";${"GLOBALS"}["zdipnmso"]="domain";${"GLOBALS"}["yccypuwb"]="localkeyresults";${"GLOBALS"}["yylpom"]="md5hash";${"GLOBALS"}["qljdgdilt"]="localdata";${"GLOBALS"}["kjbrsrwotfi"]="localkey";${"GLOBALS"}["bhqogmypvp"]="splpt";${"GLOBALS"}["bcvqohoyheq"]="data_encoded";${"GLOBALS"}["nrjocfn"]="data";${"GLOBALS"}["yybxle"]="responsecode";${"GLOBALS"}["eabpxtacm"]="timeout";${"GLOBALS"}["pimkwuhluq"]="ch";${"GLOBALS"}["sejmemumbts"]="url";${"GLOBALS"}["nduugpqswt"]="hostip";${"GLOBALS"}["ebkvcog"]="hostips";${"GLOBALS"}["yrryvlydmmbw"]="res";${"GLOBALS"}["rgjiywp"]="v";${"GLOBALS"}["dndywun"]="k";${"GLOBALS"}["oefhks"]="postfields";${"GLOBALS"}["usyepgevm"]="results";${"GLOBALS"}["dpxpqfmzw"]="localkeyvalid";${"GLOBALS"}["eklcqex"]="originalcheckdate";${"GLOBALS"}["rjeoumqi"]="localmax";${"GLOBALS"}["siwljkgp"]="ip";${"GLOBALS"}["axvydofltn"]="hosts";${"GLOBALS"}["foczjnjm"]="instance";${"GLOBALS"}["ufawmfnvsdnq"]="license";${"GLOBALS"}["pjrmeol"]="whmcs";class WHMCS_License{private$licensekey="";private$localkey="";private$keydata=array();private$salt="";private$date="";private$localkeydecoded=false;private$responsedata="";private$postmd5hash="";private$localkeydays="10";private$allowcheckfaildays="5";private$debuglog=array();private$version="7a1bbff560de83ab800c4d1d2f215b91006be8e6";protected static$instance;public function __construct(){${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();$this->licensekey=$whmcs->get_license_key();$this->localkey=$whmcs->get_config("License");$this->salt=sha1("WHMCS{$whmcs->get_config("Version")}TFB{$whmcs->get_hash()}");$this->date=date("Ymd");$this->decodeLocalOnce();if(isset($_GET["forceremote"])){$this->forceRemoteCheck();WHMCS_Terminus::getinstance()->doExit();}}protected static function setInstance($license){$ghcbmvdb="instance";$eacijmdmry="license";self::${$ghcbmvdb}=${$eacijmdmry};return${${"GLOBALS"}["ufawmfnvsdnq"]};}protected static function destroyInstance(){self::${${"GLOBALS"}["foczjnjm"]}=null;return;}public static function getInstance(){${"GLOBALS"}["ucrbywklxgs"]="instance";${"GLOBALS"}["jnbshslgtsh"]="instance";if(is_null(self::${${"GLOBALS"}["jnbshslgtsh"]})){self::setinstance(new WHMCS_License());}return self::${${"GLOBALS"}["ucrbywklxgs"]};}private function getHosts(){${"GLOBALS"}["akdgkokzsxd"]="hosts";${${"GLOBALS"}["axvydofltn"]}=gethostbynamel("");return${${"GLOBALS"}["akdgkokzsxd"]};}private function getLicenseKey(){return$this->licensekey;}private function getHostIP(){if(isset($_SERVER["SERVER_ADDR"])){${${"GLOBALS"}["siwljkgp"]}=$_SERVER["SERVER_ADDR"];}else{if(isset($_SERVER["LOCAL_ADDR"])){${"GLOBALS"}["oftlufjofsrv"]="ip";${${"GLOBALS"}["oftlufjofsrv"]}=$_SERVER["LOCAL_ADDR"];}else{if(function_exists("gethostname")){${"GLOBALS"}["fguxyyenh"]="ip";${${"GLOBALS"}["fguxyyenh"]}=gethostbyname(gethostname());}else{${"GLOBALS"}["nqksvre"]="ip";${${"GLOBALS"}["nqksvre"]}="";}}}return${${"GLOBALS"}["siwljkgp"]};}private function getHostDomain(){return isset($_SERVER["SERVER_NAME"])?($_SERVER["SERVER_NAME"]):"";}private function getHostDir(){return ROOTDIR;}public function getSalt(){return$this->salt;}public function getDate(){return$this->date;}public function checkLocalKeyExpiry(){${"GLOBALS"}["kyhxuqd"]="localexpirymax";${"GLOBALS"}["cufsfvqbk"]="originalcheckdate";${"GLOBALS"}["rkbofz"]="localmax";${"GLOBALS"}["vthjipbj"]="originalcheckdate";$sdckpluaexv="localexpirymax";${${"GLOBALS"}["cufsfvqbk"]}=$this->getKeyData("checkdate");${$sdckpluaexv}=date("Ymd",mktime(0,0,0,date("m"),date("d")-$this->localkeydays,date("Y")));if(${${"GLOBALS"}["vthjipbj"]}<${${"GLOBALS"}["kyhxuqd"]}){return false;}${${"GLOBALS"}["rjeoumqi"]}=date("Ymd",mktime(0,0,0,date("m"),date("d")+2,date("Y")));if(${${"GLOBALS"}["rkbofz"]}<${${"GLOBALS"}["eklcqex"]}){return false;}return true;}public function remoteCheck($forceRemote=false){try{${"GLOBALS"}["ieqibjy"]="localkeyvalid";${${"GLOBALS"}["ieqibjy"]}=$this->decodeLocalOnce();$mgemmfpvod="localkeyvalid";$this->debug(""."Local Key Valid: ".${${"GLOBALS"}["dpxpqfmzw"]});if(${$mgemmfpvod}){$lvqppmy="localkeyvalid";${"GLOBALS"}["jvnqhup"]="localkeyvalid";${$lvqppmy}=$this->checkLocalKeyExpiry();$this->debug(""."Local Key Expiry: ".${${"GLOBALS"}["dpxpqfmzw"]});if(${${"GLOBALS"}["jvnqhup"]}){${"GLOBALS"}["ksjpcsmc"]="localkeyvalid";${${"GLOBALS"}["ksjpcsmc"]}=$this->validateLocalKey();$this->debug(""."Local Key Validation: ".${${"GLOBALS"}["dpxpqfmzw"]});}}${"GLOBALS"}["mzgqtqsb"]="forceRemote";if(false||!${${"GLOBALS"}["dpxpqfmzw"]}||${${"GLOBALS"}["mzgqtqsb"]}){${"GLOBALS"}["kogdiyrihfs"]="results";${"GLOBALS"}["srmjrksg"]="results";${"GLOBALS"}["odmmorqwxs"]="results";${"GLOBALS"}["suvkru"]="results";$ueqvyvvxheh="results";${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${$ueqvyvvxheh}["status"]="Active";$lbwdmwfbpn="results";$iwikcikp="results";${${"GLOBALS"}["usyepgevm"]}["key"]=$this->licensekey;${${"GLOBALS"}["usyepgevm"]}["registeredname"]=$whmcs->get_config("CompanyName");$qpbocx="results";${$lbwdmwfbpn}["productname"]="Owned License No Branding";$bibreihl="results";${${"GLOBALS"}["suvkru"]}["productid"]="5";${"GLOBALS"}["bfqasbbi"]="results";${${"GLOBALS"}["usyepgevm"]}["billingcycle"]="One Time";${$iwikcikp}["validdomains"]=$this->getHostDomain();${${"GLOBALS"}["kogdiyrihfs"]}["validips"]=$this->getHostIP();${${"GLOBALS"}["odmmorqwxs"]}["validdirs"]=$this->getHostDir();${${"GLOBALS"}["usyepgevm"]}["checkdate"]=$this->getDate();${${"GLOBALS"}["usyepgevm"]}["version"]=$whmcs->getVersion()->getCanonical();${$bibreihl}["regdate"]="2015-02-26";${${"GLOBALS"}["bfqasbbi"]}["nextduedate"]="2050-02-20";${${"GLOBALS"}["srmjrksg"]}["addons"]=array(array("name"=>"Branding Removal","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Support and Updates","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Project Management Addon","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Licensing Addon","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Mobile Edition","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"iPhone App","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Android App","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Configurable Package Addon","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Live Chat Monthly No Branding","nextduedate"=>"2050-12-30","status"=>"Active"));$this->setKeyData(${$qpbocx});$this->updateLocalKey();}$this->debug("Remote Check Done");}catch(WHMCS_Exception$exception){$this->debug(sprintf("License Error: %s",$exception->getMessage()));return false;}return true;}private function getLocalMaxExpiryDate(){return date("Ymd",mktime(0,0,0,date("m"),date("d")-($this->localkeydays+$this->allowcheckfaildays),date("Y")));}private function buildQuery($postfields){$query_string="";foreach(${${"GLOBALS"}["oefhks"]} as${${"GLOBALS"}["dndywun"]}=>${${"GLOBALS"}["rgjiywp"]}){$query_string.="".${${"GLOBALS"}["dndywun"]}."=".urlencode(${${"GLOBALS"}["rgjiywp"]})."&";continue;}return$query_string;}function isClientLimitsEnabled(){return(string)$this->getKeyData("ClientLimitsEnabled");}private function callHome($postfields){${"GLOBALS"}["hufbcousdm"]="postfields";$query_string=$this->buildQuery(${${"GLOBALS"}["hufbcousdm"]});${${"GLOBALS"}["yrryvlydmmbw"]}=$this->callHomeLoop($query_string,5);if(${${"GLOBALS"}["yrryvlydmmbw"]}){$zomaykakumc="res";return${$zomaykakumc};}return$this->callHomeLoop($query_string,30);}private function callHomeLoop($query_string,$timeout=5){$utggudfjywt="hostips";${${"GLOBALS"}["ebkvcog"]}=$this->getHosts();$rxfvrxqvl="hostip";foreach(${$utggudfjywt} as${$rxfvrxqvl}){${"GLOBALS"}["udnxdfbc"]="responsecode";$gpwgqtxa="timeout";$ahgbyux="responsecode";${${"GLOBALS"}["udnxdfbc"]}=$this->makeCall(${${"GLOBALS"}["nduugpqswt"]},$query_string,${$gpwgqtxa});if(!(${$ahgbyux}==200)){continue;}return$this->responsedata;}return false;}private function makeCall($ip,$query_string,$timeout=5){${"GLOBALS"}["wmrobiyrrq"]="ch";${"GLOBALS"}["rjylegmnm"]="ch";${"GLOBALS"}["iccrxxrima"]="ch";$vgmgdqda="url";$kpeauz="url";${${"GLOBALS"}["sejmemumbts"]}="https://".${${"GLOBALS"}["siwljkgp"]}."/license/verify53.php";$this->debug(""."Request URL ".${$kpeauz});${${"GLOBALS"}["pimkwuhluq"]}=curl_init();curl_setopt(${${"GLOBALS"}["wmrobiyrrq"]},CURLOPT_URL,${$vgmgdqda});${"GLOBALS"}["rkhjgltikj"]="responsecode";curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_POST,1);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_POSTFIELDS,$query_string);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_TIMEOUT,${${"GLOBALS"}["eabpxtacm"]});curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_RETURNTRANSFER,1);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_SSL_VERIFYHOST,0);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_SSL_VERIFYPEER,0);$this->responsedata=curl_exec(${${"GLOBALS"}["iccrxxrima"]});${${"GLOBALS"}["yybxle"]}=curl_getinfo(${${"GLOBALS"}["pimkwuhluq"]},CURLINFO_HTTP_CODE);$this->debug(""."Response Code: ".${${"GLOBALS"}["rkhjgltikj"]}." Data: ".$this->responsedata);if(curl_error(${${"GLOBALS"}["pimkwuhluq"]})){$rdmjqr="ch";${"GLOBALS"}["vablpcqzlr"]="ch";$this->debug("Curl Error: ".curl_error(${$rdmjqr})." - ".curl_errno(${${"GLOBALS"}["vablpcqzlr"]}));}curl_close(${${"GLOBALS"}["rjylegmnm"]});return${${"GLOBALS"}["yybxle"]};}private function processResponse($data){$ppbsjer="data";${"GLOBALS"}["hlfmygs"]="data";${"GLOBALS"}["kpusucht"]="data";${${"GLOBALS"}["kpusucht"]}=strrev(${${"GLOBALS"}["nrjocfn"]});${${"GLOBALS"}["nrjocfn"]}=base64_decode(${${"GLOBALS"}["hlfmygs"]});${${"GLOBALS"}["usyepgevm"]}=unserialize(${$ppbsjer});${"GLOBALS"}["wvbjvyhuqlsv"]="results";$this->posthash=${${"GLOBALS"}["usyepgevm"]}["hash"];unset(${${"GLOBALS"}["usyepgevm"]}["hash"]);${${"GLOBALS"}["usyepgevm"]}["checkdate"]=$this->getDate();return${${"GLOBALS"}["wvbjvyhuqlsv"]};}private function updateLocalKey(){$mvypfsgu="data_encoded";$fbnstrp="data_encoded";$kbjbjwy="data_encoded";${${"GLOBALS"}["bcvqohoyheq"]}=serialize($this->keydata);$pchptd="data_encoded";${"GLOBALS"}["iqygsargde"]="data_encoded";${"GLOBALS"}["ttfvbsl"]="data_encoded";$rloequod="data_encoded";$prqxwipac="data_encoded";${$fbnstrp}=base64_encode(${${"GLOBALS"}["bcvqohoyheq"]});${"GLOBALS"}["adgacdpt"]="data_encoded";${${"GLOBALS"}["bcvqohoyheq"]}=sha1($this->getDate().$this->getSalt()).${$mvypfsgu};${${"GLOBALS"}["bcvqohoyheq"]}=strrev(${$rloequod});${"GLOBALS"}["ydazsdc"]="data_encoded";${"GLOBALS"}["rmuwpvj"]="data_encoded";${${"GLOBALS"}["bhqogmypvp"]}=strlen(${${"GLOBALS"}["iqygsargde"]})/2;${${"GLOBALS"}["rmuwpvj"]}=substr(${${"GLOBALS"}["bcvqohoyheq"]},${${"GLOBALS"}["bhqogmypvp"]}).substr(${${"GLOBALS"}["bcvqohoyheq"]},0,${${"GLOBALS"}["bhqogmypvp"]});${${"GLOBALS"}["bcvqohoyheq"]}=sha1(${${"GLOBALS"}["bcvqohoyheq"]}.$this->getSalt()).${${"GLOBALS"}["adgacdpt"]}.sha1(${${"GLOBALS"}["ydazsdc"]}.$this->getSalt().time());${$kbjbjwy}=base64_encode(${${"GLOBALS"}["ttfvbsl"]});${$prqxwipac}=wordwrap(${$pchptd},80,"
",true);WHMCS_Application::getinstance()->set_config("License",${${"GLOBALS"}["bcvqohoyheq"]});$this->debug("Updated Local Key");return null;}public function forceRemoteCheck(){$this->remoteCheck(true);return null;}private function setInvalid($reason="Invalid"){$jxolzyxtkvji="reason";$this->keydata=array("status"=>${$jxolzyxtkvji});return null;}private function decodeLocal(){${"GLOBALS"}["rkgpgckygv"]="localkey";${"GLOBALS"}["uqrxtsbj"]="localkey";$this->debug("Decoding local key");${"GLOBALS"}["gshchcbsp"]="localkey";${${"GLOBALS"}["uqrxtsbj"]}=$this->localkey;$gyzxfmusl="md5hash";if(!${${"GLOBALS"}["kjbrsrwotfi"]}){return false;}${"GLOBALS"}["wowtghjo"]="localkey";${${"GLOBALS"}["rkgpgckygv"]}=str_replace("
","",${${"GLOBALS"}["kjbrsrwotfi"]});$uvbqidc="md5hash";$hivmwrwqt="localkey";${$hivmwrwqt}=base64_decode(${${"GLOBALS"}["gshchcbsp"]});${${"GLOBALS"}["qljdgdilt"]}=substr(${${"GLOBALS"}["kjbrsrwotfi"]},40,0-40);${$uvbqidc}=substr(${${"GLOBALS"}["wowtghjo"]},0,40);if(${$gyzxfmusl}==sha1(${${"GLOBALS"}["qljdgdilt"]}.$this->getSalt())){$ivdhcywvk="splpt";$xewmxilb="splpt";${"GLOBALS"}["ncyuky"]="localdata";${"GLOBALS"}["tmgpyxcsfjo"]="localkeyresults";$tgzexnwjfnt="localdata";${"GLOBALS"}["tocuuelyva"]="localdata";${"GLOBALS"}["etdkhup"]="localdata";${${"GLOBALS"}["bhqogmypvp"]}=strlen(${${"GLOBALS"}["ncyuky"]})/2;${"GLOBALS"}["pewftjh"]="originalcheckdate";${"GLOBALS"}["knkkikmxf"]="localdata";${${"GLOBALS"}["qljdgdilt"]}=substr(${${"GLOBALS"}["tocuuelyva"]},${$xewmxilb}).substr(${${"GLOBALS"}["qljdgdilt"]},0,${$ivdhcywvk});${"GLOBALS"}["iscnqnelikyv"]="localdata";${$tgzexnwjfnt}=strrev(${${"GLOBALS"}["qljdgdilt"]});$lmwdusvsccv="md5hash";$kbingvnh="localkeyresults";${${"GLOBALS"}["yylpom"]}=substr(${${"GLOBALS"}["iscnqnelikyv"]},0,40);${${"GLOBALS"}["etdkhup"]}=substr(${${"GLOBALS"}["knkkikmxf"]},40);${${"GLOBALS"}["qljdgdilt"]}=base64_decode(${${"GLOBALS"}["qljdgdilt"]});${${"GLOBALS"}["tmgpyxcsfjo"]}=unserialize(${${"GLOBALS"}["qljdgdilt"]});${${"GLOBALS"}["pewftjh"]}=${$kbingvnh}["checkdate"];if(${$lmwdusvsccv}==sha1(${${"GLOBALS"}["eklcqex"]}.$this->getSalt())){if(isset(${${"GLOBALS"}["yccypuwb"]}["key"])){if(isset(${${"GLOBALS"}["yccypuwb"]}["key"])||${${"GLOBALS"}["yccypuwb"]}["key"]==WHMCS_Application::getinstance()->get_license_key()){${"GLOBALS"}["dcuqqwl"]="localkeyresults";$this->debug("Local Key Decode Successful");$this->setKeyData(${${"GLOBALS"}["dcuqqwl"]});}}else{$this->debug("License Key Invalid");}}else{$this->debug("Local Key MD5 Hash 2 Invalid");}}else{$this->debug("Local Key MD5 Hash Invalid");}$this->localkeydecoded=true;return$this->getKeyData("status")=="Active"?(true):(false);}private function decodeLocalOnce(){if($this->localkeydecoded){return true;}return$this->decodeLocal();}private function isRunningInCLI(){if(php_sapi_name()=="cli");return php_sapi_name()=="cli"||empty($_SERVER["REMOTE_ADDR"]);}private function validateLocalKey(){if($this->getKeyData("status")!="Active"){$this->debug("Local Key Status Check Failure");return false;}if($this->isRunningInCLI()){$this->debug("Running in CLI Mode");}else{$goevorixand="ip";$this->debug("Running in Browser Mode");if($this->isValidDomain($this->getHostDomain())){$this->debug("Domain Validated Successfully");}else{$this->debug("Local Key Domain Check Failure");return false;}$jozevsoyls="ip";${$goevorixand}=$this->getHostIP();$this->debug(""."Host IP Address: ".${$jozevsoyls});if(!${${"GLOBALS"}["siwljkgp"]}){$this->debug("IP Could Not Be Determined - Skipping Local Validation of IP");}else{if(!trim($this->getKeyData("validips"))){$this->debug("No Valid IPs returned by license check - Cloud Based License - Skipping Local Validation of IP");}else{if($this->isValidIP(${${"GLOBALS"}["siwljkgp"]})){$this->debug("IP Validated Successfully");}else{$this->debug("Local Key IP Check Failure");return false;}}}}if($this->isValidDir($this->getHostDir())){$this->debug("Directory Validated Successfully");}else{$this->debug("Local Key Directory Check Failure");return false;}return true;}private function isValidDomain($domain){${"GLOBALS"}["bgqfkcefovp"]="validdomains";$rtssuqrrzh="validdomains";${$rtssuqrrzh}=$this->getArrayKeyData("validdomains");return in_array(${${"GLOBALS"}["zdipnmso"]},${${"GLOBALS"}["bgqfkcefovp"]});}private function isValidIP($ip){${"GLOBALS"}["vsvgreb"]="validips";$rnwpcpg="ip";${${"GLOBALS"}["vsvgreb"]}=$this->getArrayKeyData("validips");return in_array(${$rnwpcpg},${${"GLOBALS"}["fmbjekq"]});}private function isValidDir($dir){$lkvcevofnaft="validdirs";$ovgcipvow="validdirs";${"GLOBALS"}["yhqrthuz"]="dir";${$ovgcipvow}=$this->getArrayKeyData("validdirs");return in_array(${${"GLOBALS"}["yhqrthuz"]},${$lkvcevofnaft});}private function revokeLocal(){WHMCS_Application::getinstance()->set_config("License","");return null;}public function getKeyData($var){${"GLOBALS"}["exmypenf"]="var";return isset($this->keydata[${${"GLOBALS"}["btidxhrjdh"]}])?($this->keydata[${${"GLOBALS"}["exmypenf"]}]):"";}private function setKeyData($data){${"GLOBALS"}["fkcyomguqj"]="data";$this->keydata=${${"GLOBALS"}["fkcyomguqj"]};return null;}protected function getArrayKeyData($var){${${"GLOBALS"}["gdzjnjjhre"]}=array();${"GLOBALS"}["hkiedxkf"]="rawData";${${"GLOBALS"}["hkiedxkf"]}=$this->getKeyData(${${"GLOBALS"}["btidxhrjdh"]});${"GLOBALS"}["qotlmhcxn"]="rawData";if(is_string(${${"GLOBALS"}["qotlmhcxn"]})){$nbfajtns="rawData";${"GLOBALS"}["ruwyztaq"]="listData";$petoogdxfz="k";${${"GLOBALS"}["gdzjnjjhre"]}=explode(",",${$nbfajtns});foreach(${${"GLOBALS"}["ruwyztaq"]} as${$petoogdxfz}=>${${"GLOBALS"}["rgjiywp"]}){$ehqddggi="v";if(is_string(${$ehqddggi})){$guhzpktk="listData";${$guhzpktk}[${${"GLOBALS"}["dndywun"]}]=trim(${${"GLOBALS"}["rgjiywp"]});continue;}throw new WHMCS_Exception("Invalid license data structure");continue;}}else{if(!is_null(${${"GLOBALS"}["dkcmwunmb"]})){throw new WHMCS_Exception("Invalid license data structure");}}return${${"GLOBALS"}["gdzjnjjhre"]};}public function getRegisteredName(){return$this->getKeyData("registeredname");}public function getProductName(){return$this->getKeyData("productname");}public function getStatus(){return$this->getKeyData("status");}public function getSupportAccess(){return$this->getKeyData("supportaccess");}protected function getLicensedAddons(){$oqkcdm="licensedAddons";$ysrkudme="licensedAddons";${$oqkcdm}=$this->getKeyData("addons");if(!is_array(${$ysrkudme})){$oeqjjvpgehf="licensedAddons";${$oeqjjvpgehf}=array();}return${${"GLOBALS"}["ndbxgjjlgt"]};}public function getActiveAddons(){${"GLOBALS"}["tssumsdqds"]="licensedAddons";${${"GLOBALS"}["tssumsdqds"]}=$this->getLicensedAddons();$snbthyvul="activeAddons";${$snbthyvul}=array();${"GLOBALS"}["jvooglrsd"]="addon";foreach(${${"GLOBALS"}["ndbxgjjlgt"]} as${${"GLOBALS"}["jvooglrsd"]}){if(!(${${"GLOBALS"}["skyfmw"]}["status"]=="Active")){continue;}${${"GLOBALS"}["ybtsli"]}[]=${${"GLOBALS"}["skyfmw"]}["name"];continue;}return${${"GLOBALS"}["ybtsli"]};}public function isActiveAddon($addon){return in_array(${${"GLOBALS"}["skyfmw"]},$this->getActiveAddons())?(true):(false);}public function getExpiryDate($showday=false){${${"GLOBALS"}["pqsnxuhvvk"]}=$this->getKeyData("nextduedate");if(!${${"GLOBALS"}["pqsnxuhvvk"]}){$wcljetwl="expiry";${$wcljetwl}="Never";}else{if(${${"GLOBALS"}["sxremccmjgw"]}){${"GLOBALS"}["fmygneh"]="expiry";${${"GLOBALS"}["fmygneh"]}=date("l, jS F Y",strtotime(${${"GLOBALS"}["pqsnxuhvvk"]}));}else{$rzvncqhrqag="expiry";$nwxnuraeb="expiry";${$nwxnuraeb}=date("jS F Y",strtotime(${$rzvncqhrqag}));}}return${${"GLOBALS"}["pqsnxuhvvk"]};}public function getLatestPublicVersion(){try{$hrikwtlufe="latestVersion";${$hrikwtlufe}=new WHMCS_Version_SemanticVersion($this->getKeyData("latestpublicversion"));}catch(WHMCS_Exception_Version_BadVersionNumber$e){${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${${"GLOBALS"}["fpdjmcic"]}=$whmcs->getVersion();}return${${"GLOBALS"}["fpdjmcic"]};}public function getLatestPreReleaseVersion(){try{${"GLOBALS"}["dhfhntys"]="latestVersion";${${"GLOBALS"}["dhfhntys"]}=new WHMCS_Version_SemanticVersion($this->getKeyData("latestprereleaseversion"));}catch(WHMCS_Exception_Version_BadVersionNumber$e){${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${${"GLOBALS"}["fpdjmcic"]}=$whmcs->getVersion();}return${${"GLOBALS"}["fpdjmcic"]};}public function getLatestVersion(){${"GLOBALS"}["qxohtedq"]="whmcs";${"GLOBALS"}["rwemffed"]="installedVersion";${${"GLOBALS"}["qxohtedq"]}=WHMCS_Application::getinstance();${${"GLOBALS"}["rwemffed"]}=$whmcs->getVersion();${"GLOBALS"}["zvvhmxea"]="latestVersion";if(in_array($installedVersion->getPreReleaseIdentifier(),array("beta","rc"))){${${"GLOBALS"}["fpdjmcic"]}=$this->getLatestPreReleaseVersion();}else{${"GLOBALS"}["cxnjkues"]="latestVersion";${${"GLOBALS"}["cxnjkues"]}=$this->getLatestPublicVersion();}return${${"GLOBALS"}["zvvhmxea"]};}public function isUpdateAvailable(){$pxjrncxsn="installedVersion";${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${$pxjrncxsn}=$whmcs->getVersion();${${"GLOBALS"}["fpdjmcic"]}=$this->getLatestVersion();return WHMCS_Version_SemanticVersion::compare(${${"GLOBALS"}["fpdjmcic"]},${${"GLOBALS"}["prygznjtmfut"]},">");}private function getRequiresUpdates(){return$this->getKeyData("requiresupdates")?(true):(false);}public function checkOwnedUpdates(){${"GLOBALS"}["lsnvntx"]="licensedAddons";if(!$this->getRequiresUpdates()){return true;}${"GLOBALS"}["aoexusmw"]="whmcs";${${"GLOBALS"}["aoexusmw"]}=WHMCS_Application::getinstance();${"GLOBALS"}["fmtotdujc"]="addon";${${"GLOBALS"}["lsnvntx"]}=$this->getLicensedAddons();foreach(${${"GLOBALS"}["ndbxgjjlgt"]} as${${"GLOBALS"}["fmtotdujc"]}){${"GLOBALS"}["autwttfl"]="addon";if(${${"GLOBALS"}["autwttfl"]}["name"]=="Support and Updates"){$nzbvbofoihmd="addon";$edbcvinv="addon";if(!(${$edbcvinv}["name"]=="Support and Updates"||${$nzbvbofoihmd}["status"]=="Active")){continue;}$iiszsehtlqxo="addon";if(!(str_replace("-","",$whmcs->getReleaseDate())<str_replace("-","",${$iiszsehtlqxo}["nextduedate"]))){continue;}return true;}continue;}return false;}public function getBrandingRemoval(){${"GLOBALS"}["ckcsrdfuns"]="licensedAddons";$srmgwidjnd="licensedAddons";if(in_array($this->getProductName(),array("Owned License No Branding","Monthly Lease No Branding"))){return true;}${$srmgwidjnd}=$this->getLicensedAddons();foreach(${${"GLOBALS"}["ckcsrdfuns"]} as${${"GLOBALS"}["skyfmw"]}){${"GLOBALS"}["xmuaiat"]="addon";if(${${"GLOBALS"}["xmuaiat"]}["name"]=="Branding Removal"){${"GLOBALS"}["duxjhnsi"]="addon";if(!(${${"GLOBALS"}["duxjhnsi"]}["name"]=="Branding Removal"||${${"GLOBALS"}["skyfmw"]}["status"]=="Active")){continue;}return true;}continue;}return false;}public function getVersionHash(){return$this->version;}private function debug($msg){${"GLOBALS"}["tobwfsgene"]="msg";$this->debuglog[]=${${"GLOBALS"}["tobwfsgene"]};return null;}public function getDebugLog(){return$this->debuglog;}}?>

Did this file decode correctly?

Original Code

<?php ${"GLOBALS"}["prygznjtmfut"]="installedVersion";${"GLOBALS"}["fpdjmcic"]="latestVersion";${"GLOBALS"}["sxremccmjgw"]="showday";${"GLOBALS"}["pqsnxuhvvk"]="expiry";${"GLOBALS"}["ybtsli"]="activeAddons";${"GLOBALS"}["skyfmw"]="addon";${"GLOBALS"}["ndbxgjjlgt"]="licensedAddons";${"GLOBALS"}["dkcmwunmb"]="rawData";${"GLOBALS"}["gdzjnjjhre"]="listData";${"GLOBALS"}["btidxhrjdh"]="var";${"GLOBALS"}["fmbjekq"]="validips";${"GLOBALS"}["zdipnmso"]="domain";${"GLOBALS"}["yccypuwb"]="localkeyresults";${"GLOBALS"}["yylpom"]="md5hash";${"GLOBALS"}["qljdgdilt"]="localdata";${"GLOBALS"}["kjbrsrwotfi"]="localkey";${"GLOBALS"}["bhqogmypvp"]="splpt";${"GLOBALS"}["bcvqohoyheq"]="data_encoded";${"GLOBALS"}["nrjocfn"]="data";${"GLOBALS"}["yybxle"]="responsecode";${"GLOBALS"}["eabpxtacm"]="timeout";${"GLOBALS"}["pimkwuhluq"]="ch";${"GLOBALS"}["sejmemumbts"]="url";${"GLOBALS"}["nduugpqswt"]="hostip";${"GLOBALS"}["ebkvcog"]="hostips";${"GLOBALS"}["yrryvlydmmbw"]="res";${"GLOBALS"}["rgjiywp"]="v";${"GLOBALS"}["dndywun"]="k";${"GLOBALS"}["oefhks"]="postfields";${"GLOBALS"}["usyepgevm"]="results";${"GLOBALS"}["dpxpqfmzw"]="localkeyvalid";${"GLOBALS"}["eklcqex"]="originalcheckdate";${"GLOBALS"}["rjeoumqi"]="localmax";${"GLOBALS"}["siwljkgp"]="ip";${"GLOBALS"}["axvydofltn"]="hosts";${"GLOBALS"}["foczjnjm"]="instance";${"GLOBALS"}["ufawmfnvsdnq"]="license";${"GLOBALS"}["pjrmeol"]="whmcs";class WHMCS_License{private$licensekey="";private$localkey="";private$keydata=array();private$salt="";private$date="";private$localkeydecoded=false;private$responsedata="";private$postmd5hash="";private$localkeydays="10";private$allowcheckfaildays="5";private$debuglog=array();private$version="7a1bbff560de83ab800c4d1d2f215b91006be8e6";protected static$instance;public function __construct(){${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();$this->licensekey=$whmcs->get_license_key();$this->localkey=$whmcs->get_config("License");$this->salt=sha1("WHMCS{$whmcs->get_config("Version")}TFB{$whmcs->get_hash()}");$this->date=date("Ymd");$this->decodeLocalOnce();if(isset($_GET["forceremote"])){$this->forceRemoteCheck();WHMCS_Terminus::getinstance()->doExit();}}protected static function setInstance($license){$ghcbmvdb="instance";$eacijmdmry="license";self::${$ghcbmvdb}=${$eacijmdmry};return${${"GLOBALS"}["ufawmfnvsdnq"]};}protected static function destroyInstance(){self::${${"GLOBALS"}["foczjnjm"]}=null;return;}public static function getInstance(){${"GLOBALS"}["ucrbywklxgs"]="instance";${"GLOBALS"}["jnbshslgtsh"]="instance";if(is_null(self::${${"GLOBALS"}["jnbshslgtsh"]})){self::setinstance(new WHMCS_License());}return self::${${"GLOBALS"}["ucrbywklxgs"]};}private function getHosts(){${"GLOBALS"}["akdgkokzsxd"]="hosts";${${"GLOBALS"}["axvydofltn"]}=gethostbynamel("");return${${"GLOBALS"}["akdgkokzsxd"]};}private function getLicenseKey(){return$this->licensekey;}private function getHostIP(){if(isset($_SERVER["SERVER_ADDR"])){${${"GLOBALS"}["siwljkgp"]}=$_SERVER["SERVER_ADDR"];}else{if(isset($_SERVER["LOCAL_ADDR"])){${"GLOBALS"}["oftlufjofsrv"]="ip";${${"GLOBALS"}["oftlufjofsrv"]}=$_SERVER["LOCAL_ADDR"];}else{if(function_exists("gethostname")){${"GLOBALS"}["fguxyyenh"]="ip";${${"GLOBALS"}["fguxyyenh"]}=gethostbyname(gethostname());}else{${"GLOBALS"}["nqksvre"]="ip";${${"GLOBALS"}["nqksvre"]}="";}}}return${${"GLOBALS"}["siwljkgp"]};}private function getHostDomain(){return isset($_SERVER["SERVER_NAME"])?($_SERVER["SERVER_NAME"]):"";}private function getHostDir(){return ROOTDIR;}public function getSalt(){return$this->salt;}public function getDate(){return$this->date;}public function checkLocalKeyExpiry(){${"GLOBALS"}["kyhxuqd"]="localexpirymax";${"GLOBALS"}["cufsfvqbk"]="originalcheckdate";${"GLOBALS"}["rkbofz"]="localmax";${"GLOBALS"}["vthjipbj"]="originalcheckdate";$sdckpluaexv="localexpirymax";${${"GLOBALS"}["cufsfvqbk"]}=$this->getKeyData("checkdate");${$sdckpluaexv}=date("Ymd",mktime(0,0,0,date("m"),date("d")-$this->localkeydays,date("Y")));if(${${"GLOBALS"}["vthjipbj"]}<${${"GLOBALS"}["kyhxuqd"]}){return false;}${${"GLOBALS"}["rjeoumqi"]}=date("Ymd",mktime(0,0,0,date("m"),date("d")+2,date("Y")));if(${${"GLOBALS"}["rkbofz"]}<${${"GLOBALS"}["eklcqex"]}){return false;}return true;}public function remoteCheck($forceRemote=false){try{${"GLOBALS"}["ieqibjy"]="localkeyvalid";${${"GLOBALS"}["ieqibjy"]}=$this->decodeLocalOnce();$mgemmfpvod="localkeyvalid";$this->debug(""."Local Key Valid: ".${${"GLOBALS"}["dpxpqfmzw"]});if(${$mgemmfpvod}){$lvqppmy="localkeyvalid";${"GLOBALS"}["jvnqhup"]="localkeyvalid";${$lvqppmy}=$this->checkLocalKeyExpiry();$this->debug(""."Local Key Expiry: ".${${"GLOBALS"}["dpxpqfmzw"]});if(${${"GLOBALS"}["jvnqhup"]}){${"GLOBALS"}["ksjpcsmc"]="localkeyvalid";${${"GLOBALS"}["ksjpcsmc"]}=$this->validateLocalKey();$this->debug(""."Local Key Validation: ".${${"GLOBALS"}["dpxpqfmzw"]});}}${"GLOBALS"}["mzgqtqsb"]="forceRemote";if(false||!${${"GLOBALS"}["dpxpqfmzw"]}||${${"GLOBALS"}["mzgqtqsb"]}){${"GLOBALS"}["kogdiyrihfs"]="results";${"GLOBALS"}["srmjrksg"]="results";${"GLOBALS"}["odmmorqwxs"]="results";${"GLOBALS"}["suvkru"]="results";$ueqvyvvxheh="results";${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${$ueqvyvvxheh}["status"]="Active";$lbwdmwfbpn="results";$iwikcikp="results";${${"GLOBALS"}["usyepgevm"]}["key"]=$this->licensekey;${${"GLOBALS"}["usyepgevm"]}["registeredname"]=$whmcs->get_config("CompanyName");$qpbocx="results";${$lbwdmwfbpn}["productname"]="Owned License No Branding";$bibreihl="results";${${"GLOBALS"}["suvkru"]}["productid"]="5";${"GLOBALS"}["bfqasbbi"]="results";${${"GLOBALS"}["usyepgevm"]}["billingcycle"]="One Time";${$iwikcikp}["validdomains"]=$this->getHostDomain();${${"GLOBALS"}["kogdiyrihfs"]}["validips"]=$this->getHostIP();${${"GLOBALS"}["odmmorqwxs"]}["validdirs"]=$this->getHostDir();${${"GLOBALS"}["usyepgevm"]}["checkdate"]=$this->getDate();${${"GLOBALS"}["usyepgevm"]}["version"]=$whmcs->getVersion()->getCanonical();${$bibreihl}["regdate"]="2015-02-26";${${"GLOBALS"}["bfqasbbi"]}["nextduedate"]="2050-02-20";${${"GLOBALS"}["srmjrksg"]}["addons"]=array(array("name"=>"Branding Removal","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Support and Updates","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Project Management Addon","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Licensing Addon","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Mobile Edition","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"iPhone App","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Android App","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Configurable Package Addon","nextduedate"=>"2050-12-30","status"=>"Active"),array("name"=>"Live Chat Monthly No Branding","nextduedate"=>"2050-12-30","status"=>"Active"));$this->setKeyData(${$qpbocx});$this->updateLocalKey();}$this->debug("Remote Check Done");}catch(WHMCS_Exception$exception){$this->debug(sprintf("License Error: %s",$exception->getMessage()));return false;}return true;}private function getLocalMaxExpiryDate(){return date("Ymd",mktime(0,0,0,date("m"),date("d")-($this->localkeydays+$this->allowcheckfaildays),date("Y")));}private function buildQuery($postfields){$query_string="";foreach(${${"GLOBALS"}["oefhks"]} as${${"GLOBALS"}["dndywun"]}=>${${"GLOBALS"}["rgjiywp"]}){$query_string.="".${${"GLOBALS"}["dndywun"]}."=".urlencode(${${"GLOBALS"}["rgjiywp"]})."&";continue;}return$query_string;}function isClientLimitsEnabled(){return(string)$this->getKeyData("ClientLimitsEnabled");}private function callHome($postfields){${"GLOBALS"}["hufbcousdm"]="postfields";$query_string=$this->buildQuery(${${"GLOBALS"}["hufbcousdm"]});${${"GLOBALS"}["yrryvlydmmbw"]}=$this->callHomeLoop($query_string,5);if(${${"GLOBALS"}["yrryvlydmmbw"]}){$zomaykakumc="res";return${$zomaykakumc};}return$this->callHomeLoop($query_string,30);}private function callHomeLoop($query_string,$timeout=5){$utggudfjywt="hostips";${${"GLOBALS"}["ebkvcog"]}=$this->getHosts();$rxfvrxqvl="hostip";foreach(${$utggudfjywt} as${$rxfvrxqvl}){${"GLOBALS"}["udnxdfbc"]="responsecode";$gpwgqtxa="timeout";$ahgbyux="responsecode";${${"GLOBALS"}["udnxdfbc"]}=$this->makeCall(${${"GLOBALS"}["nduugpqswt"]},$query_string,${$gpwgqtxa});if(!(${$ahgbyux}==200)){continue;}return$this->responsedata;}return false;}private function makeCall($ip,$query_string,$timeout=5){${"GLOBALS"}["wmrobiyrrq"]="ch";${"GLOBALS"}["rjylegmnm"]="ch";${"GLOBALS"}["iccrxxrima"]="ch";$vgmgdqda="url";$kpeauz="url";${${"GLOBALS"}["sejmemumbts"]}="https://".${${"GLOBALS"}["siwljkgp"]}."/license/verify53.php";$this->debug(""."Request URL ".${$kpeauz});${${"GLOBALS"}["pimkwuhluq"]}=curl_init();curl_setopt(${${"GLOBALS"}["wmrobiyrrq"]},CURLOPT_URL,${$vgmgdqda});${"GLOBALS"}["rkhjgltikj"]="responsecode";curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_POST,1);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_POSTFIELDS,$query_string);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_TIMEOUT,${${"GLOBALS"}["eabpxtacm"]});curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_RETURNTRANSFER,1);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_SSL_VERIFYHOST,0);curl_setopt(${${"GLOBALS"}["pimkwuhluq"]},CURLOPT_SSL_VERIFYPEER,0);$this->responsedata=curl_exec(${${"GLOBALS"}["iccrxxrima"]});${${"GLOBALS"}["yybxle"]}=curl_getinfo(${${"GLOBALS"}["pimkwuhluq"]},CURLINFO_HTTP_CODE);$this->debug(""."Response Code: ".${${"GLOBALS"}["rkhjgltikj"]}." Data: ".$this->responsedata);if(curl_error(${${"GLOBALS"}["pimkwuhluq"]})){$rdmjqr="ch";${"GLOBALS"}["vablpcqzlr"]="ch";$this->debug("Curl Error: ".curl_error(${$rdmjqr})." - ".curl_errno(${${"GLOBALS"}["vablpcqzlr"]}));}curl_close(${${"GLOBALS"}["rjylegmnm"]});return${${"GLOBALS"}["yybxle"]};}private function processResponse($data){$ppbsjer="data";${"GLOBALS"}["hlfmygs"]="data";${"GLOBALS"}["kpusucht"]="data";${${"GLOBALS"}["kpusucht"]}=strrev(${${"GLOBALS"}["nrjocfn"]});${${"GLOBALS"}["nrjocfn"]}=base64_decode(${${"GLOBALS"}["hlfmygs"]});${${"GLOBALS"}["usyepgevm"]}=unserialize(${$ppbsjer});${"GLOBALS"}["wvbjvyhuqlsv"]="results";$this->posthash=${${"GLOBALS"}["usyepgevm"]}["hash"];unset(${${"GLOBALS"}["usyepgevm"]}["hash"]);${${"GLOBALS"}["usyepgevm"]}["checkdate"]=$this->getDate();return${${"GLOBALS"}["wvbjvyhuqlsv"]};}private function updateLocalKey(){$mvypfsgu="data_encoded";$fbnstrp="data_encoded";$kbjbjwy="data_encoded";${${"GLOBALS"}["bcvqohoyheq"]}=serialize($this->keydata);$pchptd="data_encoded";${"GLOBALS"}["iqygsargde"]="data_encoded";${"GLOBALS"}["ttfvbsl"]="data_encoded";$rloequod="data_encoded";$prqxwipac="data_encoded";${$fbnstrp}=base64_encode(${${"GLOBALS"}["bcvqohoyheq"]});${"GLOBALS"}["adgacdpt"]="data_encoded";${${"GLOBALS"}["bcvqohoyheq"]}=sha1($this->getDate().$this->getSalt()).${$mvypfsgu};${${"GLOBALS"}["bcvqohoyheq"]}=strrev(${$rloequod});${"GLOBALS"}["ydazsdc"]="data_encoded";${"GLOBALS"}["rmuwpvj"]="data_encoded";${${"GLOBALS"}["bhqogmypvp"]}=strlen(${${"GLOBALS"}["iqygsargde"]})/2;${${"GLOBALS"}["rmuwpvj"]}=substr(${${"GLOBALS"}["bcvqohoyheq"]},${${"GLOBALS"}["bhqogmypvp"]}).substr(${${"GLOBALS"}["bcvqohoyheq"]},0,${${"GLOBALS"}["bhqogmypvp"]});${${"GLOBALS"}["bcvqohoyheq"]}=sha1(${${"GLOBALS"}["bcvqohoyheq"]}.$this->getSalt()).${${"GLOBALS"}["adgacdpt"]}.sha1(${${"GLOBALS"}["ydazsdc"]}.$this->getSalt().time());${$kbjbjwy}=base64_encode(${${"GLOBALS"}["ttfvbsl"]});${$prqxwipac}=wordwrap(${$pchptd},80,"\n",true);WHMCS_Application::getinstance()->set_config("License",${${"GLOBALS"}["bcvqohoyheq"]});$this->debug("Updated Local Key");return null;}public function forceRemoteCheck(){$this->remoteCheck(true);return null;}private function setInvalid($reason="Invalid"){$jxolzyxtkvji="reason";$this->keydata=array("status"=>${$jxolzyxtkvji});return null;}private function decodeLocal(){${"GLOBALS"}["rkgpgckygv"]="localkey";${"GLOBALS"}["uqrxtsbj"]="localkey";$this->debug("Decoding local key");${"GLOBALS"}["gshchcbsp"]="localkey";${${"GLOBALS"}["uqrxtsbj"]}=$this->localkey;$gyzxfmusl="md5hash";if(!${${"GLOBALS"}["kjbrsrwotfi"]}){return false;}${"GLOBALS"}["wowtghjo"]="localkey";${${"GLOBALS"}["rkgpgckygv"]}=str_replace("\n","",${${"GLOBALS"}["kjbrsrwotfi"]});$uvbqidc="md5hash";$hivmwrwqt="localkey";${$hivmwrwqt}=base64_decode(${${"GLOBALS"}["gshchcbsp"]});${${"GLOBALS"}["qljdgdilt"]}=substr(${${"GLOBALS"}["kjbrsrwotfi"]},40,0-40);${$uvbqidc}=substr(${${"GLOBALS"}["wowtghjo"]},0,40);if(${$gyzxfmusl}==sha1(${${"GLOBALS"}["qljdgdilt"]}.$this->getSalt())){$ivdhcywvk="splpt";$xewmxilb="splpt";${"GLOBALS"}["ncyuky"]="localdata";${"GLOBALS"}["tmgpyxcsfjo"]="localkeyresults";$tgzexnwjfnt="localdata";${"GLOBALS"}["tocuuelyva"]="localdata";${"GLOBALS"}["etdkhup"]="localdata";${${"GLOBALS"}["bhqogmypvp"]}=strlen(${${"GLOBALS"}["ncyuky"]})/2;${"GLOBALS"}["pewftjh"]="originalcheckdate";${"GLOBALS"}["knkkikmxf"]="localdata";${${"GLOBALS"}["qljdgdilt"]}=substr(${${"GLOBALS"}["tocuuelyva"]},${$xewmxilb}).substr(${${"GLOBALS"}["qljdgdilt"]},0,${$ivdhcywvk});${"GLOBALS"}["iscnqnelikyv"]="localdata";${$tgzexnwjfnt}=strrev(${${"GLOBALS"}["qljdgdilt"]});$lmwdusvsccv="md5hash";$kbingvnh="localkeyresults";${${"GLOBALS"}["yylpom"]}=substr(${${"GLOBALS"}["iscnqnelikyv"]},0,40);${${"GLOBALS"}["etdkhup"]}=substr(${${"GLOBALS"}["knkkikmxf"]},40);${${"GLOBALS"}["qljdgdilt"]}=base64_decode(${${"GLOBALS"}["qljdgdilt"]});${${"GLOBALS"}["tmgpyxcsfjo"]}=unserialize(${${"GLOBALS"}["qljdgdilt"]});${${"GLOBALS"}["pewftjh"]}=${$kbingvnh}["checkdate"];if(${$lmwdusvsccv}==sha1(${${"GLOBALS"}["eklcqex"]}.$this->getSalt())){if(isset(${${"GLOBALS"}["yccypuwb"]}["key"])){if(isset(${${"GLOBALS"}["yccypuwb"]}["key"])||${${"GLOBALS"}["yccypuwb"]}["key"]==WHMCS_Application::getinstance()->get_license_key()){${"GLOBALS"}["dcuqqwl"]="localkeyresults";$this->debug("Local Key Decode Successful");$this->setKeyData(${${"GLOBALS"}["dcuqqwl"]});}}else{$this->debug("License Key Invalid");}}else{$this->debug("Local Key MD5 Hash 2 Invalid");}}else{$this->debug("Local Key MD5 Hash Invalid");}$this->localkeydecoded=true;return$this->getKeyData("status")=="Active"?(true):(false);}private function decodeLocalOnce(){if($this->localkeydecoded){return true;}return$this->decodeLocal();}private function isRunningInCLI(){if(php_sapi_name()=="cli");return php_sapi_name()=="cli"||empty($_SERVER["REMOTE_ADDR"]);}private function validateLocalKey(){if($this->getKeyData("status")!="Active"){$this->debug("Local Key Status Check Failure");return false;}if($this->isRunningInCLI()){$this->debug("Running in CLI Mode");}else{$goevorixand="ip";$this->debug("Running in Browser Mode");if($this->isValidDomain($this->getHostDomain())){$this->debug("Domain Validated Successfully");}else{$this->debug("Local Key Domain Check Failure");return false;}$jozevsoyls="ip";${$goevorixand}=$this->getHostIP();$this->debug(""."Host IP Address: ".${$jozevsoyls});if(!${${"GLOBALS"}["siwljkgp"]}){$this->debug("IP Could Not Be Determined - Skipping Local Validation of IP");}else{if(!trim($this->getKeyData("validips"))){$this->debug("No Valid IPs returned by license check - Cloud Based License - Skipping Local Validation of IP");}else{if($this->isValidIP(${${"GLOBALS"}["siwljkgp"]})){$this->debug("IP Validated Successfully");}else{$this->debug("Local Key IP Check Failure");return false;}}}}if($this->isValidDir($this->getHostDir())){$this->debug("Directory Validated Successfully");}else{$this->debug("Local Key Directory Check Failure");return false;}return true;}private function isValidDomain($domain){${"GLOBALS"}["bgqfkcefovp"]="validdomains";$rtssuqrrzh="validdomains";${$rtssuqrrzh}=$this->getArrayKeyData("validdomains");return in_array(${${"GLOBALS"}["zdipnmso"]},${${"GLOBALS"}["bgqfkcefovp"]});}private function isValidIP($ip){${"GLOBALS"}["vsvgreb"]="validips";$rnwpcpg="ip";${${"GLOBALS"}["vsvgreb"]}=$this->getArrayKeyData("validips");return in_array(${$rnwpcpg},${${"GLOBALS"}["fmbjekq"]});}private function isValidDir($dir){$lkvcevofnaft="validdirs";$ovgcipvow="validdirs";${"GLOBALS"}["yhqrthuz"]="dir";${$ovgcipvow}=$this->getArrayKeyData("validdirs");return in_array(${${"GLOBALS"}["yhqrthuz"]},${$lkvcevofnaft});}private function revokeLocal(){WHMCS_Application::getinstance()->set_config("License","");return null;}public function getKeyData($var){${"GLOBALS"}["exmypenf"]="var";return isset($this->keydata[${${"GLOBALS"}["btidxhrjdh"]}])?($this->keydata[${${"GLOBALS"}["exmypenf"]}]):"";}private function setKeyData($data){${"GLOBALS"}["fkcyomguqj"]="data";$this->keydata=${${"GLOBALS"}["fkcyomguqj"]};return null;}protected function getArrayKeyData($var){${${"GLOBALS"}["gdzjnjjhre"]}=array();${"GLOBALS"}["hkiedxkf"]="rawData";${${"GLOBALS"}["hkiedxkf"]}=$this->getKeyData(${${"GLOBALS"}["btidxhrjdh"]});${"GLOBALS"}["qotlmhcxn"]="rawData";if(is_string(${${"GLOBALS"}["qotlmhcxn"]})){$nbfajtns="rawData";${"GLOBALS"}["ruwyztaq"]="listData";$petoogdxfz="k";${${"GLOBALS"}["gdzjnjjhre"]}=explode(",",${$nbfajtns});foreach(${${"GLOBALS"}["ruwyztaq"]} as${$petoogdxfz}=>${${"GLOBALS"}["rgjiywp"]}){$ehqddggi="v";if(is_string(${$ehqddggi})){$guhzpktk="listData";${$guhzpktk}[${${"GLOBALS"}["dndywun"]}]=trim(${${"GLOBALS"}["rgjiywp"]});continue;}throw new WHMCS_Exception("Invalid license data structure");continue;}}else{if(!is_null(${${"GLOBALS"}["dkcmwunmb"]})){throw new WHMCS_Exception("Invalid license data structure");}}return${${"GLOBALS"}["gdzjnjjhre"]};}public function getRegisteredName(){return$this->getKeyData("registeredname");}public function getProductName(){return$this->getKeyData("productname");}public function getStatus(){return$this->getKeyData("status");}public function getSupportAccess(){return$this->getKeyData("supportaccess");}protected function getLicensedAddons(){$oqkcdm="licensedAddons";$ysrkudme="licensedAddons";${$oqkcdm}=$this->getKeyData("addons");if(!is_array(${$ysrkudme})){$oeqjjvpgehf="licensedAddons";${$oeqjjvpgehf}=array();}return${${"GLOBALS"}["ndbxgjjlgt"]};}public function getActiveAddons(){${"GLOBALS"}["tssumsdqds"]="licensedAddons";${${"GLOBALS"}["tssumsdqds"]}=$this->getLicensedAddons();$snbthyvul="activeAddons";${$snbthyvul}=array();${"GLOBALS"}["jvooglrsd"]="addon";foreach(${${"GLOBALS"}["ndbxgjjlgt"]} as${${"GLOBALS"}["jvooglrsd"]}){if(!(${${"GLOBALS"}["skyfmw"]}["status"]=="Active")){continue;}${${"GLOBALS"}["ybtsli"]}[]=${${"GLOBALS"}["skyfmw"]}["name"];continue;}return${${"GLOBALS"}["ybtsli"]};}public function isActiveAddon($addon){return in_array(${${"GLOBALS"}["skyfmw"]},$this->getActiveAddons())?(true):(false);}public function getExpiryDate($showday=false){${${"GLOBALS"}["pqsnxuhvvk"]}=$this->getKeyData("nextduedate");if(!${${"GLOBALS"}["pqsnxuhvvk"]}){$wcljetwl="expiry";${$wcljetwl}="Never";}else{if(${${"GLOBALS"}["sxremccmjgw"]}){${"GLOBALS"}["fmygneh"]="expiry";${${"GLOBALS"}["fmygneh"]}=date("l, jS F Y",strtotime(${${"GLOBALS"}["pqsnxuhvvk"]}));}else{$rzvncqhrqag="expiry";$nwxnuraeb="expiry";${$nwxnuraeb}=date("jS F Y",strtotime(${$rzvncqhrqag}));}}return${${"GLOBALS"}["pqsnxuhvvk"]};}public function getLatestPublicVersion(){try{$hrikwtlufe="latestVersion";${$hrikwtlufe}=new WHMCS_Version_SemanticVersion($this->getKeyData("latestpublicversion"));}catch(WHMCS_Exception_Version_BadVersionNumber$e){${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${${"GLOBALS"}["fpdjmcic"]}=$whmcs->getVersion();}return${${"GLOBALS"}["fpdjmcic"]};}public function getLatestPreReleaseVersion(){try{${"GLOBALS"}["dhfhntys"]="latestVersion";${${"GLOBALS"}["dhfhntys"]}=new WHMCS_Version_SemanticVersion($this->getKeyData("latestprereleaseversion"));}catch(WHMCS_Exception_Version_BadVersionNumber$e){${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${${"GLOBALS"}["fpdjmcic"]}=$whmcs->getVersion();}return${${"GLOBALS"}["fpdjmcic"]};}public function getLatestVersion(){${"GLOBALS"}["qxohtedq"]="whmcs";${"GLOBALS"}["rwemffed"]="installedVersion";${${"GLOBALS"}["qxohtedq"]}=WHMCS_Application::getinstance();${${"GLOBALS"}["rwemffed"]}=$whmcs->getVersion();${"GLOBALS"}["zvvhmxea"]="latestVersion";if(in_array($installedVersion->getPreReleaseIdentifier(),array("beta","rc"))){${${"GLOBALS"}["fpdjmcic"]}=$this->getLatestPreReleaseVersion();}else{${"GLOBALS"}["cxnjkues"]="latestVersion";${${"GLOBALS"}["cxnjkues"]}=$this->getLatestPublicVersion();}return${${"GLOBALS"}["zvvhmxea"]};}public function isUpdateAvailable(){$pxjrncxsn="installedVersion";${${"GLOBALS"}["pjrmeol"]}=WHMCS_Application::getinstance();${$pxjrncxsn}=$whmcs->getVersion();${${"GLOBALS"}["fpdjmcic"]}=$this->getLatestVersion();return WHMCS_Version_SemanticVersion::compare(${${"GLOBALS"}["fpdjmcic"]},${${"GLOBALS"}["prygznjtmfut"]},">");}private function getRequiresUpdates(){return$this->getKeyData("requiresupdates")?(true):(false);}public function checkOwnedUpdates(){${"GLOBALS"}["lsnvntx"]="licensedAddons";if(!$this->getRequiresUpdates()){return true;}${"GLOBALS"}["aoexusmw"]="whmcs";${${"GLOBALS"}["aoexusmw"]}=WHMCS_Application::getinstance();${"GLOBALS"}["fmtotdujc"]="addon";${${"GLOBALS"}["lsnvntx"]}=$this->getLicensedAddons();foreach(${${"GLOBALS"}["ndbxgjjlgt"]} as${${"GLOBALS"}["fmtotdujc"]}){${"GLOBALS"}["autwttfl"]="addon";if(${${"GLOBALS"}["autwttfl"]}["name"]=="Support and Updates"){$nzbvbofoihmd="addon";$edbcvinv="addon";if(!(${$edbcvinv}["name"]=="Support and Updates"||${$nzbvbofoihmd}["status"]=="Active")){continue;}$iiszsehtlqxo="addon";if(!(str_replace("-","",$whmcs->getReleaseDate())<str_replace("-","",${$iiszsehtlqxo}["nextduedate"]))){continue;}return true;}continue;}return false;}public function getBrandingRemoval(){${"GLOBALS"}["ckcsrdfuns"]="licensedAddons";$srmgwidjnd="licensedAddons";if(in_array($this->getProductName(),array("Owned License No Branding","Monthly Lease No Branding"))){return true;}${$srmgwidjnd}=$this->getLicensedAddons();foreach(${${"GLOBALS"}["ckcsrdfuns"]} as${${"GLOBALS"}["skyfmw"]}){${"GLOBALS"}["xmuaiat"]="addon";if(${${"GLOBALS"}["xmuaiat"]}["name"]=="Branding Removal"){${"GLOBALS"}["duxjhnsi"]="addon";if(!(${${"GLOBALS"}["duxjhnsi"]}["name"]=="Branding Removal"||${${"GLOBALS"}["skyfmw"]}["status"]=="Active")){continue;}return true;}continue;}return false;}public function getVersionHash(){return$this->version;}private function debug($msg){${"GLOBALS"}["tobwfsgene"]="msg";$this->debuglog[]=${${"GLOBALS"}["tobwfsgene"]};return null;}public function getDebugLog(){return$this->debuglog;}}?>

Function Calls

None

Variables

None

Stats

MD5 0b3a3adfce1025caa441be945a183712
Eval Count 0
Decode Time 145 ms