<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
Re@                 @   s\   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 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_import)	getLogger)ntlm   )HTTPSConnectionPool)HTTPSConnectionc                   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|| || _|| _|jdd}|d j | _|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-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyr      s    
zNTLMConnectionPool.__init__c             C   s  |  j d7  _ tjd| j | j| j ddi}d}d}t| j| jd}dtj| j	 ||< tjd	| |j
d
| jd | |j }t|j }tjd|j|j tjd| tjd|jd d |_|| jd}d }x(|D ] }	|	d d dkr|	dd  }qW |d krtd||| f tj|\}
}tj|
| j| j| j|}d| ||< tjd	| |j
d
| jd | |j }tjd|j|j tjdt|j  tjd|j d d  |jdkr|jdkrtdtd|j|jf d |_tjd |S )Nr   z3Starting NTLM HTTPS connection no. %d: https://%s%s
Connectionz
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_conn'   s\    



zNTLMConnectionPool._new_connN   Tc                s0   |d kri }d|d< t t| j|||||||S )Nz
Keep-Aliver   )r   r   urlopen)r   methodurlbodyr/   retriesredirectassert_same_host)r   r   r   r5   j   s
    

zNTLMConnectionPool.urlopen)NNr4   TT)	__name__
__module____qualname____doc__schemer   r3   r5   __classcell__r   r   )r   r   r      s   G    r   N)r?   
__future__r   loggingr   r    r   Zpackages.six.moves.http_clientr   r<   r$   r   r   r   r   r   <module>   s   