!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/picomail.picotech.app/public_html/vendor/async-aws/core/src/Credentials/   drwxr-xr-x
Free 28.69 GB of 117.98 GB (24.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
AsyncAws\Core\Credentials;

use 
AsyncAws\Core\Configuration;
use 
Psr\Log\LoggerInterface;
use 
Psr\Log\NullLogger;
use 
Symfony\Component\HttpClient\HttpClient;
use 
Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use 
Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface;
use 
Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use 
Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * Provides Credentials from the running ECS.
 *
 * @see https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/index.html?com/amazonaws/auth/ContainerCredentialsProvider.html
 */
final class ContainerProvider implements CredentialProvider
{
    private const 
ENDPOINT 'http://169.254.170.2';

    private 
$logger;

    private 
$httpClient;

    private 
$timeout;

    public function 
__construct(?HttpClientInterface $httpClient null, ?LoggerInterface $logger nullfloat $timeout 1.0)
    {
        
$this->logger $logger ?? new NullLogger();
        
$this->httpClient $httpClient ?? HttpClient::create();
        
$this->timeout $timeout;
    }

    public function 
getCredentials(Configuration $configuration): ?Credentials
    
{
        
$relativeUri $configuration->get(Configuration::OPTION_CONTAINER_CREDENTIALS_RELATIVE_URI);
        
// introduces an early exit if the env variable is not set.
        
if (empty($relativeUri)) {
            return 
null;
        }

        
// fetch credentials from ecs endpoint
        
try {
            
$response $this->httpClient->request('GET'self::ENDPOINT $relativeUri, ['timeout' => $this->timeout]);
            
$result $response->toArray();
        } catch (
DecodingExceptionInterface $e) {
            
$this->logger->info('Failed to decode Credentials.', ['exception' => $e]);

            return 
null;
        } catch (
TransportExceptionInterface|HttpExceptionInterface $e) {
            
$this->logger->info('Failed to fetch Profile from Instance Metadata.', ['exception' => $e]);

            return 
null;
        }

        if (
null !== $date $response->getHeaders(false)['date'][0] ?? null) {
            
$date = new \DateTimeImmutable($date);
        }

        return new 
Credentials(
            
$result['AccessKeyId'],
            
$result['SecretAccessKey'],
            
$result['Token'],
            
Credentials::adjustExpireDate(new \DateTimeImmutable($result['Expiration']), $date)
        );
    }
}

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