403Webshell
Server IP : 157.22.201.140  /  Your IP : 216.73.216.74
Web Server : nginx/1.30.1
System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/libcloud/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/libcloud/__pycache__/http.cpython-312.pyc
�

�q�a�)���dZddlZddlZddlZddlmZddlmZddlZ	ddl
mZmZddgZ
dZd	Zd
ZdZGd�d
e�ZGd�de�ZGd�de�ZGd�de�Zy)z|
Subclass for httplib.HTTPSConnection with optional certificate name
verification, depending on libcloud.security settings.
�N)�HTTPAdapter)�PoolManager)�urlparse�PY3�LibcloudBaseConnection�LibcloudConnection��<�
http_proxy�https_proxyc�&��eZdZ�fd�Zdd�Z�xZS)�SignedHTTPSAdapterc�F��||_||_tt|��y�N)�	cert_file�key_file�superr�__init__)�selfrr�	__class__s   ��//usr/lib/python3/dist-packages/libcloud/http.pyrzSignedHTTPSAdapter.__init__.s���"��� ��
�
� �$�0�2�c�V�t||||j|j��|_y)N)�	num_pools�maxsize�blockrr)rrr�poolmanager)r�connectionsrrs    r�init_poolmanagerz#SignedHTTPSAdapter.init_poolmanager3s%��&�!�7���n�n��]�]�	$��r)F)�__name__�
__module__�__qualname__rr�
__classcell__)rs@rrr-s
���3�
$rrc�V�eZdZdZdZdZdZdZdZdZ	dZ
dZd�Zd�Z
d�Zd�Zd�Zd
d	�Zy)rzk
    Base connection class to inherit from.

    Note: This class should not be instantiated directly.
    NFc�6�tj�|_yr)�requests�Session�session�rs rrzLibcloudBaseConnection.__init__Os���'�'�)��rc���|j|��}|d}|d}|d}|d}|d}||_||_||_||_||_d|_||d�|j_y	)
as
        Set a HTTP proxy which will be used with this connection.

        :param proxy_url: Proxy URL (e.g. http://<hostname>:<port> without
                          authentication and
                          http://<username>:<password>@<hostname>:<port> for
                          basic auth authentication information.
        :type proxy_url: ``str``
        ��	proxy_urlrr	���T��http�httpsN)	�_parse_proxy_url�proxy_scheme�
proxy_host�
proxy_port�proxy_username�proxy_password�http_proxy_usedr(�proxies)rr,�result�scheme�host�port�username�passwords        r�set_http_proxyz%LibcloudBaseConnection.set_http_proxyRs����&�&��&�;�������a�y���a�y���!�9���!�9��"���������&���&���#����� 
����rc��tj|�}|jdvrtd��|jr|jstd��|j}|j|j}}|j
}d|vrK|j
dd�d}|j
dd�}t|�dkrtd	��|d|d}
}	nd
}	d
}
||||	|
fS)z�
        Parse and validate a proxy URL.

        :param proxy_url: Proxy URL (e.g. http://hostname:3128)
        :type proxy_url: ``str``

        :rtype: ``tuple`` (``scheme``, ``hostname``, ``port``)
        r0z)Only http and https proxies are supportedzOproxy_url must be in the following format: <scheme>://<proxy host>:<proxy port>�@r	r�:r-zURL is in an invalid formatN)rr<�
ValueError�hostnamer>�netloc�split�len)rr,�parsedr4r5r6rG�username_passwordrHr7r8s           rr3z'LibcloudBaseConnection._parse_proxy_urlps����"�"�9�-���=�=� 1�1��H�I�I����f�k�k��D�E�
E��}�}��!'���&�+�+�J�
������&�=� &���S�!� 4�Q� 7��%�+�+�C��3�E��5�z�A�~� �!>�?�?�-2�1�X�u�Q�x�N�N�!�N�!�N��j�*�n�� �	 rc�B�tjj|_yr)�libcloud�security�VERIFY_SSL_CERT�verifyr)s r�
_setup_verifyz$LibcloudBaseConnection._setup_verify�s���'�'�7�7��rc���|jdtjj�}|jduryt|t�r'd}tj|t�|d|_
y||_
y)N�ca_certFz�Providing a list of CA trusts is no longer supported since libcloud 2.0. Using the first element in the list. See http://libcloud.readthedocs.io/en/latest/other/changes_in_2_0.html#providing-a-list-of-ca-trusts-is-no-longer-supportedr)�getrMrN�
CA_CERTS_PATHrP�
isinstance�list�warnings�warn�DeprecationWarningrS)r�kwargs�
ca_certs_path�msgs    r�_setup_ca_certz%LibcloudBaseConnection._setup_ca_cert�se���
�
�9�h�.?�.?�.M�.M�N�
��;�;�%����-��.�'���
�
�c�#5�6�,�Q�/���,��rc�P�|jjdt||��y)z\
        Setup request signing by mounting a signing
        adapter to the session
        zhttps://N)r(�mountr)rrrs   r�_setup_signingz%LibcloudBaseConnection._setup_signing�s ��
	
�����:�'9�)�X�'N�Or)NN)r r!r"�__doc__r(r4r5r6r7r8r9rSrrAr3rQr^ra�rrrr;sQ����G��L��J��J��N��N��O��G�*�
�<$ �L8�-�&Prc��eZdZdZdZdZdd�Zed��Z		dd�Z			dd�Z
d�Zd�Zed��Z
ed	��Zd
�Zd�Zd�Zd
�Zy)rNc�B�|�|rdnd}dj|dk(rdn|||dvrdj|�nd�|_tjj	t
d�}tjj	t|�}|jd|�}|j�|j�tj|�|jd	t�|j_d
|vsd|vr|jd
i|��|r|j!|��yy)Nr2r1z{0}://{1}{2}�)�Prfz:{0}�r,�timeoutrrr+rc)�formatr=�os�environrT�HTTPS_PROXY_ENV_VARIABLE_NAME�HTTP_PROXY_ENV_VARIABLE_NAME�poprQr^rr�DEFAULT_REQUEST_TIMEOUTr(rirarA)	rr=r>�securer[r<�https_proxy_url_env�http_proxy_url_envr,s	         rrzLibcloudConnection.__init__�s��"�.�6��v��"�)�)��s�{�G���#'�y�#8�F�M�M�$��b�
��	�!�j�j�n�n�-J�-1�3���Z�Z�^�^�,H�,?�A���J�J�{�,>�?�	����������'�'��-�%�z�z�)�5L�M������&� �J�&�$8��D���)�&�)�����)��4�rc�J�|j�|jS|jS)zN
        The option for SSL verification given to underlying requests
        )rSrPr)s r�verificationzLibcloudConnection.verification�s ��
 $�|�|�7�t�|�|�H�T�[�[�Hrc��tj|j|�}|j|��}|jj|j
�|||t||j|jj|��	|_
y)N��headers)	�method�url�datarx�allow_redirects�streamrPri�hooks)r�urljoinr=�_normalize_headersr(�request�lower�ALLOW_REDIRECTSruri�response)rryrz�bodyrx�rawr}r~s        rr�zLibcloudConnection.request�sw�����t�y�y�#�.���)�)�'�)�:�����,�,��<�<�>����+���$�$��L�L�(�(��-�

��
rc�P�|j|��}tj|dj|j|g�||��}|j
j
|�}|j
j|||j�|jn|j��|_
y)Nrwrh)r{rx)r}rP)r�r&�Request�joinr=r(�prepare_request�sendrSrPr�)	rryrzr�rxr�r}�req�preppeds	         r�prepared_requestz#LibcloudConnection.prepared_request�s����)�)�'�)�:�����v�r�w�w��	�	�3�/?�'@�$(�'�;���,�,�.�.�s�3�����)�)���#'�<�<�#;�4�<�<����*�N��
rc��|jSr)r�r)s r�getresponsezLibcloudConnection.getresponse�s���}�}�rc��d|jjvr|jjd=|jjS)Nzcontent-encoding)r�rxr)s r�
getheaderszLibcloudConnection.getheaderss9������!6�!6�6��
�
�%�%�&8�9��}�}�$�$�$rc�.�|jjSr)r��status_coder)s r�statuszLibcloudConnection.status	s���}�}�(�(�(rc�d�|jjdkDrdS|jjS)Ni�)r�r��textr)s r�reasonzLibcloudConnection.reason
s(���}�}�0�0�3�6�t�N�D�M�M�<N�<N�Nrc��yrrcr)s r�connectzLibcloudConnection.connects��rc�.�|jjSr)r��contentr)s r�readzLibcloudConnection.reads���}�}�$�$�$rc�8�|jj�yr)r��closer)s rr�zLibcloudConnection.closes���
�
���rc��|xsi}|j�D]*\}}t|ttf�s�t	|�||<�,|Sr)�itemsrV�int�float�str)rrx�key�values    rr�z%LibcloudConnection._normalize_headerssH���-�R��"�-�-�/�	*�J�C���%�#�u��.�"�5�z����	*��rr)NNFFN)NNFF)r r!r"rir=r�r�propertyrur�r�r�r�r�r�r�r�r�r�rcrrrr�s����G��D��H�5�>�I��I�AF�$(�
�"26�9>�N��%��)��)��O��O�
�%��rc�l�eZdZdZd�Zdd�Zdd�Zd�Zed��Z	ed��Z
ed	��Zed
��Zy)�HttpLibResponseProxyz|
    Provides a proxy pattern around the :class:`requests.Reponse`
    object to a :class:`httplib.HTTPResponse` object
    c��||_yr)�	_response)rr�s  rrzHttpLibResponseProxy.__init__+s	��!��rNc�.�|jjSr)r�r�)r�amts  rr�zHttpLibResponseProxy.read.s���~�~�"�"�"rc��||jjj�vr|jj|S|S)zi
        Get the contents of the header name, or default
        if there is no matching header.
        )r�rx�keys)r�name�defaults   r�	getheaderzHttpLibResponseProxy.getheader1s9��
�4�>�>�)�)�.�.�0�0��>�>�)�)�$�/�/��Nrc��tr-t|jjj	��S|jjj	�S)z:
        Return a list of (header, value) tuples.
        )rrWr�rxr�r)s rr�zHttpLibResponseProxy.getheaders;s>�������.�.�4�4�6�7�7��>�>�)�)�/�/�1�1rc�.�|jjSr)r�r�r)s rr�zHttpLibResponseProxy.statusDs���~�~�)�)�)rc�.�|jjSr)r�r�r)s rr�zHttpLibResponseProxy.reasonHs���~�~�$�$�$rc��y)N�11rcr)s r�versionzHttpLibResponseProxy.versionLs��rc�.�|jjSr)r�r�r)s rr�zHttpLibResponseProxy.bodyQs���~�~�%�%�%rr)
r r!r"rbrr�r�r�r�r�r�r�r�rcrrr�r�&sk���"�#��2��*��*��%��%������&��&rr�)rbrkrXr&�requests.adaptersr�%requests.packages.urllib3.poolmanagerr�libcloud.securityrM�libcloud.utils.py3rr�__all__r�rprnrmr�objectrrr�rcrr�<module>r�s��� �

���)�=��,�����
����+�� -��$��$�vP�V�vP�ro�/�o�d/&�6�/&r

Youez - 2016 - github.com/yon3zu
LinuXploit