§
    
Á³g°  ã                   ó¢   — 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j        d	e¦  «          ee¦  «        Z G 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                   óB   ‡ — e Zd ZdZdZˆ fd„Zd„ Z	 	 	 	 	 d	ˆ fd„	Zˆ xZS )
ÚNTLMConnectionPoolzQ
    Implements an NTLM authentication version of an urllib3 connection pool
    Úhttpsc                 óö   •—  t          t          | ¦  «        j        |i |¤Ž || _        || _        |                     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ÚkwargsÚ
user_partsÚ	__class__s          €úb/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyr   zNTLMConnectionPool.__init__"   sv   ø€ ð 	1�Õ  $Ñ'Ô'Ô0°$ÐA¸&ÐAÐAÐAØˆŒØˆŒØ—Z’Z  aÑ(Ô(ˆ
Ø  ”m×)Ò)Ñ+Ô+ˆŒØ˜q”MˆŒ	ØˆŒˆˆó    c                 óZ  — | xj         dz  c_         t                               d| j         | j        | j        ¦  «         ddi}d}d}t          | j        | j        ¬¦  «        }dt          j        | j	        ¦  «        z  ||<   t                               d	|¦  «         | 
                    d
| j        d |¦  «         |                     ¦   «         }t          |j        ¦  «        }t                               d|j        |j        ¦  «         t                               d|¦  «         t                               d|                     d¦  «        ¦  «         d |_        ||                              d¦  «        }d }|D ]}	|	d d…         dk    r
|	dd …         }Œ|€t'          d|›d||         ›�¦  «        ‚t          j        |¦  «        \  }
}t          j        |
| j        | j        | j        |¦  «        }d|z  ||<   t                               d	|¦  «         | 
                    d
| j        d |¦  «         |                     ¦   «         }t                               d|j        |j        ¦  «         t                               dt          |j        ¦  «        ¦  «         t                               d|                     ¦   «         d d…         ¦  «         |j        dk    r9|j        dk    rt'          d¦  «        ‚t'          d|j        ›d|j        ›�¦  «        ‚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 z response header: éÈ   i‘  z3Server rejected request: wrong username or passwordzWrong server response: ú zConnection established)Únum_connectionsÚlogÚdebugr#   r   r   r$   r   Úcreate_NTLM_NEGOTIATE_MESSAGEr   ÚrequestÚgetresponseÚdictÚheadersÚstatusÚreasonÚreadÚfpr   Ú	ExceptionÚparse_NTLM_CHALLENGE_MESSAGEÚ create_NTLM_AUTHENTICATE_MESSAGEr   r   r   )r   r1   Ú
req_headerÚresp_headerÚconnÚresÚreshdrÚauth_header_valuesÚauth_header_valueÚsÚServerChallengeÚNegotiateFlagsÚauth_msgs                r   Ú	_new_connzNTLMConnectionPool._new_conn0   s  € ð 	ÐÔ Ñ!ÐÔÝ�	Š	ØAØÔ ØŒIØŒLñ		
ô 	
ð 	
ð   Ð.ˆØ$ˆ
Ø(ˆå D¤I°D´IÐ>Ñ>Ô>ˆð (­$Ô*LØŒLñ+
ô +
ñ 
ˆ�
Ñõ 	�	Š	Ð'¨Ñ1Ô1Ð1Ø�Š�U˜DœL¨$°Ñ8Ô8Ð8Ø×ÒÑ Ô ˆÝ�c”kÑ"Ô"ˆÝ�	Š	Ð*¨C¬J¸¼
ÑCÔCÐCÝ�	Š	Ð(¨&Ñ1Ô1Ð1Ý�	Š	Ð+¨S¯XªX°c©]¬]Ñ;Ô;Ð;ð ˆŒð $ KÔ0×6Ò6°tÑ<Ô<ÐØ ÐØ#ð 	*ð 	*ˆAØ��!�Œu˜ÒÐØ$% a b b¤EÐ!øØÐ$Ý�)Ø7B°{°{ÀFÈ;ÔDWÐDWÐXñô ð õ
 +/Ô*KØñ+
ô +
Ñ'ˆ˜õ Ô8Ø˜TœY¨¬°T´W¸nñ
ô 
ˆð (¨(Ñ2ˆ�
ÑÝ�	Š	Ð'¨Ñ1Ô1Ð1Ø�Š�U˜DœL¨$°Ñ8Ô8Ð8Ø×ÒÑ Ô ˆÝ�	Š	Ð*¨C¬J¸¼
ÑCÔCÐCÝ�	Š	Ð(­$¨s¬{Ñ*;Ô*;Ñ<Ô<Ð<Ý�	Š	Ð+¨S¯XªX©Z¬Z¸¸¸Ô-=Ñ>Ô>Ð>ØŒ:˜ÒÐØŒz˜SÒ Ð ÝÐ UÑVÔVÐVÝ�)¸c¼j¸j¸jÈ#Ì*È*ÐUÑVÔVÐVàˆŒÝ�	Š	Ð*Ñ+Ô+Ð+Øˆr   Né   Tc           	      ór   •— |€i }d|d<   t          t          | ¦  «                             |||||||¦  «        S )Nr!   r    )r   r
   Úurlopen)	r   ÚmethodÚurlÚbodyr1   ÚretriesÚredirectÚassert_same_hostr   s	           €r   rG   zNTLMConnectionPool.urlopens   sL   ø€ ð ˆ?ØˆGØ ,ˆ�ÑÝÕ'¨Ñ.Ô.×6Ò6Ø�C˜˜w¨°Ð;Kñ
ô 
ð 	
r   )NNrE   TT)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úschemer   rD   rG   Ú__classcell__)r   s   @r   r
   r
      s‹   ø€ € € € € ðð ð €Fðð ð ð ð ðAð Að AðN ØØØØð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r   r
   )rQ   Ú
__future__r   ÚwarningsÚloggingr   r   Ú r   Úpackages.six.moves.http_clientr   ÚwarnÚDeprecationWarningrN   r+   r
   © r   r   ú<module>r\      så   ððð ð
 'Ð &Ð &Ð &Ð &Ð &à €€€Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "Ø <Ð <Ð <Ð <Ð <Ð <à €„ðNð ñô ð ð €i�ÑÔ€ðg
ð g
ð g
ð g
ð g
Ð,ñ g
ô g
ð g
ð g
ð g
r   