!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/   drwxr-xr-x
Free 13.22 GB of 57.97 GB (22.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     PreventRequestsDuringMaintenance.php (3.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Illuminate\Foundation\Http\Middleware;

use 
Closure;
use 
Illuminate\Contracts\Foundation\Application;
use 
Illuminate\Foundation\Http\MaintenanceModeBypassCookie;
use 
Symfony\Component\HttpKernel\Exception\HttpException;

class 
PreventRequestsDuringMaintenance
{
    
/**
     * The application implementation.
     *
     * @var \Illuminate\Contracts\Foundation\Application
     */
    
protected $app;

    
/**
     * The URIs that should be accessible while maintenance mode is enabled.
     *
     * @var array
     */
    
protected $except = [];

    
/**
     * Create a new middleware instance.
     *
     * @param  \Illuminate\Contracts\Foundation\Application  $app
     * @return void
     */
    
public function __construct(Application $app)
    {
        
$this->app $app;
    }

    
/**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     *
     * @throws \Symfony\Component\HttpKernel\Exception\HttpException
     */
    
public function handle($requestClosure $next)
    {
        if (
$this->app->isDownForMaintenance()) {
            
$data json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true);

            if (isset(
$data['secret']) && $request->path() === $data['secret']) {
                return 
$this->bypassResponse($data['secret']);
            }

            if (
$this->hasValidBypassCookie($request$data) ||
                
$this->inExceptArray($request)) {
                return 
$next($request);
            }

            if (isset(
$data['redirect'])) {
                
$path $data['redirect'] === '/'
                            
$data['redirect']
                            : 
trim($data['redirect'], '/');

                if (
$request->path() !== $path) {
                    return 
redirect($path);
                }
            }

            if (isset(
$data['template'])) {
                return 
response(
                    
$data['template'],
                    
$data['status'] ?? 503,
                    isset(
$data['retry']) ? ['Retry-After' => $data['retry']] : []
                );
            }

            throw new 
HttpException(
                
$data['status'] ?? 503,
                
'Service Unavailable',
                
null,
                isset(
$data['retry']) ? ['Retry-After' => $data['retry']] : []
            );
        }

        return 
$next($request);
    }

    
/**
     * Determine if the incoming request has a maintenance mode bypass cookie.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  array  $data
     * @return bool
     */
    
protected function hasValidBypassCookie($request, array $data)
    {
        return isset(
$data['secret']) &&
                
$request->cookie('laravel_maintenance') &&
                
MaintenanceModeBypassCookie::isValid(
                    
$request->cookie('laravel_maintenance'),
                    
$data['secret']
                );
    }

    
/**
     * Determine if the request has a URI that should be accessible in maintenance mode.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return bool
     */
    
protected function inExceptArray($request)
    {
        foreach (
$this->except as $except) {
            if (
$except !== '/') {
                
$except trim($except'/');
            }

            if (
$request->fullUrlIs($except) || $request->is($except)) {
                return 
true;
            }
        }

        return 
false;
    }

    
/**
     * Redirect the user back to the root of the application with a maintenance mode bypass cookie.
     *
     * @param  string  $secret
     * @return \Illuminate\Http\RedirectResponse
     */
    
protected function bypassResponse(string $secret)
    {
        return 
redirect('/')->withCookie(
            
MaintenanceModeBypassCookie::create($secret)
        );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]--