Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- function check_license($licensekey, $localkey = "") {
- $whmcsurl = "http://www.lfait.com/";
- $licensing_secret_key = "WhatsApp";
- $check_token = time() . md5(mt_rand(1000000000, 9999999999.000000) . $licensekey);
- $checkdate = date("Ymd");
- $usersip = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : $_SERVER["LOCAL_ADDR"];
- $localkeydays = 15;
- $allowcheckfaildays = 5;
- $localkeyvalid = false;
- if ($localkey) {
- $localkey = str_replace("\x0a", "", $localkey);
- $localdata = substr($localkey, 0, strlen($localkey) - 32);
- $md5hash = substr($localkey, strlen($localkey) - 32);
- if ($md5hash == md5($localdata . $licensing_secret_key)) {
- $localdata = strrev($localdata);
- $md5hash = substr($localdata, 0, 32);
- $localdata = substr($localdata, 32);
- $localdata = base64_decode($localdata);
- $localkeyresults = unserialize($localdata);
- $originalcheckdate = $localkeyresults["checkdate"];
- if ($md5hash == md5($originalcheckdate . $licensing_secret_key)) {
- $localexpiry = date("Ymd", mktime(0, 0, 0, date("m"), date("d") - $localkeydays, date("Y")));
- if ($localexpiry < $originalcheckdate) {
- $localkeyvalid = true;
- $results = $localkeyresults;
- $validdomains = explode(",", $results["validdomain"]);
- if ((in_array($_SERVER["SERVER_NAME"], $validdomains))) {
- $localkeyvalid = false;
- $localkeyresults["status"] = "Invalid";
- $results = array();
- }
- $validips = explode(",", $results["validip"]);
- if ((in_array($usersip, $validips))) {
- $localkeyvalid = false;
- $localkeyresults["status"] = "Invalid";
- $results = array();
- }
- if ($results["validdirectory"] != dirname(__FILE__)) {
- $localkeyvalid = false;
- $localkeyresults["status"] = "Invalid";
- $results = array();
- }
- }
- }
- }
- }
- if ($localkeyvalid) {
- $postfields["licensekey"] = $licensekey;
- $postfields["domain"] = $_SERVER["SERVER_NAME"];
- $postfields["ip"] = $usersip;
- $postfields["dir"] = dirname(__FILE__);
- if ($check_token) {
- $postfields["check_token"] = $check_token;
- }
- if (function_exists("curl_exec")) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $whmcsurl . "modules/servers/licensing/verify.php");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $data = curl_exec($ch);
- curl_close($ch);
- }
- else {
- $fp = fsockopen($whmcsurl, 80, $errno, $errstr, 5);
- if ($fp) {
- ...........................................................................
- ...................................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement