403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/network/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/network/__pycache__/session.cpython-311.pyc
�

�/�cH���UdZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
ZddlZddlmZmZmZmZmZmZmZmZmZmZddlmZmZddlmZ ddl!m"Z"m#Z#ddl!m$Z%ddl&m'Z'm(Z(dd	l)m*Z*dd
l+m,Z,ddl-m.Z.ddl/m0Z0dd
l1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;m<Z<ddl=m>Z>m?Z?ddl@mAZAerddlBmCZCddlDmEZEejFeG��ZHeeIeIeeeJeIffZKejLde.���gd�ZMeeKeNd<dZOdePfd�ZQdeIfd�ZRGd�d e#��ZSGd!�d"��ZTGd#�d$eTe%��Z$Gd%�d&eTe ��ZGd'�d(e$��ZUGd)�d*e��ZVGd+�d,ejW��ZXdS)-zhPipSession and supporting code, containing all pip-specific
network request configuration and behavior.
�N)
�
TYPE_CHECKING�Any�Dict�	Generator�List�Mapping�Optional�Sequence�Tuple�Union)�requests�urllib3)�CacheControlAdapter)�DEFAULT_POOLBLOCK�BaseAdapter)�HTTPAdapter)�PreparedRequest�Response)�CaseInsensitiveDict)�ConnectionPool)�InsecureRequestWarning)�__version__)�get_default_environment)�Link)�MultiDomainBasicAuth)�
SafeFileCache)�has_tls)�libc_ver)�build_url_from_netloc�parse_netloc)�url_to_path)�
SSLContext)�PoolManager�ignore)�category))�https�*r')r'�	localhostr')r'z127.0.0.0/8r')r'z::1/128r')�filer'N)�sshr'r'�SECURE_ORIGINS)�
BUILD_BUILDID�BUILD_ID�CI�	PIP_IS_CI�returnc�>�td�tD����S)z?
    Return whether it looks like pip is running under CI.
    c3�2K�|]}|tjvV��dS�N)�os�environ)�.0�names  �?/usr/lib/python3/dist-packages/pip/_internal/network/session.py�	<genexpr>z looks_like_ci.<locals>.<genexpr>js)����G�G�d�t�r�z�!�G�G�G�G�G�G�)�any�CI_ENVIRONMENT_VARIABLES�r:r8�
looks_like_cir>cs"���G�G�.F�G�G�G�G�G�Gr:c
�l�dtd�tj��dtj��id�}|dddkrtj��|dd<n�|dddkrJtj}|jd	kr
|d
d�}d�d
�|D����|dd<n]|dddkrtj��|dd<n.|dddkrtj��|dd<tj�d��r�ddl	m
}|���|���|�
��f}ttd�t!gd�|������}ttd�t!ddgt#��������}|r||d<|r||d<tj�d��r8tj��drdtj��dd�|d<tj��r*tj��|�di��d<tj��r*tj��|�di��d<tj��rtj��|d<t/��rdd
l}|j|d<t5���d��}|�t9|j��|d <t;jd!���z	t?j d!d"gt>j!d#�$��}|�d%��r0|�"d&��d'�#��|d(<n#tH$rYnwxYwtK��rd)nd
|d*<tLj'�(d+��}	|	�|	|d,<d-�)|tUj+|d.d)�/���0��S)1z6
    Return a string representing the user agent.
    �pip)r7�versionr7)�	installer�python�implementationrD�CPythonrA�PyPy�finalN��.c�,�g|]}t|����Sr=)�str)r6�xs  r8�
<listcomp>zuser_agent.<locals>.<listcomp>�s��/�/�/��S��V�V�/�/�/r:�Jython�
IronPython�linuxr)�distroc��|dS�N�r=�rLs r8�<lambda>zuser_agent.<locals>.<lambda>��
��!�A�$�r:)r7rA�idc��|dSrSr=rUs r8rVzuser_agent.<locals>.<lambda>�rWr:�lib�libcrQ�darwin�macOS�system�release�cpu�openssl_version�
setuptools�setuptools_version�rustcz	--versiong�?)�stderr�timeoutsrustc � rT�
rustc_versionT�ci�PIP_USER_AGENT_USER_DATA�	user_dataz9{data[installer][name]}/{data[installer][version]} {json})�,�:)�
separators�	sort_keys)�data�json),r�platform�python_version�python_implementation�sys�pypy_version_info�releaselevel�join�
startswith�pip._vendorrQr7rA�codename�dict�filter�zipr�mac_verr^�
setdefaultr_�machiner�_ssl�OPENSSL_VERSIONr�get_distributionrK�shutil�which�
subprocess�check_output�STDOUT�split�decode�	Exceptionr>r4r5�get�formatrq�dumps)
rprvrQ�linux_distribution�distro_infosr[�ssl�setuptools_dist�rustc_outputrks
          r8�
user_agentr�msk��
$��<�<��)�+�+��H�2�4�4�
���D����f�%��2�2�,4�,C�,E�,E��
��y�)�)�	
��	��	'�6�	1�	1��1���)�W�4�4� 1�"�1�"� 5��,/�H�H�/�/�.�/�/�/�-
�-
��
��y�)�)�
��	��	'�8�	3�	3�,4�,C�,E�,E��
��y�)�)�	
��	��	'�<�	7�	7�,4�,C�,E�,E��
��y�)�
�|���w�'�'�*�&�&�&�&�&�&�#�[�[�]�]�F�N�N�,<�,<�f�o�o�>O�>O�O��'+�����-�-�-�/A�B�B�
�
�(
�(
�������U�I�&��
�
�3�3�
�
�
�
���	(�#'�L�� ��	*�)�D��N�
�|���x�(�(�M�X�-=�-?�-?��-B�M�")�h�6F�6H�6H��6K�L�L��X������B�08��0A�0A�����"�%�%�f�-�����F�3;�3C�3E�3E�����"�%�%�i�0�����)��&�(�(��U���y�y�6�����"%�"5��
��-�/�/�@�@��N�N�O��"�%(��)@�%A�%A��
!�"�
�|�G���(�	M�%�2��+�&�z�/@�#����L��&�&�y�1�1�
M�)5�(:�(:�4�(@�(@��(C�(J�(J�(L�(L��_�%����	�	�	��D�	����'���2���d�D��J��
���9�:�:�I���%��[��F�M�M�
�
�Z���t�
D�
D�
D�N���s�#N?�?
O�Oc���eZdZ					d
dededeeeeeeffdeee	fdeee	ee	e	ffd	ee
e	e	fd
efd�Zdd�Z
dS)�LocalFSAdapterFNT�request�streamrf�verify�cert�proxiesr0c��t|j��}t��}d|_|j|_	t	j|��}	tj�|	j	d���}
tj|��dpd}t||	j
|
d���|_t|d��|_|jj|_nm#t$$r`}d|_t'|��j|_t-j|j�d	|���d
����|_Yd}~nd}~wwxYw|S)N��T)�usegmtrz
text/plain)zContent-TypezContent-Lengthz
Last-Modified�rbi�z: �utf8)r!�urlr�status_coder4�stat�email�utils�
formatdate�st_mtime�	mimetypes�
guess_typer�st_size�headers�open�raw�close�OSError�type�__name__�reason�io�BytesIO�encode)
�selfr�r�rfr�r�r��pathname�resp�stats�modified�content_type�excs
             r8�sendzLocalFSAdapter.send�s>���w�{�+�+���z�z������;���	(��G�H�%�%�E��{�-�-�e�n�T�-�J�J�H�$�/��9�9�!�<�L��L�.�$0�&+�m�%-�����D�L��H�d�+�+�D�H����D�J�J��%�	J�	J�	J� #�D���s�)�)�,�D�K��z�T�[�"9�"9�C�"9�"9�"@�"@��"H�"H�I�I�D�H�H�H�H�H�H�����	J����(�s�C�
D;�AD6�6D;c��dSr3r=)r�s r8r�zLocalFSAdapter.close�s���r:)FNTNN)r0N)r��
__module__�__qualname__r�boolr	r�floatrrKrrr�r�r=r:r8r�r��s��������?C�#'�6:�/3�%�%� �%��%��%��u�U�E�\�':� :�;�<�	%�
�d�C�i� �%��u�S�%��S��/�1�2�3�
%��'�#�s�(�+�,�%�
�%�%�%�%�N
�
�
�
�
�
r:r�c�f��eZdZdZdd�deddeddf�fd�Zefd	ed
ede	dedd
f
�fd�
Z
�xZS)�_SSLContextAdapterMixina#Mixin to add the ``ssl_context`` constructor argument to HTTP adapters.

    The additional argument is forwarded directly to the pool manager. This allows us
    to dynamically decide what SSL store to use at runtime, which is used to implement
    the optional ``truststore`` backend.
    N)�ssl_contextr�r"�kwargsr0c�H��||_t��jdi|��dS)Nr=)�_ssl_context�super�__init__)r�r�r��	__class__s   �r8r�z _SSLContextAdapterMixin.__init__s0���(��������"�"�6�"�"�"�"�"r:�connections�maxsize�block�pool_kwargsr#c���|j�|�d|j��t��jd|||d�|��S)Nr�)r�r�r�r=)r�r�r��init_poolmanager)r�r�r�r�r�r�s     �r8r�z(_SSLContextAdapterMixin.init_poolmanagers_�����(��"�"�=�$�2C�D�D�D�'�u�w�w�'�
�#���
�
��	
�
�	
r:)r�r�r��__doc__r	rr�r�intr�r��
__classcell__�r�s@r8r�r��s����������/3�#�#�#��l�+�#��	#�

�#�#�#�#�#�#�(�	
�
��
��
��	
�
�
�
�

�
�
�
�
�
�
�
�
�
r:r�c��eZdZdS)rN�r�r�r�r=r:r8rr ��������Dr:rc��eZdZdS)rNr�r=r:r8rr$r�r:rc
�p��eZdZdededeeefdeeeeeeffddf
�fd�Z	�xZ
S)�InsecureHTTPAdapter�connr�r�r�r0Nc�R��t���||d|���dS�NF)r�r�r�r��r��cert_verify�r�r�r�r�r�r�s     �r8r�zInsecureHTTPAdapter.cert_verify)�,���	������3�u�4��H�H�H�H�Hr:�r�r�r�rrKrr�r	rr�r�r�s@r8r�r�(��������I��I��I��d�C�i� �	I�
�u�S�%��S��/�1�2�3�I�
�
I�I�I�I�I�I�I�I�I�Ir:r�c
�p��eZdZdededeeefdeeeeeeffddf
�fd�Z	�xZ
S)�InsecureCacheControlAdapterr�r�r�r�r0Nc�R��t���||d|���dSr�r�r�s     �r8r�z'InsecureCacheControlAdapter.cert_verify4r�r:r�r�s@r8r�r�3r�r:r�c�8��eZdZUdZeeed<dddddd�dededeed	e	ed
ee
ededd
eddf�fd�Zde
eddfd�Z	ddedeede
ddfd�Zdeeddffd�Zdede
fd�Zdededed
edef
�fd�Z�xZS)�
PipSessionNrfrr=)�retries�cache�
trusted_hosts�
index_urlsr��argsr�r�r�r�r�r"r�r0c�~��t��j|i|��g|_t��|jd<t|���|_tj|gd�d���}t|���}|rCtt|��||���}	tt|��|���|_
nt||�	��}	||_
|�d
|	��|�d|��|�dt!����|D]}
|�|
d
����dS)zj
        :param trusted_hosts: Domains not to emit warnings for when not using
            HTTPS.
        z
User-Agent)r�)i�i�iig�?)�total�status_forcelist�backoff_factor)�max_retries)r�r�r�)r�r�)r�r�zhttps://zhttp://zfile://T)�suppress_loggingN)r�r��pip_trusted_originsr�r�r�authr�Retryr�rrr��_trusted_host_adapterr�mountr��add_trusted_host)r�r�r�r�r�r�r�r��insecure_adapter�secure_adapter�hostr�s           �r8r�zPipSession.__init__Bs����	�����$�)�&�)�)�)�EG�� �&0�\�\���\�"�)�J�?�?�?��	��-��2�1�1� �
�
�
��*/�7�C�C�C���	:�0�#�E�*�*�#�'����N�
*E�#�E�*�*�#�*�*�*�D�&�&�
)�W�+�V�V�V�N�)9�D�&��
�
�:�~�.�.�.��
�
�9�.�/�/�/�	
�
�
�9�n�.�.�/�/�/�!�	?�	?�D��!�!�$��!�>�>�>�>�	?�	?r:�new_index_urlsc��||j_dS)zn
        :param new_index_urls: New index urls to update the authentication
            handler with.
        N)r�r�)r�r�s  r8�update_index_urlszPipSession.update_index_urls�s��
 .��	���r:Fr��sourcer�c�6�|s*d|��}|�	|d|�d�z
}t�|��t|��}||jvr|j�|��|�t
|d���dz|j��|�t
|��dz|j��|dsZ|�t
|d���d	z|j��|�t
|��d	z|j��dSdS)
z�
        :param host: It is okay to provide a host that has previously been
            added.
        :param source: An optional source string, for logging where the host
            string came from.
        zadding trusted host: Nz (from �)�http)�scheme�/rTrm)�logger�infor r��appendr�rr�)r�r�rr��msg�	host_ports      r8r�zPipSession.add_trusted_host�sG�� �	�2�$�2�2�C��!��*��*�*�*�*���K�K����� ��&�&�	��D�4�4�4��$�+�+�I�6�6�6��
�
�!�$�v�6�6�6��<�d�>X�	
�	
�	
�	
�
�
�(��.�.��4�d�6P�Q�Q�Q���|�	V��J�J�%�d�6�:�:�:�S�@��*�
�
�
�

�J�J�,�T�2�2�S�8�$�:T�U�U�U�U�U�
	V�	Vr:c#�TK�tEd{V��|jD]\}}d||�dn|fV��dS)Nr')r+r�)r�r��ports   r8�iter_secure_originszPipSession.iter_secure_origins�s\����!�!�!�!�!�!�!�!��2�	=�	=�J�D�$���T�\�c�c�t�<�<�<�<�<�	=�	=r:�locationc�X�tj�t|����}|j|j|j}}}|�dd��d}|���D]�}|\}}}	||kr|dkr�	tj
|pd��}
tj|��}|
|vr�EnD#t$r7|r2|�
��|�
��kr|dkrY��YnwxYw||	kr	|	dkr|	���dSt�d||��dS)	N�+rT���r'�Tz�The repository located at %s is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host %s'.F)�urllib�parse�urlparserKr�hostnamer�rsplitr�	ipaddress�
ip_address�
ip_network�
ValueError�lowerr�warning)r�r�parsed�origin_protocol�origin_host�origin_port�
secure_origin�secure_protocol�secure_host�secure_port�addr�networks            r8�is_secure_originzPipSession.is_secure_origin�s�����&�&�s�8�}�}�5�5���M��O��K�'2���*�0�0��a�8�8��<��
"�5�5�7�7�!	�!	�M�8E�5�O�[�+��/�1�1�o��6L�6L��
� �+�K�,=�2�>�>��#�.�{�;�;���w�&�&��'���
�
�
� ��#�)�)�+�+�{�/@�/@�/B�/B�B�B�#�s�*�*��H���
����"�{�*�*��3�&�&��+���4�4�
	���
I�
��
	
�	
�	
��us�*B8�8<C9�8C9�methodr�c���|�d|j��|�d|j��t��j||g|�Ri|��S)Nrfr�)r�rfr�r�r�)r�r+r�r�r�r�s     �r8r�zPipSession.request�s]������)�T�\�2�2�2����)�T�\�2�2�2��u�w�w��v�s�<�T�<�<�<�V�<�<�<r:)NF)r�r�r�rfr	r��__annotations__rrKr
rr�rr�r�r�SecureOriginrrr*rr�r�r�s@r8r�r�>s���������!�G�X�c�]�!�!�!�
�#�')�*.�.2�M?�M?�M?��M?��M?���}�	M?�
 ��}�M?��T�#�Y�'�
M?��l�+�M?��M?�
�M?�M?�M?�M?�M?�M?�^.��S�	�.�d�.�.�.�.�QV�V�V��V�!)�#��V�IM�V�	
�V�V�V�V�>=�Y�|�T�4�/G�%H�=�=�=�=�
A��A�$�A�A�A�A�F=�c�=��=�C�=�3�=�8�=�=�=�=�=�=�=�=�=�=r:r�)Yr��email.utilsr�r�rrq�loggingr�r4rrr�r�ru�urllib.parser�warnings�typingrrrrrrr	r
rrrzr
r�pip._vendor.cachecontrolr�_BaseCacheControlAdapter�pip._vendor.requests.adaptersrrr�_BaseHTTPAdapter�pip._vendor.requests.modelsrr�pip._vendor.requests.structuresr�"pip._vendor.urllib3.connectionpoolr�pip._vendor.urllib3.exceptionsrr@r�pip._internal.metadatar�pip._internal.models.linkr�pip._internal.network.authr�pip._internal.network.cacher�pip._internal.utils.compatr�pip._internal.utils.glibcr�pip._internal.utils.miscrr �pip._internal.utils.urlsr!r�r"�pip._vendor.urllib3.poolmanagerr#�	getLoggerr�rrKr�r.�filterwarningsr+r-r<r�r>r�r�r�r�r��Sessionr�r=r:r8�<module>rHs����������	�	�	�	�����������������	�	�	�	�����
�
�
�
�����
�
�
�
���������������������������������*�)�)�)�)�)�)�)�T�T�T�T�T�T�H�H�H�H�H�H�H�H�I�I�I�I�I�I�A�A�A�A�A�A�A�A�?�?�?�?�?�?�=�=�=�=�=�=�A�A�A�A�A�A�������:�:�:�:�:�:�*�*�*�*�*�*�;�;�;�;�;�;�5�5�5�5�5�5�/�.�.�.�.�.�.�.�.�.�.�.�H�H�H�H�H�H�H�H�0�0�0�0�0�0��<�������;�;�;�;�;�;�
��	�8�	$�	$���S�#�x��c�3�h��8�8�9������+A�B�B�B�B�
&�
&�
&���\�"�
�
�
�(	��H�t�H�H�H�H�b�C�b�b�b�b�J)
�)
�)
�)
�)
�[�)
�)
�)
�X
�
�
�
�
�
�
�
�D	�	�	�	�	�)�+;�	�	�	�	�	�	�	�	�1�3K�	�	�	�I�I�I�I�I�+�I�I�I�I�I�I�I�I�"5�I�I�I�H=�H=�H=�H=�H=��!�H=�H=�H=�H=�H=r:

Youez - 2016 - github.com/yon3zu
LinuXploit