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


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

use 
JmesPath\Env;

class 
PartitionEndpointProvider
{
    
/** @var Partition[] */
    
private $partitions;
    
/** @var string */
    
private $defaultPartition;
    
/** @var array  */
    
private $options;

    
/**
     * The 'options' parameter accepts the following arguments:
     *
     * - sts_regional_endpoints: For STS legacy regions, set to 'regional' to
     *   use regional endpoints, 'legacy' to use the legacy global endpoint.
     *   Defaults to 'legacy'.
     * - s3_us_east_1_regional_endpoint: For S3 us-east-1 region, set to 'regional'
     *   to use the regional endpoint, 'legacy' to use the legacy global endpoint.
     *   Defaults to 'legacy'.
     *
     * @param array $partitions
     * @param string $defaultPartition
     * @param array $options
     */
    
public function __construct(
        array 
$partitions,
        
$defaultPartition 'aws',
        
$options = []
    ) {
        
$this->partitions array_map(function (array $definition) {
            return new 
Partition($definition);
        }, 
array_values($partitions));
        
$this->defaultPartition $defaultPartition;
        
$this->options $options;
    }

    public function 
__invoke(array $args = [])
    {
        
$partition $this->getPartition(
            isset(
$args['region']) ? $args['region'] : '',
            isset(
$args['service']) ? $args['service'] : ''
        
);
        
$args['options'] = $this->options;

        return 
$partition($args);
    }

    
/**
     * Returns the partition containing the provided region or the default
     * partition if no match is found.
     *
     * @param string $region
     * @param string $service
     *
     * @return Partition
     */
    
public function getPartition($region$service)
    {
        foreach (
$this->partitions as $partition) {
            if (
$partition->isRegionMatch($region$service)) {
                return 
$partition;
            }
        }

        return 
$this->getPartitionByName($this->defaultPartition);
    }

    
/**
     * Returns the partition with the provided name or null if no partition with
     * the provided name can be found.
     *
     * @param string $name
     *
     * @return Partition|null
     */
    
public function getPartitionByName($name)
    {
        foreach (
$this->partitions as $partition) {
            if (
$name === $partition->getName()) {
                return 
$partition;
            }
        }
    }

    
/**
     * Creates and returns the default SDK partition provider.
     *
     * @param array $options
     * @return PartitionEndpointProvider
     */
    
public static function defaultProvider($options = [])
    {
        
$data \Aws\load_compiled_json(__DIR__ '/../data/endpoints.json');
        
$prefixData \Aws\load_compiled_json(__DIR__ '/../data/endpoints_prefix_history.json');
        
$mergedData self::mergePrefixData($data$prefixData);

        return new 
self($mergedData['partitions'], 'aws'$options);
    }

    
/**
     * Copy endpoint data for other prefixes used by a given service
     *
     * @param $data
     * @param $prefixData
     * @return array
     */
    
public static function mergePrefixData($data$prefixData)
    {
        
$prefixGroups $prefixData['prefix-groups'];

        foreach (
$data["partitions"] as $index => $partition) {
            foreach (
$prefixGroups as $current => $old) {
                
$serviceData Env::search("services.\"{$current}\""$partition);
                if (!empty(
$serviceData)) {
                    foreach (
$old as $prefix) {
                        if (empty(
Env::search("services.\"{$prefix}\""$partition))) {
                            
$data["partitions"][$index]["services"][$prefix] = $serviceData;
                        }
                    }
                }
            }
        }

        return 
$data;
    }
}

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