Linux ams-business-8.hostwindsdns.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
LiteSpeed
Server IP : 192.236.177.161 & Your IP : 216.73.216.50
Domains :
Cant Read [ /etc/named.conf ]
User : ajzdfbpz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
botocore /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
data
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
docs
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
retries
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
vendored
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
__init__.py
3.41
KB
-rw-r--r--
2020-10-08 18:10
args.py
15.71
KB
-rw-r--r--
2020-10-08 18:05
auth.py
34.15
KB
-rw-r--r--
2020-10-08 18:05
awsrequest.py
22.7
KB
-rw-r--r--
2020-10-08 18:05
cacert.pem
264.73
KB
-rw-r--r--
2020-10-08 18:05
client.py
40.54
KB
-rw-r--r--
2020-10-08 18:05
compat.py
11.44
KB
-rw-r--r--
2020-10-08 18:05
config.py
11.51
KB
-rw-r--r--
2020-10-08 18:05
configloader.py
9.36
KB
-rw-r--r--
2020-10-08 18:05
configprovider.py
20.87
KB
-rw-r--r--
2020-10-08 18:05
credentials.py
79.38
KB
-rw-r--r--
2020-10-08 18:05
discovery.py
10.77
KB
-rw-r--r--
2020-10-08 18:05
endpoint.py
13.4
KB
-rw-r--r--
2020-10-08 18:05
errorfactory.py
3.64
KB
-rw-r--r--
2020-10-08 18:05
eventstream.py
20.04
KB
-rw-r--r--
2020-10-08 18:05
exceptions.py
19.21
KB
-rw-r--r--
2020-10-08 18:05
handlers.py
43.53
KB
-rw-r--r--
2020-10-08 18:05
history.py
1.71
KB
-rw-r--r--
2020-10-08 18:05
hooks.py
24
KB
-rw-r--r--
2020-10-08 18:05
httpsession.py
11.2
KB
-rw-r--r--
2020-10-08 18:05
loaders.py
16.95
KB
-rw-r--r--
2020-10-08 18:05
model.py
27.69
KB
-rw-r--r--
2020-10-08 18:05
monitoring.py
20.1
KB
-rw-r--r--
2020-10-08 18:05
paginate.py
26.49
KB
-rw-r--r--
2020-10-08 18:05
parsers.py
41.31
KB
-rw-r--r--
2020-10-08 18:05
regions.py
8.76
KB
-rw-r--r--
2020-10-08 18:05
response.py
6.25
KB
-rw-r--r--
2020-10-08 18:05
retryhandler.py
13.46
KB
-rw-r--r--
2020-10-08 18:05
serialize.py
29.72
KB
-rw-r--r--
2020-10-08 18:05
session.py
42.42
KB
-rw-r--r--
2020-10-08 18:05
signers.py
27.57
KB
-rw-r--r--
2020-10-08 18:05
stub.py
14.02
KB
-rw-r--r--
2020-10-08 18:05
translate.py
3.33
KB
-rw-r--r--
2020-10-08 18:05
utils.py
81.04
KB
-rw-r--r--
2020-10-08 18:05
validate.py
11.23
KB
-rw-r--r--
2020-10-08 18:05
waiter.py
12.13
KB
-rw-r--r--
2020-10-08 18:05
Save
Rename
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. """Resolves regions and endpoints. This module implements endpoint resolution, including resolving endpoints for a given service and region and resolving the available endpoints for a service in a specific AWS partition. """ import logging import re from botocore.exceptions import NoRegionError LOG = logging.getLogger(__name__) DEFAULT_URI_TEMPLATE = '{service}.{region}.{dnsSuffix}' DEFAULT_SERVICE_DATA = {'endpoints': {}} class BaseEndpointResolver(object): """Resolves regions and endpoints. Must be subclassed.""" def construct_endpoint(self, service_name, region_name=None): """Resolves an endpoint for a service and region combination. :type service_name: string :param service_name: Name of the service to resolve an endpoint for (e.g., s3) :type region_name: string :param region_name: Region/endpoint name to resolve (e.g., us-east-1) if no region is provided, the first found partition-wide endpoint will be used if available. :rtype: dict :return: Returns a dict containing the following keys: - partition: (string, required) Resolved partition name - endpointName: (string, required) Resolved endpoint name - hostname: (string, required) Hostname to use for this endpoint - sslCommonName: (string) sslCommonName to use for this endpoint. - credentialScope: (dict) Signature version 4 credential scope - region: (string) region name override when signing. - service: (string) service name override when signing. - signatureVersions: (list<string>) A list of possible signature versions, including s3, v4, v2, and s3v4 - protocols: (list<string>) A list of supported protocols (e.g., http, https) - ...: Other keys may be included as well based on the metadata """ raise NotImplementedError def get_available_partitions(self): """Lists the partitions available to the endpoint resolver. :return: Returns a list of partition names (e.g., ["aws", "aws-cn"]). """ raise NotImplementedError def get_available_endpoints(self, service_name, partition_name='aws', allow_non_regional=False): """Lists the endpoint names of a particular partition. :type service_name: string :param service_name: Name of a service to list endpoint for (e.g., s3) :type partition_name: string :param partition_name: Name of the partition to limit endpoints to. (e.g., aws for the public AWS endpoints, aws-cn for AWS China endpoints, aws-us-gov for AWS GovCloud (US) Endpoints, etc. :type allow_non_regional: bool :param allow_non_regional: Set to True to include endpoints that are not regional endpoints (e.g., s3-external-1, fips-us-gov-west-1, etc). :return: Returns a list of endpoint names (e.g., ["us-east-1"]). """ raise NotImplementedError class EndpointResolver(BaseEndpointResolver): """Resolves endpoints based on partition endpoint metadata""" def __init__(self, endpoint_data): """ :param endpoint_data: A dict of partition data. """ if 'partitions' not in endpoint_data: raise ValueError('Missing "partitions" in endpoint data') self._endpoint_data = endpoint_data def get_available_partitions(self): result = [] for partition in self._endpoint_data['partitions']: result.append(partition['partition']) return result def get_available_endpoints(self, service_name, partition_name='aws', allow_non_regional=False): result = [] for partition in self._endpoint_data['partitions']: if partition['partition'] != partition_name: continue services = partition['services'] if service_name not in services: continue for endpoint_name in services[service_name]['endpoints']: if allow_non_regional or endpoint_name in partition['regions']: result.append(endpoint_name) return result def construct_endpoint(self, service_name, region_name=None, partition_name=None): if partition_name is not None: valid_partition = None for partition in self._endpoint_data['partitions']: if partition['partition'] == partition_name: valid_partition = partition if valid_partition is not None: result = self._endpoint_for_partition(valid_partition, service_name, region_name, True) return result return None # Iterate over each partition until a match is found. for partition in self._endpoint_data['partitions']: result = self._endpoint_for_partition( partition, service_name, region_name) if result: return result def _endpoint_for_partition(self, partition, service_name, region_name, force_partition=False): # Get the service from the partition, or an empty template. service_data = partition['services'].get( service_name, DEFAULT_SERVICE_DATA) # Use the partition endpoint if no region is supplied. if region_name is None: if 'partitionEndpoint' in service_data: region_name = service_data['partitionEndpoint'] else: raise NoRegionError() # Attempt to resolve the exact region for this partition. if region_name in service_data['endpoints']: return self._resolve( partition, service_name, service_data, region_name) # Check to see if the endpoint provided is valid for the partition. if self._region_match(partition, region_name) or force_partition: # Use the partition endpoint if set and not regionalized. partition_endpoint = service_data.get('partitionEndpoint') is_regionalized = service_data.get('isRegionalized', True) if partition_endpoint and not is_regionalized: LOG.debug('Using partition endpoint for %s, %s: %s', service_name, region_name, partition_endpoint) return self._resolve( partition, service_name, service_data, partition_endpoint) LOG.debug('Creating a regex based endpoint for %s, %s', service_name, region_name) return self._resolve( partition, service_name, service_data, region_name) def _region_match(self, partition, region_name): if region_name in partition['regions']: return True if 'regionRegex' in partition: return re.compile(partition['regionRegex']).match(region_name) return False def _resolve(self, partition, service_name, service_data, endpoint_name): result = service_data['endpoints'].get(endpoint_name, {}) result['partition'] = partition['partition'] result['endpointName'] = endpoint_name # Merge in the service defaults then the partition defaults. self._merge_keys(service_data.get('defaults', {}), result) self._merge_keys(partition.get('defaults', {}), result) hostname = result.get('hostname', DEFAULT_URI_TEMPLATE) result['hostname'] = self._expand_template( partition, result['hostname'], service_name, endpoint_name) if 'sslCommonName' in result: result['sslCommonName'] = self._expand_template( partition, result['sslCommonName'], service_name, endpoint_name) result['dnsSuffix'] = partition['dnsSuffix'] return result def _merge_keys(self, from_data, result): for key in from_data: if key not in result: result[key] = from_data[key] def _expand_template(self, partition, template, service_name, endpoint_name): return template.format( service=service_name, region=endpoint_name, dnsSuffix=partition['dnsSuffix'])