Advertisement
Guest User

Untitled

a guest
Jun 16th, 2025
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 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. namespace App\Providers;
  15.  
  16. class EventServiceProvider extends \Illuminate\Foundation\Support\Providers\EventServiceProvider
  17. {
  18. /**
  19. * The event listener mappings for the application.
  20. *
  21. * @var array
  22. */
  23. protected $listen = [
  24. 'Illuminate\\Auth\\Events\\Registered' => ['Illuminate\\Auth\\Listeners\\SendEmailVerificationNotification'],
  25. 'Illuminate\\Auth\\Events\\Login' => ['App\\Listeners\\NewDeviceDetection'],
  26. 'Illuminate\\Queue\\Events\\JobQueued' => ['App\\Listeners\\Tasks\\SaveTaskWhenQueued'],
  27. 'Illuminate\\Queue\\Events\\JobProcessing' => ['App\\Listeners\\Tasks\\MarkAsStarted', 'App\\Listeners\\ClearPayload'],
  28. 'Illuminate\\Queue\\Events\\JobProcessed' => ['App\\Listeners\\Tasks\\MarkAsCompleted', 'App\\Listeners\\Tasks\\MarkAsRescheduled'],
  29. 'Illuminate\\Queue\\Events\\JobFailed' => ['App\\Listeners\\Tasks\\MarkAsFailed'],
  30. 'App\\Events\\RemoteDomainCreated' => ['App\\Listeners\\ApplyPhpSettings'],
  31. 'Laravel\\Fortify\\Events\\TwoFactorAuthenticationConfirmed' => ['App\\Listeners\\UpdateUserAfterTwoFactorEnabled'],
  32. 'SocialiteProviders\\Manager\\SocialiteWasCalled' => ['SocialiteProviders\\Apple\\AppleExtendSocialite@handle', 'SocialiteProviders\\Microsoft\\MicrosoftExtendSocialite@handle']
  33. ];
  34.  
  35. /**
  36. * Register any events for your application.
  37. *
  38. * @return void
  39. */
  40. public function boot()
  41. {
  42.  
  43. \Illuminate\Support\Facades\Event::listen(function(\Illuminate\Auth\Events\Authenticated $event) {
  44. if (in_array($event->guard, ['web-admin', 'api-admin'])) {
  45. $isRouteGuarded = false;
  46. $route = \Illuminate\Support\Facades\Route::current();
  47.  
  48. if (!$route) {
  49. return NULL;
  50. }
  51.  
  52. $middlewares = $route->gatherMiddleware();
  53.  
  54. foreach ($middlewares as $mw) {
  55. if (\Illuminate\Support\Str::startsWith($mw, 'auth:') && \Illuminate\Support\Str::contains($mw, ['web-admin', 'api-admin'])) {
  56. $isRouteGuarded = true;
  57. }
  58. }
  59. $refresh = ($route->getName() == 'admin.home') && optional(request())->has('license_check');
  60. if ($isRouteGuarded || $refresh) {
  61. if ($refresh) {
  62. \App\Models\SystemSetting::set('localkey', '');
  63. \App\Models\SystemSetting::set('licensedata', '');
  64. }
  65.  
  66. try {
  67.  
  68. function() {
  69.  
  70. $licenseKey = \App\Models\SystemSetting::get('licensekey');
  71. $localKey = \App\Models\SystemSetting::get('localkey');
  72. $licenseSecretKey = 'gXztxIYzXQC72q6nix0nOo5A8TLQClMkmmJBVUDwfGo8yN1uweRQv58ElCBlNaOJ';
  73. $localKeyDays = 1;
  74. $allowCheckFailDays = 3;
  75. $checker = new class ($licenseKey, $licenseSecretKey, $localKey, $localKeyDays, $allowCheckFailDays) {
  76. private ?string $licenseKey;
  77. private ?string $licenseSecretKey;
  78. private ?string $localKey;
  79. private int $localKeyDays;
  80. private int $allowCheckFailDays;
  81. private \Illuminate\Encryption\Encrypter $encrypter;
  82. private mixed $localData;
  83.  
  84. public function __construct($licenseKey, $licenseSecretKey, $localKey, $localKeyDays, $allowCheckFailDays)
  85. {
  86. $this->licenseKey = $licenseKey;
  87. $this->licenseSecretKey = $licenseSecretKey;
  88. $this->localKey = $localKey;
  89. $this->localKeyDays = $localKeyDays;
  90. $this->allowCheckFailDays = $allowCheckFailDays;
  91. $this->encrypter = new \Illuminate\Encryption\Encrypter(substr($licenseSecretKey, 0, 16), 'AES-128-CBC');
  92. }
  93.  
  94. public function getData()
  95. {
  96. if (empty($this->localData)) {
  97. .....................................................................
  98. ................................................
  99. ..........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement