Guest User

Untitled

a guest
Sep 13th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.41 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class AlekseyNewstore
  15. {
  16. public $aleksey_20 = false;
  17. public $aleksey_40 = false;
  18. public $aleksey_34 = '';
  19. public $activation_key_expires = null;
  20. public $secret_key = 'Y58BnYSeAR8r4FMBaYIButK4';
  21. public $secret_key_dec = 'Y58BnYSeAR8r4FMBaYIButK4';
  22. public $aleksey_6 = 'http://validator.waterfilter.in.ua/api.php';
  23. public $remote_port = 80;
  24. public $remote_timeout = 20;
  25. public $local_ua = 'PHP code protect';
  26. public $aleksey_18 = false;
  27. public $use_expires = false;
  28. public $local_key_storage = 'filesystem';
  29. public $aleksey_5 = './';
  30. public $aleksey_24 = 'newstore.php';
  31. public $local_key_transport_order = 'scf';
  32. public $local_key_delay_period = 1;
  33. public $local_key_last = null;
  34. public $release_date = '2016-11-18';
  35. public $user_name = '';
  36. public $status_messages = array('status_1' => '<span style="color:green;">Лицензия Активна. Спасибо! / License activity. Thank you!</span>', 'status_2' => 'Срок закончился. / The term ended.', 'status_3' => 'Ожидает повторной активации. / Pending re-activation.', 'status_4' => 'License suspended.', 'localhost' => 'Активна на компе / Is active on a computer', 'pending' => 'Ожидает активации. / Awaiting activation', 'download_access_expired' => 'Неверный ключ / Invalid key', 'missing_activation_key' => 'Укажите ключ. / Enter key.', 'could_not_obtain_local_key' => 'Невозможно получить ключ. / Unable to get the key.', 'maximum_delay_period_expired' => 'Ключ истек. / The key has expired.', 'local_key_tampering' => 'Ключ не действителен. / The key is not valid.', 'local_key_invalid_for_location' => 'Неверный ключ / Invalid key', 'missing_license_file' => 'Создайте файл и папки / Create files and folders:<br />', 'license_file_not_writable' => 'Сделайте права для записи 777 / Make the right to record 777<br />', 'invalid_local_key_storage' => 'не могу удалить я ключ, попросите автора модуля(шаблона) / I can not remove the key, ask the author of the module (template)', 'could_not_save_local_key' => 'ключ на могу записать, проверьте права на файл', 'activation_key_string_mismatch' => 'Неверный ключ / Invalid key');
  37. private $trigger_delay_period = null;
  38.  
  39. public function __construct()
  40. {
  41. }
  42.  
  43. public function aleksey_38()
  44. {
  45. if ($this->aleksey_18 && $this->aleksey_39() && $this->isWindows() && !file_exists((string) $this->aleksey_5 . $this->aleksey_24)) {
  46. $this->aleksey_20 = true;
  47.  
  48. return $this->aleksey_40 = $this->status_messages['localhost'];
  49. }
  50.  
  51. if (!$this->aleksey_34) {
  52. return $this->aleksey_40 = $this->status_messages['missing_activation_key'];
  53. }
  54.  
  55. switch ($this->local_key_storage) {
  56. case 'filesystem':
  57. $local_key = $this->readLocalKey();
  58.  
  59. break;
  60.  
  61. default:
  62. return $this->aleksey_40 = $this->status_messages['missing_activation_key'];
  63. }
  64. $this->trigger_delay_period = $this->status_messages['could_not_obtain_local_key'];
  65.  
  66. if ($this->aleksey_40 == $this->trigger_delay_period && $this->local_key_delay_period) {
  67. $delay = $this->processDelayPeriod($this->local_key_last);
  68.  
  69. if ($delay['write'] && $this->local_key_storage == 'filesystem') {
  70. $this->writeLocalKey($delay['local_key'], (string) $this->aleksey_5 . $this->aleksey_24);
  71. }
  72.  
  73. if ($delay['errors']) {
  74. return $this->aleksey_40 = $delay['errors'];
  75. }
  76.  
  77. $this->aleksey_40 = false;
  78.  
  79. return $this;
  80. }
  81.  
  82. if ($this->aleksey_40) {
  83. return $this->aleksey_40;
  84. }
  85.  
  86. return $this->validateLocalKey($local_key);
  87. }
  88.  
  89. private function calcMaxDelay($local_key_expires, $delay)
  90. {
  91. return (int) $local_key_expires + (int) $delay * 86400;
  92. }
  93.  
  94. private function processDelayPeriod($local_key)
  95. {
  96. $cipher = 'AES-256-CBC';
  97. $iv = substr(hash('sha256', $this->secret_key_dec), 0, 16);
  98. $local_key = openssl_decrypt(base64_decode($local_key), $cipher, $this->secret_key_dec, 0, $iv);
  99. $local_key_src = $this->decodeLocalKey($local_key);
  100. $parts = $this->splitLocalKey($local_key_src);
  101. $key_data = unserialize($parts[0]);
  102. $local_key_expires = (int) $key_data['local_key_expires'];
  103. unset($parts, $key_data);
  104.  
  105. $write_new_key = false;
  106. $parts = explode("\n\n", $local_key);
  107. $local_key = $parts[0];
  108.  
  109. foreach ($local_key_delay_period = explode(',', $this->local_key_delay_period) as $key => $delay) {
  110. if (!$key) {
  111. $local_key .= "\n";
  112. }
  113.  
  114. if (time() < $this->calcMaxDelay($local_key_expires, $delay)) {
  115. continue;
  116. }
  117.  
  118. $local_key .= "\n" . $delay;
  119. $write_new_key = true;
  120. }
  121.  
  122. if ($this->calcMaxDelay($local_key_expires, array_pop($local_key_delay_period)) < time()) {
  123. return array('write' => false, 'local_key' => '', 'errors' => $this->status_messages['maximum_delay_period_expired']);
  124. }
  125.  
  126. return array('write' => $write_new_key, 'local_key' => $local_key, 'errors' => false);
  127. }
  128.  
  129. private function inDelayPeriod($local_key, $local_key_expires)
  130. {
  131. $delay = $this->splitLocalKey($local_key, "\n\n");
  132.  
  133. if (!isset($delay[1])) {
  134. return -1;
  135. }
  136.  
  137. return (int) ($this->calcMaxDelay($local_key_expires, array_pop(explode("\n", $delay[1]))) - time());
  138. }
  139.  
  140. private function decodeLocalKey($local_key)
  141. {
  142. return base64_decode(str_replace("\n", '', urldecode($local_key)));
  143. }
  144.  
  145. private function splitLocalKey($local_key, $token = '{protect}')
  146. {
  147. return explode($token, $local_key);
  148. }
  149.  
  150. private function validateAccess($key, $valid_accesses)
  151. {
  152. return in_array($key, (array) $valid_accesses);
  153. }
  154.  
  155. private function wildcardIp($key)
  156. {
  157. $octets = explode('.', $key);
  158. array_pop($octets);
  159. $ip_range[] = implode('.', $octets) . '.*';
  160. array_pop($octets);
  161. $ip_range[] = implode('.', $octets) . '.*';
  162. array_pop($octets);
  163. $ip_range[] = implode('.', $octets) . '.*';
  164.  
  165. return $ip_range;
  166. }
  167.  
  168. private function wildcardServerHostname($key)
  169. {
  170. $hostname = explode('.', $key);
  171. .................................................................
  172. ...................................
  173. ...............
Advertisement
Add Comment
Please, Sign In to add comment