Guest User

Untitled

a guest
Nov 10th, 2023
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP8 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 8.1.0.9
  8. * @ Author : DeZender
  9. * @ Release on : 27.10.2023
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function metunic_diff_day($start = '', $end = '')
  15. {
  16. $dStart = new DateTime($start);
  17. $dEnd = new DateTime($end);
  18. $dDiff = $dStart->diff($dEnd);
  19. return $dDiff->days;
  20. }
  21.  
  22. function metunic_crypt_chip($action, $string, $salt = '')
  23. {
  24. if ($salt != 'Wlk1TE5kQW1iSXh5WXI3RkU4aFpkZkRncWRMK1lhNkhrQWJ5UWd0VW0vekZSVERvOFljYldIc0lYSFVzWWg3Tw==') {
  25. return false;
  26. }
  27.  
  28. $key = '0|.%J.MF4AMT$(.VU1J' . $salt . 'O1SbFd$|N83JG' . str_replace('www.', '', $_SERVER['SERVER_NAME']) . '.~&/-_f?fge&';
  29. $output = false;
  30. $encrypt_method = 'AES-256-CBC';
  31.  
  32. if (is_null($key)) {
  33. $secret_key = 'NULL';
  34. }
  35. else {
  36. $secret_key = $key;
  37. }
  38.  
  39. $secret_iv = '1iSXh5WXI3RkU4aF';
  40. $key = hash('sha256', $secret_key);
  41. $iv = substr(hash('sha256', $secret_iv), 0, 16);
  42.  
  43. if ($action === 'encrypt') {
  44. $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
  45. $output = base64_encode($output);
  46. }
  47. else if ($action === 'decrypt') {
  48. $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
  49. }
  50.  
  51. return $output;
  52. }
  53.  
  54. function metunic_get_license_file_data($reload = false)
  55. {
  56. global $temp_lfile;
  57. if ($reload || !$temp_lfile) {
  58. if (!file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'LICENSE')) {
  59. return false;
  60. }
  61.  
  62. $checkingFileData = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'LICENSE');
  63.  
  64. if ($checkingFileData) {
  65. $checkingFileData = metunic_crypt_chip('decrypt', $checkingFileData, 'Wlk1TE5kQW1iSXh5WXI3RkU4aFpkZkRncWRMK1lhNkhrQWJ5UWd0VW0vekZSVERvOFljYldIc0lYSFVzWWg3Tw==');
  66.  
  67. if ($checkingFileData) {
  68. $temp_lfile = json_decode($checkingFileData, true);
  69. return $temp_lfile;
  70. }
  71. }
  72. }
  73. else {
  74. return $temp_lfile;
  75. }
  76.  
  77. return false;
  78. }
  79.  
  80. function metunic_license_run_check($licenseData = [])
  81. {
  82. if ($licenseData) {
  83. if (isset($licenseData['next-check-time'])) {
  84. $now_time = date('Y-m-d H:i:s');
  85. $next_time = date('Y-m-d H:i:s', strtotime($licenseData['next-check-time']));
  86. $difference = metunic_diff_day($next_time, $now_time);
  87.  
  88. if ($difference < 2) {
  89. $now_time = strtotime(date('Y-m-d H:i:s'));
  90. $next_time = strtotime($next_time);
  91.  
  92. if ($now_time < $next_time) {
  93. return false;
  94. }
  95. }
  96. }
  97. }
  98.  
  99. return true;
  100. }
  101.  
  102. function metunic_use_license_curl($address, &$error_msg)
  103. {
  104. $ch = curl_init();
  105. curl_setopt($ch, CURLOPT_URL, $address);
  106. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  107. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  108. $result = @curl_exec($ch);
  109.  
  110. if (curl_errno($ch)) {
  111. $error_msg = curl_error($ch);
  112. return false;
  113. }
  114.  
  115. curl_close($ch);
  116. return $result;
  117. }
  118.  
  119. function metunic_checkLicence($func = true)
  120. {
  121. global $licenceError;
  122. $license_data = metunic_get_license_file_data();
  123. $run_check = metunic_license_run_check($license_data);
  124.  
  125. if ($run_check) {
  126. $domain = str_replace('www.', '', $_SERVER['SERVER_NAME']);
  127. $directory = __DIR__;
  128.  
  129. if (isset($_SERVER['HTTP_CLIENT_IP'])) {
  130. $ip = $_SERVER['HTTP_CLIENT_IP'];
  131. }
  132. else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  133. $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
  134. ..............................................................................
  135. ............................................
  136. .......................
Add Comment
Please, Sign In to add comment