Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/requests_toolbelt/auth/__pycache__/ |
Upload File : |
o �ˀXP � @ sR d Z ddlmZ ddlmZ ddlmZmZ G dd� dej�Z G dd � d e �Z d S )z-The module containing the code for GuessAuth.� )�auth)�cookies� )�_digest_auth_compat�http_proxy_digestc @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� ZdS ) � GuessAuthz7Guesses the auth type by the WWW-Authentication header.c C s || _ || _d | _d | _d S �N)�username�passwordr �pos)�selfr r � r �>/usr/lib/python3/dist-packages/requests_toolbelt/auth/guess.py�__init__ s zGuessAuth.__init__c C s� | j d ur |jj�| j � |j |j�� |j�� }t|d�s$t � � |_t �|j|j|j� |� |j� t�| j| j�| _| �|�}|jj|fi |��}|j�|� ||_|S �N�_cookies)r �request�body�seek�content�raw�release_conn�copy�hasattrr �RequestsCookieJarr �extract_cookies_to_jar�prepare_cookiesr � HTTPBasicAuthr r � connection�send�history�append�r �r�kwargs�prep�_rr r r �_handle_basic_auth_401 s z GuessAuth._handle_basic_auth_401c C sh t �| j| j�| _z| j�� W n ty Y nw t| jd�r*| jjd u r*d| j_| jj |fi |��S )N� num_401_callsr ) �auth_compat�HTTPDigestAuthr r r �init_per_thread_state�AttributeErrorr r( � handle_401�r r# r$ r r r �_handle_digest_auth_401'