Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.8.0
- * @ Author : DeZender
- * @ Release on : 25.09.2017
- * @ Official site : http://DeZender.Net
- *
- */
- class checklicense
- {
- protected $cl_license_server = null;
- protected $cl_ip_address = null;
- protected $cl_product_key = null;
- protected $cl_license_array = null;
- protected $cl_cache_time = null;
- protected $cl_cache_file = null;
- public function __construct($license_server, $cache_time)
- {
- $this->cl_ip_address = getenv( 'HTTP_HOST' );
- $this->cl_product_key = NULL;
- $this->cl_license_server = $license_server;
- $this->cl_cache_time = $cache_time;
- $this->cl_cache_file = 'cache/' . md5( $this->cl_license_server . $this->cl_ip_address ) . '.cache';
- $this->_check_ip_address( );
- $this->_create_product_key( );
- if ($this->_is_available_cache( ) != true) {
- $this->_write_cache( $this->cl_cache_file, $this->_get_license_file( ) );
- $this->_check_license( $this->_read_cache( $this->cl_cache_file ) );
- }
- else {
- $this->_check_license( $this->_read_cache( $this->cl_cache_file ) );
- }
- }
- protected function _check_ip_address()
- {
- if (!(is_numeric( substr( $this->cl_ip_address, 0, 3 ) ))) {
- if (substr( $this->cl_ip_address, 0, 4 ) == 'www.') {
- $this->cl_ip_address = substr( $this->cl_ip_address, 4 );
- }
- }
- }
- protected function _create_product_key()
- {
- $this->cl_product_key = wordwrap( strtoupper( md5( sha1( sha1( $this->cl_ip_address ) ) ) ), 4, '-', true );
- }
- protected function _check_license(array $data)
- {
- if (!(in_array( $this->cl_product_key, $data ))) {
- exit( );
- }
- }
- protected function _get_license_file()
- {
- if (function_exists( 'file' )) {
- $file = file( $this->cl_license_server, FILE_IGNORE_NEW_LINES );
- $data = array( );
- foreach ($file as $key => $value) {
- $data[$key] = rtrim( $value, '\\r\\n' );
- }
- return $data;
- }
- }
- protected function _is_available_cache()
- {
- if (!(file_exists( 'cache' ))) {
- ....................................................................
- ....................................
- .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement