Advertisement
Guest User

Untitled

a guest
Jun 15th, 2018
906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 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.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class install_auth
  15. {
  16. public $license_key = null;
  17. public $remote_auth = null;
  18. public $folder = null;
  19. public $domain = null;
  20. public $ipaddress = null;
  21. public $key_location = null;
  22. public $key_age = null;
  23. public $key_max = null;
  24. public $now = null;
  25. public $home_url_site = 'www.vldpersonals.com';
  26. public $home_url_path = '/webscr/verify.php';
  27. public $key_data = null;
  28. public $result = null;
  29. public $errmsg = '';
  30.  
  31. public function __construct($license_key, $remote_auth, $key_location = 'key.php', $stoponerror = 1, $key_age = 15, $key_max = 5)
  32. {
  33. $this->folder = str_replace( '\\', '/', dirname( realpath( __FILE__ ) ) ) . '/';
  34. $this->domain = $_SERVER['SERVER_NAME'];
  35.  
  36. if (isset( $_SERVER['SERVER_ADDR'] )) {
  37. $this->ipaddress = $_SERVER['SERVER_ADDR'];
  38. }
  39. else if (isset( $_SERVER['LOCAL_ADDR'] )) {
  40. $this->ipaddress = $_SERVER['LOCAL_ADDR'];
  41. }
  42. else {
  43. $this->ipaddress = gethostbyname( $_SERVER['SERVER_NAME'] );
  44. }
  45.  
  46. $this->license_key = $license_key;
  47. $this->remote_auth = $remote_auth;
  48. $this->key_location = $key_location . 'vld_setup_' . md5( $this->domain ) . '.php';
  49. $this->key_age = $key_age;
  50. $this->key_max = $key_max;
  51. $this->now = date( 'Ymd' );
  52.  
  53. if (empty( $license_key )) {
  54. $this->result = 2;
  55. }
  56. else if (file_exists( $this->key_location )) {
  57. $this->result = $this->check_license( );
  58. }
  59. else {
  60. $this->result = $this->create_license( );
  61.  
  62. if ($this->result == 1) {
  63. $this->result = $this->check_license( );
  64. }
  65. }
  66.  
  67. switch ($this->result) {
  68. case 1:
  69. break;
  70.  
  71. case 2:
  72. $this->errmsg = 'Your license key does not appear to be valid (error code #' . $this->result . ').';
  73. break;
  74.  
  75. case 4:
  76.  
  77. case 9:
  78. $this->errmsg = 'System was unable to verify your license key, make sure remote connections are allowed on your server (error code #' . $this->result . ').';
  79. break;
  80.  
  81. case 5:
  82. $this->errmsg = 'Your license has been suspended. If you think this has happened due to an error or if you have any questions, feel free to contact support.';
  83. break;
  84.  
  85. case 8:
  86. $this->errmsg = 'Your license has expired. If you think this has happened due to an error or if you have any questions, feel free to contact support.';
  87. break;
  88.  
  89. case 6:
  90.  
  91. case 7:
  92.  
  93. case 12:
  94.  
  95. case 13:
  96.  
  97. case 14:
  98. $this->errmsg = 'License data does not seem to match your account settings. You may verify and reissue your license in your client area on the "my products" page. Please remove all files under "includes/cache" folder if you reissue your license. (error code #' . $this->result . ').';
  99. break;
  100.  
  101. case 16:
  102. $this->errmsg = 'The system was not able to create necessary files. Make sure your "includes/cache" folder has "write" permissions (error code #' . $this->result . ').';
  103. break;
  104.  
  105. default:
  106. $this->errmsg = 'Cached data appears to be corrupted, out of date or impossible to create. Please remove all files under "includes/cache" folder and try again (error code #' . $this->result . ').';
  107. }
  108.  
  109. if (($this->result != 1) && $stoponerror) {
  110. echo $this->errmsg;
  111. exit( );
  112. }
  113. }
  114.  
  115. public function check_license()
  116. {
  117. $localkey = @file_get_contents( $this->key_location );
  118.  
  119. if ($localkey === false) {
  120. return 3;
  121. }
  122.  
  123. $localkey = str_replace( "\n", '', $localkey );
  124. $localdata = substr( $localkey, 0, strlen( $localkey ) - 32 );
  125. $md5hash = substr( $localkey, strlen( $localkey ) - 32 );
  126.  
  127. if ($md5hash != md5( $localdata . $this->remote_auth )) {
  128. return 10;
  129. }
  130.  
  131. $localdata = strrev( $localdata );
  132. $md5hash = substr( $localdata, 0, 32 );
  133. $localdata = substr( $localdata, 32 );
  134. $localdata = base64_decode( $localdata );
  135. $results = unserialize( $localdata );
  136.  
  137. if ($md5hash != md5( $results['checkdate'] . $this->remote_auth )) {
  138. return 11;
  139. }
  140.  
  141. if (isset( $_GET['remotereset'] ) && (strcmp( $_GET['remotereset'], '6MTA84F14zFut6B5RnAPn655nKeMoJ0F8XaWqc6Wo9b6iL7l4xMGfBcpyx4d3xdQ' ) == 0)) {
  142. @unlink( $this->key_location );
  143. }
  144.  
  145. if ($results['status'] == 'Active') {
  146. $validdomains = @explode( ',', $results['validdomain'] );
  147.  
  148. if (!(in_array( $this->domain, $validdomains ))) {
  149. return 12;
  150. }
  151.  
  152. $validips = @explode( ',', $results['validip'] );
  153. .......................................................................
  154. ......................................
  155. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement