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
- *
- */
- namespace Mofsy\License\Client;
- class Protect
- {
- public $status = false;
- public $errors = false;
- public $activation_key = '';
- public $activation_key_expires;
- /**
- * Секретный локальный ключ
- *
- * @var string
- */
- public $secret_key = '784dyaretqw777';
- /**
- * Полный адрес сервера, для проверки лицензии и выпуска новой.
- *
- * @var string
- */
- public $server = '';
- /**
- * Удаленный порт сервера лицензий
- *
- * @var integer
- */
- public $remote_port = 80;
- /**
- * Период ожидания ответа от сервера лицензий
- *
- * @var integer
- */
- public $remote_timeout = 20;
- /**
- * User-agent клиента, который
- * посылается вместе с запросом на сервер лицензий
- *
- * @var string
- */
- public $local_ua = 'PHP code protect';
- /**
- * Маркер использования на локальной системе с Windows без активации
- *
- * @var boolean
- */
- public $use_localhost = true;
- /**
- * Разрешить использовать текущую версию скрипта после истечении срока лицензии
- *
- * NOTE: Если истина, то лицензия будет продолжать работать, даже после истечения срока действия ключа активации.
- * Лицензия будет работать, только на старых релизах скрипта, на новой версии активация уже будет не действительна.
- *
- * @var boolean
- */
- public $use_expires = true;
- /**
- * Маркер режима хранения ключа
- *
- * filesystem - хранить в файле
- * TODO: добавить хранение ключа в базе данных и т.д.
- *
- * @var string
- */
- public $local_key_storage = 'filesystem';
- /**
- * Полный путь до локального файла с временной лицензией
- *
- * @var string
- */
- public $local_key_path = './';
- /**
- * Название файла с временной лицензией
- *
- * @var string
- */
- public $local_key_name = 'license.lic';
- /**
- * Сортировка методов запроса к серверу лицензий.
- *
- * Доступны:
- * s - на сокетах
- * c - на cURL
- * f - на file_get_contents
- *
- * @var string
- */
- public $local_key_transport_order = 'scf';
- /**
- * Период после истечения времени действия локального ключа, после которого лицензия дополнительно дейтвует по
- * времени.
- *
- * @var integer
- */
- public $local_key_delay_period = 7;
- /**
- * Новый локальный ключ
- *
- * @var integer
- */
- public $local_key_last;
- /**
- * Дата релиза скрипта в формате ISO 8601 (YYYY-MM-DD)
- *
- * @var string
- */
- public $release_date = '2019-03-01';
- /**
- * Имя (логин, например на сайте автора) на кого выдана лицензия
- *
- * @var string
- */
- public $user_name = '';
- /**
- * Локализация статусов лицензии и других сообщений
- *
- * @var array
- */
- public $status_messages = ['status_1' => 'This activation key is active.', 'status_2' => 'Error: This activation key has expired.', 'status_3' => 'Activation key republished. Awaiting reactivation.', 'status_4' => 'Error: This activation key has been suspended.', 'localhost' => 'This activation key is active (localhost).', 'pending' => 'Error: This activation key is pending review.', 'download_access_expired' => 'Error: This version of the software was released after your download access expired. Please downgrade software or contact support for more information.', 'missing_activation_key' => 'Error: The activation key variable is empty.', 'could_not_obtain_local_key' => 'Error: I could not obtain a new local key.', 'maximum_delay_period_expired' => 'Error: The maximum local key delay period has expired.', 'local_key_tampering' => 'Error: The local key has been tampered with or is invalid.', 'local_key_invalid_for_location' => 'Error: The local key is invalid for this location.', 'missing_license_file' => 'Error: Please create the following file (and directories if they dont exist already): ', 'license_file_not_writable' => 'Error: Please make the following path writable: ', 'invalid_local_key_storage' => 'Error: I could not determine the local key storage on clear.', 'could_not_save_local_key' => 'Error: I could not save the local key.', 'activation_key_string_mismatch' => 'Error: The local key is invalid for this activation key.'];
- /**
- * Маркер не удачного получения нового локального ключа с сервера
- */
- private $trigger_delay_period;
- /**
- * Конструктор класса
- */
- public function __construct()
- {
- }
- /**
- * Валидация
- *
- * @return string
- */
- public function validate()
- {
- if ($this->use_localhost && $this->getIpLocal() && $this->isWindows() && !file_exists($this->local_key_path . $this->local_key_name)) {
- $this->status = true;
- return $this->errors = $this->status_messages['localhost'];
- }
- if (!$this->activation_key) {
- return $this->errors = $this->status_messages['missing_activation_key'];
- }
- switch ($this->local_key_storage) {
- case 'filesystem':
- $local_key = $this->readLocalKey();
- .........................................................................
- ...............................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement