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.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- try {
- function dummy_handler($errno, $errstr, $errfile, $errline)
- {
- }
- }
- catch (Exception $e) {
- }
- class ModelExtensionThemeFrame extends Model
- {
- public function getLicense()
- {
- $this->session->data['lic_err'] = '';
- $valid = false;
- set_error_handler('dummy_handler');
- try {
- $valid = $this->_getLicense();
- }
- catch (Exception $e) {
- }
- restore_error_handler();
- return $valid;
- }
- private function _getLicense($force_download = false)
- {
- $this->load->language('extension/theme/frame');
- $domain_check = parse_url(HTTP_SERVER);
- if (($domain_check['host'] != $_SERVER['HTTP_HOST']) || ($_SERVER['HTTP_HOST'] != getenv('HTTP_HOST'))) {
- $this->session->data['lic_err'] = sprintf($this->language->get('l_err_config'), $_SERVER['HTTP_HOST']);
- return false;
- }
- $files = glob(DIR_SYSTEM . 'license/frame.*.lic');
- $count_files = count($files);
- if (1 < $count_files) {
- $this->session->data['lic_err'] = sprintf($this->language->get('l_err_file_count'), DIR_SYSTEM);
- return false;
- }
- if (($files === false) || ($count_files == 0) || (strlen(file_get_contents($files[0])) == 0) || $force_download) {
- if (isset($files[0])) {
- $filename = $this->downloadLicense($files[0]);
- }
- else {
- $filename = $this->downloadLicense();
- }
- if (!$filename) {
- return false;
- }
- }
- else {
- $filename = $files[0];
- }
- $licence = file_get_contents($filename);
- $md5 = md5_file(DIR_SYSTEM . '../config.php');
- $host = preg_replace('#^www\\.(.+)#i', '$1', $_SERVER['HTTP_HOST']);
- $priv_key = 'fa1a7b1fa1825378299b3141cdea3a4a';
- $valid = hash('sha256', $host . '.' . $md5 . '.' . $priv_key) === $licence;
- if (!$valid) {
- if ($force_download === false) {
- $this->session->data['lic_err'] = '';
- $valid = $this->_getLicense(true);
- }
- else {
- $this->session->data['lic_err'] = sprintf($this->language->get('l_err_domain'), $_SERVER['HTTP_HOST']);
- }
- }
- return $valid;
- }
- private function downloadLicense($filename = false)
- {
- $this->load->language('extension/theme/frame');
- .................................................................................
- ....................................................
- ............................
Add Comment
Please, Sign In to add comment