Advertisement
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 : 4.0.9.0
- * @ Author : DeZender
- * @ Release on : 08.08.2019
- * @ Official site : http://DeZender.Net
- *
- */
- class llicense
- {
- public $errors = [];
- private $api_url = 'https://dmncms.net/applications/nexus/interface/licenses/?';
- private $endpoint = 'activate';
- private $host = 'dmncms.net';
- private $debug = 0;
- private $request_value = [];
- public $response = false;
- public $validation_error;
- private $license_key_file = 'license.txt';
- private $license_data = [];
- private $new_license_data;
- private $iv_size;
- private $securekey;
- private $local_license_data = [];
- public $secret;
- public $access_details = [];
- public $activation_faults = [101 => 'The key or email provided does not exist.', 102 => 'The key provided is has been deactivated.', 103 => 'The purchase the key is associated with has been cancelled.', 104 => 'The purchase the key is associated with has expired.', 201 => 'The key has already been activated the maximum number of times and cannot be activated again. Please contact support <a href="http://dmncms.net/support/create/" target="_blank">here</a>.', 202 => 'setEmail was TRUE, but the key already has an email.', 203 => 'The email provided was incorrect.'];
- private $check_faults = [0 => 'Bad request.', 101 => 'The key or email provided does not exist.', 301 => 'The email provided was incorrect.', 302 => 'You did not provide a usage ID.', 303 => 'The usage ID provided was invalid.', 304 => 'The request was received by a different IP address to the IP address that sent the "activate" API call.', 305 => 'The local license key is invalid for this domain.', 306 => 'The local license key is invalid for this directory'];
- private $user_agent = 'ApiQuery-Bot v1.0';
- public function __construct()
- {
- if (!extension_loaded('mcrypt')) {
- throw new Exception('Please enable mcrypt extension in your php settings.');
- }
- }
- public function check_license()
- {
- $this->check_license_file();
- if ($this->license_data[0]['activated'] == 0) {
- $this->activation_form();
- }
- else if (empty($this->license_data[0]['license'])) {
- if (!isset($_POST['submit_license'])) {
- $this->errors[] = 'The local license data is empty please contact DmNMuCMS Support.';
- }
- $this->activation_form();
- }
- else {
- $this->license_data[5] = explode('[DmN]', $this->decrypt());
- if (1 < count($this->license_data[5])) {
- if ($this->license_data[5][3] != 'ACTIVE') {
- $this->check_license_data($this->license_data[5][0], $this->license_data[5][1], $this->license_data[5][2]);
- if ($this->check_response()) {
- $this->generate_license_data();
- if ($this->write_license()) {
- return true;
- }
- else {
- $this->validation_error = $this->errors[0];
- writelog($this->validation_error, 'license');
- }
- }
- }
- else {
- return true;
- }
- }
- else if (('1.1.4.1' < $this->license_data[0]['version']) || ($this->license_data[0]['version'] < '1.1.5')) {
- @unlink(BASEDIR . $this->license_key_file);
- $this->check_license_file('1.1.4.1');
- $this->activation_form();
- }
- }
- return false;
- }
- public function validate()
- {
- $this->check_license_file();
- $this->license_data[5] = explode('[DmN]', $this->decrypt());
- if (1 < count($this->license_data[5])) {
- $this->check_license_data($this->license_data[5][0], $this->license_data[5][1], $this->license_data[5][2]);
- if (!$this->check_response()) {
- $this->license_data[5][3] = 'INVALID';
- $this->response['license'] = $this->encrypt(implode('[DmN]', $this->license_data[5]));
- $this->response['license'] = substr($this->response['license'], 0, 80) . $this->secret . substr($this->response['license'], 80);
- $this->generate_license_data();
- if ($this->write_license()) {
- $this->validation_error = 'Invalid license';
- writelog($this->validation_error, 'license');
- }
- else {
- $this->validation_error = $this->errors[0];
- writelog($this->validation_error, 'license');
- }
- }
- else {
- $this->generate_license_data();
- if ($this->write_license()) {
- return true;
- }
- else {
- $this->validation_error = $this->errors[0];
- writelog($this->validation_error, 'license');
- .................................................................................
- ..........................................
- ..................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement