Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 5.0.1.0
- * @ Author : DeZender
- * @ Release on : 22.04.2022
- * @ Official site : http://DeZender.Net
- *
- */
- function tickets_credentials_check_license($licensekey, $localkey = '', $vars)
- {
- $whmcsurl = 'https://www.dev.gb.net/clients/';
- $licensing_secret_key = ',iX\\@9|d.6XQz{C';
- $localkeydays = 14;
- $allowcheckfaildays = 5;
- if ($licensekey) {
- $lce = explode('-', $licensekey);
- if (($lce[1] == 'FreePlus') || ($lce[1] == 'Free')) {
- $licensing_secret_key = '87C84K\\y\\6788OS';
- }
- }
- $check_token = time() . md5(mt_rand(1000000000, 9999999999.0) . $licensekey);
- $checkdate = date('Ymd');
- $domain = $_SERVER['SERVER_NAME'];
- $usersip = (isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR']);
- $dirpath = dirname(__FILE__);
- $verifyfilepath = 'modules/servers/licensing/verify.php';
- $localkeyvalid = false;
- if ($localkey) {
- $localkey = str_replace("\n", '', $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 = [];
- }
- $validips = explode(',', $results['validip']);
- if (!in_array($usersip, $validips)) {
- $localkeyvalid = false;
- $localkeyresults['status'] = 'Invalid';
- $results = [];
- }
- $validdirs = explode(',', $results['validdirectory']);
- if (!in_array($dirpath, $validdirs)) {
- $localkeyvalid = false;
- $localkeyresults['status'] = 'Invalid';
- $results = [];
- }
- }
- }
- }
- }
- if (!$localkeyvalid) {
- $responseCode = 0;
- $postfields = ['licensekey' => $licensekey, 'domain' => $domain, 'ip' => $usersip, 'dir' => $dirpath];
- if ($check_token) {
- $postfields['check_token'] = $check_token;
- }
- $query_string = '';
- foreach ($postfields as $k => $v) {
- $query_string .= $k . '=' . urlencode($v) . '&';
- }
- if (function_exists('curl_exec')) {
- $htaccess_username = 'module';
- $htaccess_password = 'NI52aYIHagaKV9mS';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $whmcsurl . $verifyfilepath);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_USERPWD, $htaccess_username . ':' . $htaccess_password);
- $data = curl_exec($ch);
- $responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- }
- else {
- $responseCodePattern = '/^HTTP\\/\\d+\\.\\d+\\s+(\\d+)/';
- $fp = @fsockopen($whmcsurl, 80, $errno, $errstr, 5);
- if ($fp) {
- $newlinefeed = "\r\n";
- $header = 'POST ' . $whmcsurl . $verifyfilepath . ' HTTP/1.0' . $newlinefeed;
- .................................................................
- ....................................
- ...............
Add Comment
Please, Sign In to add comment