Guest User

Untitled

a guest
Oct 8th, 2020
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace App\lib;
  15.  
  16. final class Activation
  17. {
  18. static private $RTL_THEME_SLUG = 'digilara';
  19. static private $WEOWPS_RTL_OIEKS = 'd0a7e7997b6d5fcd55f4b5c32611b81';
  20. static private $RTL_OAUTH_PID = 'new_product';
  21. static private $RTL_OAUTH_API = 'rtl539bb6eb71527d7e39ced6aeee72e9';
  22. static private $RTL_OPTIONS_NAME = 'digilara_rtl_license_options';
  23. static private $RTL_SECURE_ACTIVE = 'rtl539bb6eb71527d7e39ced6aeee72e9digilarairworkesactive';
  24. static private $instance;
  25. static private $hash_method = 'AES-256-CBC';
  26. private $hash_key;
  27.  
  28. static public function check_license($username, $orderid)
  29. {
  30. $check = new Activation();
  31.  
  32. if ($_SERVER['HTTP_HOST'] != 'localhost') {
  33. return $check->rtl_oauth_license_settings_page($username, $orderid);
  34. }
  35. else {
  36. return $check->local_license($username);
  37. }
  38. }
  39.  
  40. static public function get_instance()
  41. {
  42. if (self::$instance == NULL) {
  43. self::$instance = new Activation();
  44. }
  45.  
  46. return self::$instance;
  47. }
  48.  
  49. private function __construct()
  50. {
  51. $this->hash_key = hash('sha256', 'd0a7e7997b6d5fcd55f4b5c32611b81');
  52. }
  53.  
  54. public function mc_encrypt($encrypt, $key)
  55. {
  56. $encrypt = serialize($encrypt);
  57. $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);
  58. $key = pack('H*', $key);
  59. $mac = hash_hmac('sha256', $encrypt, substr(bin2hex($key), -32));
  60. $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $encrypt . $mac, MCRYPT_MODE_CBC, $iv);
  61. $encoded = base64_encode($passcrypt) . '|' . base64_encode($iv);
  62. return $encoded;
  63. }
  64.  
  65. public function mc_decrypt($decrypt, $key)
  66. {
  67. $decrypt = explode('|', $decrypt . '|');
  68. $decoded = base64_decode($decrypt[0]);
  69. $iv = base64_decode($decrypt[1]);
  70.  
  71. if (strlen($iv) !== mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC)) {
  72. return false;
  73. }
  74.  
  75. $key = pack('H*', $key);
  76. $decrypted = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $decoded, MCRYPT_MODE_CBC, $iv));
  77. $mac = substr($decrypted, -64);
  78. $decrypted = substr($decrypted, 0, -64);
  79. ................................................................................
  80. ................................................
  81. .........................
Add Comment
Please, Sign In to add comment