Guest User

Untitled

a guest
Jan 2nd, 2021
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 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 Components\Core;
  15.  
  16. class ModuleValidator
  17. {
  18. /**
  19. * Contains module instance
  20. *
  21. * @var ModuleInterface
  22. */
  23. private $module;
  24. /**
  25. * License server url
  26. *
  27. * @var string
  28. */
  29. private $server = 'license.easydcim.com';
  30. /**
  31. * License Key
  32. *
  33. * @var string
  34. */
  35. private $licenseKey;
  36. /**
  37. * License Information Response
  38. *
  39. * @var string
  40. */
  41. private $rawResponse;
  42. /**
  43. * CURL instance
  44. *
  45. * @var
  46. */
  47. private $curl;
  48. /**
  49. * Crypter instance
  50. *
  51. * @var
  52. */
  53. private $crypter;
  54. /**
  55. * @var \Illuminate\Support\MessageBag
  56. */
  57. protected $errors;
  58.  
  59. public function __construct(\Components\Modules\Interfaces\ModuleInterface $module, \?Components\Helpers\Interfaces\CurlInterface $curl = NULL, \?Components\Helpers\Interfaces\CrypterInterface $crypter = NULL)
  60. {
  61. $this->licenseKey = strtoupper(config('app.licensekey'));
  62. $licenseSecretKey = strrev(sha1(strrev(base64_encode(strrev(sha1(str_replace('-', '', $this->licenseKey)))))));
  63. $this->setModule($module);
  64.  
  65. if (is_null($curl)) {
  66. $this->setCurl(new \Components\Helpers\Curl());
  67. }
  68. else {
  69. $this->setCurl($curl);
  70. }
  71.  
  72. if (is_null($crypter)) {
  73. $this->setCrypter(new \Components\Helpers\Crypter(substr($licenseSecretKey, 0, 32)));
  74. }
  75. else {
  76. $this->setCrypter($crypter);
  77. }
  78.  
  79. $this->errors = new \Illuminate\Support\MessageBag();
  80. }
  81.  
  82. /**
  83. * @param CurlInterface $curl
  84. */
  85. public function setCurl(\Components\Helpers\Interfaces\CurlInterface $curl)
  86. {
  87. $this->curl = $curl;
  88. }
  89.  
  90. /**
  91. * @return Curl
  92. */
  93. public function getCurl()
  94. {
  95. return $this->curl;
  96. }
  97.  
  98. /**
  99. * @param CrypterInterface $crypter
  100. */
  101. public function setCrypter(\Components\Helpers\Interfaces\CrypterInterface $crypter)
  102. {
  103. .................................................................
  104. ....................................
  105. ...................
Add Comment
Please, Sign In to add comment