Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class llicense
  15. {
  16. public $errors = [];
  17. private $api_url = 'https://dmncms.net/applications/nexus/interface/licenses/?';
  18. private $endpoint = 'activate';
  19. private $host = 'dmncms.net';
  20. private $debug = 0;
  21. private $request_value = [];
  22. public $response = false;
  23. public $validation_error;
  24. private $license_key_file = 'license.txt';
  25. private $license_data = [];
  26. private $new_license_data;
  27. private $iv_size;
  28. private $securekey;
  29. private $local_license_data = [];
  30. public $secret;
  31. public $access_details = [];
  32. 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.'];
  33. 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'];
  34. private $user_agent = 'ApiQuery-Bot v1.0';
  35.  
  36. public function __construct()
  37. {
  38. if (!extension_loaded('mcrypt')) {
  39. throw new Exception('Please enable mcrypt extension in your php settings.');
  40. }
  41. }
  42.  
  43. public function check_license()
  44. {
  45. $this->check_license_file();
  46.  
  47. if ($this->license_data[0]['activated'] == 0) {
  48. $this->activation_form();
  49. }
  50. else if (empty($this->license_data[0]['license'])) {
  51. if (!isset($_POST['submit_license'])) {
  52. $this->errors[] = 'The local license data is empty please contact DmNMuCMS Support.';
  53. }
  54.  
  55. $this->activation_form();
  56. }
  57. else {
  58. $this->license_data[5] = explode('[DmN]', $this->decrypt());
  59.  
  60. if (1 < count($this->license_data[5])) {
  61. if ($this->license_data[5][3] != 'ACTIVE') {
  62. $this->check_license_data($this->license_data[5][0], $this->license_data[5][1], $this->license_data[5][2]);
  63.  
  64. if ($this->check_response()) {
  65. $this->generate_license_data();
  66.  
  67. if ($this->write_license()) {
  68. return true;
  69. }
  70. else {
  71. $this->validation_error = $this->errors[0];
  72. writelog($this->validation_error, 'license');
  73. }
  74. }
  75. }
  76. else {
  77. return true;
  78. }
  79. }
  80. else if (('1.1.4.1' < $this->license_data[0]['version']) || ($this->license_data[0]['version'] < '1.1.5')) {
  81. @unlink(BASEDIR . $this->license_key_file);
  82. $this->check_license_file('1.1.4.1');
  83. $this->activation_form();
  84. }
  85. }
  86.  
  87. return false;
  88. }
  89.  
  90. public function validate()
  91. {
  92. $this->check_license_file();
  93. $this->license_data[5] = explode('[DmN]', $this->decrypt());
  94.  
  95. if (1 < count($this->license_data[5])) {
  96. $this->check_license_data($this->license_data[5][0], $this->license_data[5][1], $this->license_data[5][2]);
  97.  
  98. if (!$this->check_response()) {
  99. $this->license_data[5][3] = 'INVALID';
  100. $this->response['license'] = $this->encrypt(implode('[DmN]', $this->license_data[5]));
  101. $this->response['license'] = substr($this->response['license'], 0, 80) . $this->secret . substr($this->response['license'], 80);
  102. $this->generate_license_data();
  103.  
  104. if ($this->write_license()) {
  105. $this->validation_error = 'Invalid license';
  106. writelog($this->validation_error, 'license');
  107. }
  108. else {
  109. $this->validation_error = $this->errors[0];
  110. writelog($this->validation_error, 'license');
  111. }
  112. }
  113. else {
  114. $this->generate_license_data();
  115.  
  116. if ($this->write_license()) {
  117. return true;
  118. }
  119. else {
  120. $this->validation_error = $this->errors[0];
  121. writelog($this->validation_error, 'license');
  122. .................................................................................
  123. ..........................................
  124. ..................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement