Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP8 Decoder for ionCube Encoder)
- *
- * @ Version : 8.1.0.9
- * @ Author : DeZender
- * @ Release on : 27.10.2023
- * @ Official site : http://DeZender.Net
- *
- */
- namespace App\Providers;
- class EventServiceProvider extends \Illuminate\Foundation\Support\Providers\EventServiceProvider
- {
- /**
- * The event listener mappings for the application.
- *
- * @var array
- */
- protected $listen = [
- 'Illuminate\\Auth\\Events\\Registered' => ['Illuminate\\Auth\\Listeners\\SendEmailVerificationNotification'],
- 'Illuminate\\Auth\\Events\\Login' => ['App\\Listeners\\NewDeviceDetection'],
- 'Illuminate\\Queue\\Events\\JobQueued' => ['App\\Listeners\\Tasks\\SaveTaskWhenQueued'],
- 'Illuminate\\Queue\\Events\\JobProcessing' => ['App\\Listeners\\Tasks\\MarkAsStarted', 'App\\Listeners\\ClearPayload'],
- 'Illuminate\\Queue\\Events\\JobProcessed' => ['App\\Listeners\\Tasks\\MarkAsCompleted', 'App\\Listeners\\Tasks\\MarkAsRescheduled'],
- 'Illuminate\\Queue\\Events\\JobFailed' => ['App\\Listeners\\Tasks\\MarkAsFailed'],
- 'App\\Events\\RemoteDomainCreated' => ['App\\Listeners\\ApplyPhpSettings'],
- 'Laravel\\Fortify\\Events\\TwoFactorAuthenticationConfirmed' => ['App\\Listeners\\UpdateUserAfterTwoFactorEnabled'],
- 'SocialiteProviders\\Manager\\SocialiteWasCalled' => ['SocialiteProviders\\Apple\\AppleExtendSocialite@handle', 'SocialiteProviders\\Microsoft\\MicrosoftExtendSocialite@handle']
- ];
- /**
- * Register any events for your application.
- *
- * @return void
- */
- public function boot()
- {
- \Illuminate\Support\Facades\Event::listen(function(\Illuminate\Auth\Events\Authenticated $event) {
- if (in_array($event->guard, ['web-admin', 'api-admin'])) {
- $isRouteGuarded = false;
- $route = \Illuminate\Support\Facades\Route::current();
- if (!$route) {
- return NULL;
- }
- $middlewares = $route->gatherMiddleware();
- foreach ($middlewares as $mw) {
- if (\Illuminate\Support\Str::startsWith($mw, 'auth:') && \Illuminate\Support\Str::contains($mw, ['web-admin', 'api-admin'])) {
- $isRouteGuarded = true;
- }
- }
- $refresh = ($route->getName() == 'admin.home') && optional(request())->has('license_check');
- if ($isRouteGuarded || $refresh) {
- if ($refresh) {
- \App\Models\SystemSetting::set('localkey', '');
- \App\Models\SystemSetting::set('licensedata', '');
- }
- try {
- function() {
- $licenseKey = \App\Models\SystemSetting::get('licensekey');
- $localKey = \App\Models\SystemSetting::get('localkey');
- $licenseSecretKey = 'gXztxIYzXQC72q6nix0nOo5A8TLQClMkmmJBVUDwfGo8yN1uweRQv58ElCBlNaOJ';
- $localKeyDays = 1;
- $allowCheckFailDays = 3;
- $checker = new class ($licenseKey, $licenseSecretKey, $localKey, $localKeyDays, $allowCheckFailDays) {
- private ?string $licenseKey;
- private ?string $licenseSecretKey;
- private ?string $localKey;
- private int $localKeyDays;
- private int $allowCheckFailDays;
- private \Illuminate\Encryption\Encrypter $encrypter;
- private mixed $localData;
- public function __construct($licenseKey, $licenseSecretKey, $localKey, $localKeyDays, $allowCheckFailDays)
- {
- $this->licenseKey = $licenseKey;
- $this->licenseSecretKey = $licenseSecretKey;
- $this->localKey = $localKey;
- $this->localKeyDays = $localKeyDays;
- $this->allowCheckFailDays = $allowCheckFailDays;
- $this->encrypter = new \Illuminate\Encryption\Encrypter(substr($licenseSecretKey, 0, 16), 'AES-128-CBC');
- }
- public function getData()
- {
- if (empty($this->localData)) {
- .....................................................................
- ................................................
- ..........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement