£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
U
    ʗRe                     @   sp   d Z ddlmZ ddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 ed	e eeZG d
d deZdS )z
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
    )absolute_importN)	getLogger)ntlm   )HTTPSConnectionPool)HTTPSConnectiona#  The 'urllib3.contrib.ntlmpool' module is deprecated and will be removed in urllib3 v2.0 release, urllib3 is not able to support it properly due to reasons listed in issue: https://github.com/urllib3/urllib3/issues/2282. If you are a user of this module please comment in the mentioned issue.c                       s:   e Zd ZdZdZ fddZdd Zd fd
d	Z  ZS )NTLMConnectionPoolzQ
    Implements an NTLM authentication version of an urllib3 connection pool
    httpsc                    sL   t t| j|| || _|| _|dd}|d  | _|d | _|| _	dS )z
        authurl is a random URL on the server that is protected by NTLM.
        user is the Windows user, probably in the DOMAIN\username format.
        pw is the password for the user.
        \   r   N)
superr   __init__authurlrawusersplitupperdomainuserpw)selfr   r   r   argskwargsZ
user_parts	__class__ /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyr   "   s    
zNTLMConnectionPool.__init__c                 C   s  |  j d7  _ td| j | j| j ddi}d}d}t| j| jd}dt| j	 ||< td	| |
d
| jd | | }t| }td|j|j td| td|d d |_|| d}d }|D ] }	|	d d dkr|	dd  }q|d krtd||| f t|\}
}t|
| j| j| j|}d| ||< td	| |
d
| jd | | }td|j|j tdt|  td| d d  |jdkr|jdkrtdtd|j|jf d |_td |S )Nr   z3Starting NTLM HTTPS connection no. %d: https://%s%s
Connection
Keep-AliveAuthorizationzwww-authenticate)hostportzNTLM %szRequest headers: %sGETzResponse status: %s %szResponse headers: %szResponse data: %s [...]d   z,    zNTLM z!Unexpected %s response header: %s   i  z3Server rejected request: wrong username or passwordzWrong server response: %s %szConnection established)num_connectionslogdebugr   r   r   r    r   Zcreate_NTLM_NEGOTIATE_MESSAGEr   requestgetresponsedict
getheadersstatusreasonreadfpr   	ExceptionZparse_NTLM_CHALLENGE_MESSAGEZ create_NTLM_AUTHENTICATE_MESSAGEr   r   r   )r   headersZ
req_headerZresp_headerconnresZreshdrZauth_header_valuesZauth_header_valuesZServerChallengeZNegotiateFlagsZauth_msgr   r   r   	_new_conn0   sn    

    
zNTLMConnectionPool._new_connN   Tc              	      s0   |d kri }d|d< t t| |||||||S )Nr   r   )r   r   urlopen)r   methodurlbodyr1   retriesredirectassert_same_hostr   r   r   r7   s   s    

      zNTLMConnectionPool.urlopen)NNr6   TT)	__name__
__module____qualname____doc__schemer   r5   r7   __classcell__r   r   r   r   r      s   G     r   )rA   
__future__r   warningsloggingr   r    r   Zpackages.six.moves.http_clientr   warnDeprecationWarningr>   r&   r   r   r   r   r   <module>   s   