403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.55
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.7
System : Linux ip-172-31-69-123.ec2.internal 6.1.177-224.371.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 20:28:29 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/awscli/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/awscli/botocore/__pycache__/endpoint.cpython-39.pyc
a

wA�i�9�@s�ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZdd	lmZdd
lmZmZmZe�e�Ze�ZdZdZd
d�ZGdd�d�ZGdd�d�Z dS)�N)�parsers)�create_request_object)�HTTPClientError)�get_global_history_recorder)�first_non_none_response)�handle_checksum_body)�URLLib3Session)�
StreamingBody)�get_environ_proxies�is_valid_endpoint_url�is_valid_ipv6_endpoint_url�<�
cCst|j|jd|jid�}|ddkr.|j|d<nB|jr@|j|d<n0|jrf|d�d�}t|j|�|d<n
|j|d<|S)a�Convert an HTTP response object to a request dict.

    This converts the requests library's HTTP response object to
    a dictionary.

    :type http_response: botocore.vendored.requests.model.Response
    :param http_response: The HTTP response from an AWS service request.

    :rtype: dict
    :return: A response dictionary which will contain the following keys:
        * headers (dict)
        * status_code (int)
        * body (string or file-like object)

    �operation_name)�headers�status_code�contextr�,�bodyrzcontent-length)	rr�nameZcontent�has_event_stream_output�raw�has_streaming_output�getr	)�
http_response�operation_model�
response_dictZlength�r�</usr/lib/python3.9/site-packages/awscli/botocore/endpoint.py�convert_to_response_dict(s��
rc@sveZdZdZddd�Zdd�Zdd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
ddd�Zdd�ZdS)�Endpointa,
    Represents an endpoint for a particular service in a specific
    region.  Only an endpoint can make requests.

    :ivar service: The Service object that describes this endpoints
        service.
    :ivar host: The fully qualified endpoint hostname.
    :ivar session: The session object.
    NcCsN||_||_||_t��|_|dur,t��}||_||_	|j	durJt
�|_	dS�N)�_endpoint_prefix�_event_emitter�host�	threadingZLock�_lockrZResponseParserFactory�_response_parser_factory�http_sessionr)�selfr$�endpoint_prefix�
event_emitter�response_parser_factoryr(rrr�__init__Vs

zEndpoint.__init__cCs|j�d|j�d�S)N�(�))r"r$)r)rrr�__repr__iszEndpoint.__repr__cCst�d||�|�||�S)Nz%Making request for %s with params: %s)�logger�debug�
_send_request)r)r�request_dictrrr�make_requestls�zEndpoint.make_requestcCs^t|�}|rPt|j|jg�|_|jj��}d|�d|j��}|j	j
|||jd�|�|�}|S)Nzrequest-created.�.)�requestr)r�anyrrZ
stream_output�
service_model�
service_id�	hyphenizerr#�emit�prepare_request)r)�paramsrr7r:�
event_nameZprepared_requestrrr�create_requestts ���
zEndpoint.create_requestcCs.|��D] \}}t|t�r|�d�||<qdS)Nzutf-8)�items�
isinstance�str�encode)r)r�key�valuerrr�_encode_headers�s
zEndpoint._encode_headerscCs|�|j�|��Sr!)rGrZprepare�r)r7rrrr=�szEndpoint.prepare_requestc	Cs�d}|�||�}|d}|�|||�\}}|�|||||�rl|d7}|��|�||�}|�|||�\}}q*|dur�d|dvr�|d}||ddd<|dur�|�n|SdS)N�rZResponseMetadataZ
RetryAttempts)r@�
_get_response�_needs_retryZreset_stream)	r)r4r�attemptsr7r�success_response�	exceptionZ
total_retriesrrrr3�s:���
�
��zEndpoint._send_requestc
Cs||�|||�\}}dd||d�}|durF|\}}||d<t||�|d<|jj��}	|jjd|	�d|j��fi|��||fS)N)r�parsed_responserrNrOrzresponse-received.r6)�_do_get_responserr9r:r;r#r<r)
r)r7rrrMrNZkwargs_to_emitrrOr:rrrrJ�s*�����zEndpoint._get_responsec
Cs�zzt�d|�t�d|j|j|j|j|jd��|j	j
��}d|�d|j��}|j
j||d�}t|�}|durx|�|�}Wndty�}zd|fWYd}~Sd}~0ty�}z"tjddd	�d|fWYd}~Sd}~00t||�}	t||	||�|	��}
|j|
d
<t�d|
�|j	j}i}|j
jd|�d|j��||	|d
�|j�|�}
|
�|	|j�}|�|�|jdk�r�|�|	|||
�t�d|�||fdfS)NzSending http request: %sZHTTP_REQUEST)�methodr�	streaming�urlrzbefore-send.r6)r7z-Exception received when sending HTTP request.T)�exc_inforRZ
HTTP_RESPONSEz
before-parse.)rr�customized_response_dictrZPARSED_RESPONSE)r1r2�history_recorder�recordrQrZhas_streaming_inputrSrr9r:r;rr#r<r�_sendr�	Exceptionrr�copyrZresolved_protocolr'Z
create_parser�parseZoutput_shape�updater�_add_modeled_error_fields)r)r7rrr:r?�	responsesr�erZhttp_response_record_dictZprotocolrU�parserrOrrrrP�sv��
������
�zEndpoint._do_get_responsec	CsT|�di��d�}|durdS|j}|�|�}|dur:dS|�||�}|�|�dS)N�ErrorZCode)rr9Zshape_for_error_coder[r\)	r)rrOrr`Z
error_coder9Zerror_shapeZ
modeled_parserrrr]s
z"Endpoint._add_modeled_error_fieldsc
	Csj|jj��}d|�d|j��}|jj|||||||d�}t|�}	|	durLdSt�d|	�t	�
|	�dSdS)Nzneeds-retry.r6)�responseZendpointZ	operationrL�caught_exceptionr4Fz3Response received to retry, sleeping for %s secondsT)r9r:r;rr#r<rr1r2�time�sleep)
r)rLrr4rbrcr:r?r^Zhandler_responserrrrK-s(�	�
zEndpoint._needs_retrycCs|j�|�Sr!)r(�sendrHrrrrXMszEndpoint._send)NN)N)NN)�__name__�
__module__�__qualname__�__doc__r-r0r5r@rGr=r3rJrPr]rKrXrrrrr Ks"�

'G�
 r c	@s@eZdZdd�Zddeeeddddf	dd�Zdd�Zdd	�Z	dS)
�EndpointCreatorcCs
||_dSr!)r#)r)r+rrrr-RszEndpointCreator.__init__Nc
	Cstt|�st|�std|����|	dur0|�|�}	|j}
t�d|
|�|||	|�|�||
||d�}t||
|j	||d�S)NzInvalid endpoint: zSetting %s timeout as %s)�timeout�proxies�verify�max_pool_connections�socket_options�client_cert�proxies_config)r*r+r,r()
rr�
ValueError�_get_proxiesr*r1r2�_get_verify_valuer r#)r)r9Zregion_nameZendpoint_urlrnr,rlroZhttp_session_clsrmrprqrrr*r(rrr�create_endpointUs4��
�
�zEndpointCreator.create_endpointcCst|�Sr!)r
)r)rSrrrrt�szEndpointCreator._get_proxiescCs|dur|Stj�dd�S)NZREQUESTS_CA_BUNDLET)�os�environr)r)rnrrrru�sz!EndpointCreator._get_verify_value)
rgrhrir-�DEFAULT_TIMEOUT�MAX_POOL_CONNECTIONSrrvrtrurrrrrkQs�
+rk)!Zloggingrwr%rdZbotocorerZbotocore.awsrequestrZbotocore.exceptionsrZbotocore.historyrZbotocore.hooksrZbotocore.httpchecksumrZbotocore.httpsessionrZbotocore.responser	Zbotocore.utilsr
rrZ	getLoggerrgr1rVryrzrr rkrrrr�<module>s*
#

Youez - 2016 - github.com/yon3zu
LinuXploit