__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.217.0: ~ $
�

>r*j���B�UdZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZmZddlmZmZmZmZmZmZddlmZmZdd	lmZdd
lmZddl m!Z!m"Z"m#Z#m$Z$ddl%m&Z'dd
l(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5ddl(m6Z7ddl8m9Z9ddl:m;Z;m<Z<m=Z=m>Z>ddl?m@Z@erddlAmBZBddlmCZCddlm%ZDddlEmFZFmGZGmHZHdZIdeJd<ej��ZLdeJd<ddd�ZMdeJd<ed�ZNed �ZOd!j�ej�d"ed#�$�d%��ZRdeJd&<e
j�d'k(rd\d(�ZTd\d)�Z/				d]d*�ZUd^d+�ZV	d_					d`d,�ZWdad-�ZXdbd.�ZYej�dcd/��Z[				ddd0�Z\eded1��Z]e				dfd2��Z]				dgd3�Z]dhd4�Z^did5�Z_d_djd6�Z`dkd7�Zadld8�Zbdmd9�Zcdnd:�Zddod;�Ze						dpd<�Zfe						dqd=��Zge						drd>��Zg						dsd?�Zgdtd@�ZheidA�ZjdeJdB<dudC�ZkdudD�ZldvdE�ZmdwdF�ZndxdG�ZodydH�Zpej�dzdI��Zqd{dJ�Zrd|d}dK�Zsd~dL�Zt	d							d�dM�Zud�d�dN�Zvd�dO�Zwd�dP�ZxdQj�dR�ZzezdSzZ{ezdTzZ|d�dU�Z}d�dV�Z~d�dW�Zd�dX�Z�								d�dY�Z�d�dZ�Z�d�d[�Z�y)�z�
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.
�)�annotationsN)�OrderedDict)�	Generator�Iterable)�
TYPE_CHECKING�Any�Final�TypeVar�cast�overload)�make_headers�	parse_url�)�certs��__version__)�_HEADER_VALIDATORS_BYTE�_HEADER_VALIDATORS_STR�HEADER_VALIDATORS�to_native_string)�
SupportsItems)
�Mapping�bytes�
getproxies�getproxies_environment�
integer_types�is_urllib3_1�proxy_bypass�proxy_bypass_environment�quote�str�unquote�urlparse�
urlunparse)�parse_http_list��cookiejar_from_dict)�FileModeWarning�
InvalidHeader�
InvalidURL�UnrewindableBodyError)�CaseInsensitiveDict)�	CookieJar)�BufferedWriter)�_types)�PreparedRequest�Request�Response)z.netrc�_netrcr	�NETRC_FILESr!�DEFAULT_CA_BUNDLE_PATH�Pi�)�http�https�
DEFAULT_PORTS�_KT�_VTz, z,\s*T)�accept_encodingzaccept-encoding�DEFAULT_ACCEPT_ENCODING�win32c��	ddl}	|j|jd�}t	|j|d�d�}|j|d�d}|r|sy|jd�}td|�}|D]j}|dk(rd|vry	|jdd
�}|jdd�}|jd
d�}tj||tj�s�jy	y#t$rYywxYw#ttf$rYywxYw)NrFz;Software\Microsoft\Windows\CurrentVersion\Internet Settings�ProxyEnable�
ProxyOverride�;z<local>�.Tz\.�*z.*�?)�winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError�
ValueError�split�filter�replace�re�match�I)�hostrF�internetSettings�proxyEnable�
proxyOverride�tests      �=/opt/hc_python/lib/python3.12/site-packages/requests/utils.py�proxy_bypass_registryrZcs ��	��
	�%�~�~��(�(�N� ��
�f�1�1�2B�M�R�ST�U�V�K�"�/�/�0@�/�R�ST�U�M��-��
&�+�+�C�0�
��t�]�3�
�!�D��y� ��d�?���<�<��U�+�D��<�<��U�+�D��<�<��T�*�D��x�x��d�B�D�D�)��"���C�	��	����$�	��	�s#�C(�AC7�(	C4�3C4�7D	�D	c�B�t�rt|�St|�S)z�Return True, if the host should be bypassed.

        Checks proxy settings gathered from the environment, if specified,
        or the registry.
        )rrrZ)rTs rYrr�s ��"�#�+�D�1�1�(��.�.�c�F�t|t�r|j�S|S)z/Returns an internal sequence dictionary update.)�
isinstance�_SupportsItems�items)�ds rY�dict_to_sequencerb�s��
�!�^�$��w�w�y���Hr\c��d}d}ts!t|t�r|jd�}t	|d�rt|�}n~t	|d�r
|j
}net	|d�rY	|j
�}tj|�j}d|jvrtjdt�	t	|d�rW	|j#�}t	|d	�r:|�8	|j%dd
�|j#�}|j%|xsd�|�d}t)d||z
�S#tjt f$rY��wxYw#t&$rd}Y�?wxYw#t&$r|�|}Y�RwxYw)Nr�utf-8�__len__�len�fileno�ba%Requests has determined the content-length for this request using the binary size of the file: however, the file has been opened in text mode (i.e. without the 'b' flag in the mode). This may lead to an incorrect content-length. In Requests 3.0, support will be removed for files in text mode.�tell�seek�)rr^r!�encode�hasattrrfrg�os�fstat�st_size�mode�warnings�warnr(�io�UnsupportedOperation�AttributeErrorrirjrL�max)�o�total_length�current_positionrgs    rY�	super_lenr{�sy���L����J�q�#�.�
�H�H�W����q�)���1�v��	��E�	��u�u��	��H�	�	��X�X�Z�F��8�8�F�+�3�3�L��!�&�&� ��
�
�2�$�
��q�&��	%� �v�v�x���q�&�!�l�&:�	%��F�F�1�a�L�#$�6�6�8�L��F�F�+�0�q�1������q�,�!1�1�2�2��e�'�'��8�	�
�		��X�%�#$�L�%��%�	0�
�'�#/� ��
	0�s6�*D8�E(�.7E�8E�E�E%�$E%�(
E8�7E8c�`�t|t�r|jd�}tjjd�}|�|f}n
d�tD�}	ddlm}m}d}|D]D}tjj|�}tjj|�s�B|}n|�yt|�}	|	j}
|
�y	||�j|
�}|r't|�r|drdnd}||xsd|d	xsdfSyy#|t f$r|r�YywxYw#t"t$f$rYywxYw)
z;Returns the Requests tuple auth for a given url from netrc.rd�NETRCNc3�&K�|]	}d|�����y�w)z~/N�)�.0�fs  rY�	<genexpr>z!get_netrc_auth.<locals>.<genexpr>�s����9�[��R��s�8�[�s�r)�NetrcParseError�netrcr�rk)r^r�decodern�environ�getr4r�r��path�
expanduser�existsr#�hostname�authenticators�anyrLrGrv)
�url�raise_errors�
netrc_file�netrc_locationsr�r��
netrc_pathr��loc�rirTr3�login_is
             rY�get_netrc_authr��s;��
�#�u���j�j��!��������(�J���%�-��9�[�9��#
�0��
� �A��'�'�$�$�Q�'�C��w�w�~�~�c�"� �
��	!����
�c�]���{�{���<��
	��:�&�5�5�d�;�F��#�f�+�%�a�y�!�a���w��-�2�v�a�y��B�?�?�&�v�� ��)�	����	��
��(�
��
�s=�A
D�#D�+D�>D�D�D�D�D�D-�,D-c��t|dd�}|rHt|ttf�r1|ddk7r(|ddk7rtj
j
|�Syyyy)z0Tries to guess the filename of the given object.�nameNr�<����>)�getattrr^r!rrnr��basename)�objr�s  rY�guess_filenamer�sX���3���%�D��
�4�#�u��.�4��7�c�>�d�2�h�RU�o��w�w����%�%�GV�>�.�tr\c�F�tjj|�r|Stjj|�\}}|rytjj|�sZtjj|�\}}|sn5dj	||g�}|r tjj|�s�Ztj|�s|Stj|�}||j�vr|Stjj|jd�d�d}tj|��\}}	tj||j|��tj|�|S#tj|�wxYw)z�Replace nonexistent paths that look like they refer to a member of a zip
    archive with the location of an extracted copy of the target, or else
    just return the provided path unchanged.
    �/r�)�suffix)rnr�r�rN�join�zipfile�
is_zipfile�ZipFile�namelist�splitext�tempfile�mkstemp�write�read�close)r��archive�member�prefix�zip_filer��fd�extracted_paths        rY�extract_zipped_pathsr�"s;��

�w�w�~�~�d�����g�g�m�m�D�)�O�G�V�
�"�'�'�.�.��1��'�'�-�-��0�����
����6�6�*�+��
�"�'�'�.�.��1����g�&������w�'�H�
�X�&�&�(�(����W�W�
�
�f�l�l�3�/��3�
4�R�
8�F�!�)�)��8��B���
����X�]�]�6�*�+�
��������	�����s�
%F	�	F c#�JK�tjtjj	|���\}}	tj
|d�5}|��ddd�tj||�y#1swY� xYw#t$rtj|��wxYw�w)z-Write a file to the disk in an atomic fashion)�dir�wbN)	r�r�rnr��dirname�fdopenrP�
BaseException�remove)�filename�tmp_descriptor�tmp_name�tmp_handlers    rY�atomic_openr�Hs���� (�/�/�B�G�G�O�O�H�4M�N��N�H��
�Y�Y�~�t�
,����-�
�
�
�8�X�&�-�
,����
�	�	�(��
��s4�7B#�B�A4�B�3B#�4A=�9B� B � B#c�t�|�yt|ttttf�rtd��t
|�S)aTake an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        Traceback (most recent call last):
        ...
        ValueError: cannot encode objects that are not 2-tuples
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])

    :rtype: OrderedDict
    N�+cannot encode objects that are not 2-tuples)r^r!r�boolrJrMr��values rY�from_key_val_listr�Us6��(
�}���%�#�u�d�C�0�1��F�G�G��u��r\c��y�Nrr�s rY�to_key_val_listr�rs��*-r\c��yr�rr�s rYr�r�ts�� r\c���|�yt|ttttf�rtd��t|t�rt|j��St|�S)a�Take an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        Traceback (most recent call last):
        ...
        ValueError: cannot encode objects that are not 2-tuples

    :rtype: list
    Nr�)	r^r!rr�rJrMr_�listr`r�s rYr�r�xsP��&
�}���%�#�u�d�C�0�1��F�G�G��%��(��E�K�K�M�"�"���;�r\c��g}t|�D]5}|dd|ddcxk(rdk(rnnt|dd�}|j|��7|S)aParse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    :rtype: list
    Nrr��")�_parse_list_header�unquote_header_value�append)r��result�items   rY�parse_list_headerr��sT��.�F�"�5�)�����8�t�B�C�y�'�C�'�'��Q�r�
�3�D��
�
�d��*��Mr\c��i}t|�D]H}d|vrd||<�
|jdd�\}}|dd|ddcxk(rdk(rnnt|dd�}|||<�J|S)a^Parse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    :rtype: dict
    �=Nrr�r�)r�rNr�)r�r�r�r�s    rY�parse_dict_headerr��sx��,%'�F�"�5�)���d�?��F�4�L���j�j��a�(���e���!�9��b�c�
�)�c�)�(��q���5�E���t��*��Mr\c��|rF|d|dcxk(rdk(r5n|S|dd}|r|dddk7r"|jdd�jd	d�S|S)
z�Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    :rtype: str
    rr�r�rNrkz\\�\z\")rP)r��is_filenames  rYr�r��sd��
��q��U�2�Y�-�#�-��L��a�����e�B�Q�i�6�1��=�=���.�6�6�u�c�B�B��Lr\c�X�|D�cic]}|j|j��}}|Scc}w)z�Returns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    :rtype: dict
    )r�r�)�cj�cookie�cookie_dicts   rY�dict_from_cookiejarr��s0��<>�>�2��6�;�;����,�2�K�>����?s�'c��t||�S)z�Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :rtype: CookieJar
    r&)r�r�s  rY�add_dict_to_cookiejarr��s���{�B�/�/r\c�^�tjdt�tjdtj
��}tjdtj
��}tjd�}|j
|�|j
|�z|j
|�zS)zlReturns encodings from given content string.

    :param content: bytestring to extract encodings from.
    z�In requests 3.0, get_encodings_from_content will be removed. For more information, please see the discussion on issue #2266. (This warning should only appear once.)z!<meta.*?charset=["\']*(.+?)["\'>])�flagsz+<meta.*?content=["\']*;?charset=(.+?)["\'>]z$^<\?xml.*?encoding=["\']*(.+?)["\'>])rrrs�DeprecationWarningrQ�compilerS�findall)�content�
charset_re�	pragma_re�xml_res    rY�get_encodings_from_contentr�
s���

�M�M�
1�	�
����@����M�J��
�
�I�QS�QU�QU�V�I�
�Z�Z�?�
@�F�	���7�#�
�
�
�G�
$�	%�
�.�.��
!�	"�r\c�B�|jd�}|dj�|dd}}i}d}|D]j}|j�}|s�|jd�x}dk7s�-|d|j|�}||dzdj|�}	|	||j�<�l||fS)z�Returns content type and parameters from given header.

    :param header: string
    :return: tuple containing content type and dictionary of
         parameters.
    rBrrNz"' r�r�)rN�strip�find�lower)
�header�tokens�content_type�params�params_dict�strip_chars�param�idx�keyr�s
          rY�_parse_content_type_headerr�#s����\�\�#�
�F�!�!�9�?�?�,�f�Q�R�j�&�L�)+�K��K������
���U�Z�Z��_�,�c��3����+�#�#�K�0�C��#��'�)�$�*�*�;�7�E�',�K��	�	��$����$�$r\c��|jd�}|syt|�\}}d|vr|djd�Sd|vryd|vryy)	z}Returns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    :rtype: str
    zcontent-typeN�charsetz'"�textz
ISO-8859-1zapplication/jsonrd)r�r�r�)�headersr�r�s   rY�get_encoding_from_headersr�9s`���;�;�~�.�L���5�l�C��L�&��F���i� �&�&�u�-�-�
�����\�)��*r\c#�K�|j�|Ed{���ytj|j�d��}|D]}|j|�}|s�|���|jdd��}|r|��yy7�e�w)zStream decodes an iterator.NrP��errorsr\T)�final)�encoding�codecs�getincrementaldecoderr�)�iterator�r�decoder�chunk�rvs     rY�stream_decode_response_unicoderRs����
	�z�z������6�f�*�*�1�:�:�6�i�H�G���
�^�^�E�
"��
��H��
����4��	(�B�	���
�	�s�A<�A:�AA<�"A<c��yr�r��string�slice_lengths  rY�iter_slicesres��$'r\c��yr�rrs  rYrris��"%r\c#�K�d}|�|dkrt|�}|t|�kr||||z��||z
}|t|�kr�yy�w)z Iterate over slices of a string.rN)rf)rr�poss   rYrrmsY�����C���|�q�0��6�{��

��F��
��S�3��-�.�.��|�����F��
�s�AA�Ac�`�tjdt�|j�yg}t	|j
�}|r	t
|j|�S	t
|j|xsdd��S#t$r|j|�Y�9wxYw#t$r|jcYSwxYw)z�Returns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type
    2. fall back and replace all unicode characters

    :rtype: str
    z�In requests 3.0, get_unicode_from_response will be removed. For more information, please see the discussion on issue #2266. (This warning should only appear once.)NrdrPr)
rrrsr�r�r�r�r!�UnicodeErrorr��	TypeError)r�tried_encodingsrs   rY�get_unicode_from_responserys���
�M�M�
1�	�
�	�y�y���!#�O�)����3�H��	-��q�y�y�(�+�+�
��1�9�9�h�1�'�)�D�D���	-��"�"�8�,�	-�����y�y���s$�A5�B�5B�B�B-�,B-zBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~�UNRESERVED_SETc��|jd�}tdt|��D]l}||dd}t|�dk(rI|j�r9	t	t|d��}|tvr|||ddz||<�Vd||��||<�bd||��||<�nd	j|�S#t$rtd|�d���wxYw)
z�Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.

    :rtype: str
    �%rrrk�z"Invalid percent-escape sequence: '�'Nr�)
rN�rangerf�isalnum�chrrJrMr*rr�)�uri�parts�i�h�cs     rY�unquote_unreservedr'�s���
�I�I�c�N�E�
�1�c�%�j�
!���!�H�Q�q�M���q�6�Q�;�1�9�9�;�
L���A�r�
�O���N�"��u�Q�x���|�+��a���u�Q�x�j�>��a���5��8�*�~�E�!�H�"��7�7�5�>����
L� �#E�a�S��!J�K�K�
L�s�B'�'Cc�p�d}d}	tt|�|��S#t$rt||��cYSwxYw)z�Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.

    :rtype: str
    z!#$%&'()*+,/:;=?@[]~z!#$&'()*+,/:;=?@[]~)�safe)r r'r*)r"�safe_with_percent�safe_without_percents   rY�requote_urir,�sJ��/��0��	5��'��,�3D�E�E���5��S�3�4�4�	5�s��5�5c
�r�tjdtj|��d}|j	d�\}}tjdtjtt
|����d}tjdtj|��d|z}||z||zk(S)z�This function allows you to check if an IP belongs to a network subnet

    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24

    :rtype: bool
    z=Lrr�)�struct�unpack�socket�	inet_atonrN�dotted_netmaskrJ)�ip�net�ipaddr�netaddr�bits�netmask�networks       rY�address_in_networkr:�s����]�]�4��!1�!1�"�!5�
6�q�
9�F��I�I�c�N�M�G�T��m�m�D�&�"2�"2�>�#�d�)�3L�"M�N�q�Q�G��m�m�D�&�"2�"2�7�";�<�Q�?�'�I�G��W��'�G�"3�4�4r\c�p�ddd|z
zdz
z}tjtjd|��S)z�Converts mask from /xx format to xxx.xxx.xxx.xxx

    Example: if mask is 24 function returns 255.255.255.0

    :rtype: str
    l��r� z>I)r0�	inet_ntoar.�pack)�maskr7s  rYr2r2�s7����b�4�i��1�,�,�D����F�K�K��d�3�4�4r\c�N�	tj|�y#t$rYywxYw)z
    :rtype: bool
    FT)r0r1rL)�	string_ips rY�is_ipv4_addressrB�s.�������#�������s��	$�$c��|jd�dk(rR	t|jd�d�}|dks|dkDry	t	j
|jd�d�yy#t$rYywxYw#t$rYywxYw)zV
    Very simple check of the cidr format in no_proxy variable.

    :rtype: bool
    r�rFr<rT)�countrJrNrMr0r1rL)�string_networkr?s  rY�
is_valid_cidrrF�s������C� �A�%�	��~�+�+�C�0��3�4�D��!�8�t�b�y��	����^�1�1�#�6�q�9�:�
����	��	���	��	�s"�A(�'A7�(	A4�3A4�7	B�Bc#�<K�|du}d}|r2tjj|�}|tj|<	d��|r(|�tj|=y|tj|<yy#|r(|�tj|=w|tj|<wwxYw�w)z�Set the environment variable 'env_name' to 'value'

    Save previous value, yield, and then restore the previous value stored in
    the environment variable 'env_name'.

    If 'value' is None, do nothingN)rnr�r�)�env_namer��
value_changed�	old_values    rY�set_environrKs�������%�M� �I���J�J�N�N�8�,�	�$��
�
�8��1�
��� ��J�J�x�(�'0��
�
�8�$�	��=�� ��J�J�x�(�'0��
�
�8�$�	�s�;B�A-�+B�-,B�Bc��dd�}|}|�|d�}t|�}|j}|�y|r�d�|jdd�jd�D�}t	|�r)|D]#}t|�rt
||�s�y||k(s�#ynm|}|jr|d	|j��z
}|D]H}	|	jd
�}	||	k(s||	k(ryd
|	z}	|j|	�s|j|	�s�Hytd|�5	t|�}
ddd�
ryy#ttjf$rd}
Y�)wxYw#1swY�.xYw)
zL
    Returns whether we should bypass proxies or not.

    :rtype: bool
    c��tjj|�xs-tjj|j��Sr�)rnr�r��upper)r�s rY�	get_proxyz(should_bypass_proxies.<locals>.get_proxy3s-���z�z�~�~�c�"�A�b�j�j�n�n�S�Y�Y�[�&A�Ar\N�no_proxyTc3�&K�|]	}|s�|���y�wr�r)r�rTs  rYr�z(should_bypass_proxies.<locals>.<genexpr>Es����X�+O�4�SW�$�+O�s��� r��,�:rCF)r�r!�return�
str | None)r#r�rPrNrBrFr:�port�lstrip�endswithrKrrr0�gaierror)r�rPrO�no_proxy_arg�parsedr��no_proxy_hosts�proxy_ip�host_with_portrT�bypasss           rY�should_bypass_proxiesra*s]��B�
�L����Z�(��
�c�]�F����H�����Y�8�+;�+;�C��+D�+J�+J�3�+O�X���8�$�*�� ��*�)�(�H�=�#���)� �+�&�N��{�{��A�f�k�k�]�"3�3��&���{�{�3�'���t�#�~��'=���T�z���$�$�T�*�n�.E�.E�d�.K��
'�
�Z��	.�	�!�(�+�F�
/�����
�6�?�?�+�	��F�	��
/�	.�s*�D<�D�D9�6D<�8D9�9D<�<Ec�4�t||��riSt�S)zA
    Return a dict of environment proxies.

    :rtype: dict
    �rP)rar)r�rPs  rY�get_environ_proxiesrdis���S�8�4��	��|�r\c�.�|xsi}t|�}|j�+|j|j|jd��S|jdz|jz|jd|jzdg}d}|D]}||vs�||}|S|S)z�Select a proxy for the url, if applicable.

    :param url: The url being for the request
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    N�allz://zall://)r#r�r��scheme)r��proxies�urlparts�
proxy_keys�proxy�	proxy_keys      rY�select_proxyrmus����m��G���}�H���� ��{�{�8�?�?�G�K�K��,>�?�?�	���%��(�"3�"3�3�����8�$�$�$�
�	�J�
�E��	�����I�&�E���L� �
�Lr\c�T�|�|ni}tt|j�}t|�j}|jd�}|j
�}|rOt||��sBt||��}|j||jd��}|r|j||�|S)a�This method takes proxy information from a request and configuration
    input to resolve a mapping of target proxies. This will consider settings
    such as NO_PROXY to strip proxy configurations.

    :param request: Request or PreparedRequest
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    :param trust_env: Boolean declaring whether to trust environment configs

    :rtype: dict
    rPrcrf)
rr!r�r#rgr��copyrard�
setdefault)	�requestrh�	trust_envr�rgrP�new_proxies�environ_proxiesrks	         rY�resolve_proxiesru�s���!�,�g�"�G�
�s�G�K�K�
 �C�
�c�]�
!�
!�F��{�{�:�&�H��,�,�.�K��.�s�X�F�-�c�H�E���#�#�F�O�,?�,?��,F�G����"�"�6�5�1��r\c��|�dt��S)zO
    Return a string representing the default user agent.

    :rtype: str
    r�r)r�s rY�default_user_agentrw�s���V�1�[�M�"�"r\c�:�tt�tddd��S)z9
    :rtype: requests.structures.CaseInsensitiveDict
    z*/*z
keep-alive)z
User-AgentzAccept-Encoding�Accept�
Connection)r,rwr=rr\rY�default_headersr{�s%���,�.�6��&�		
��r\c���g}d}|j|�}|s|Stjd|�D]�}	|jdd�\}}d|jd�i}|jd�D]:}	|jd�\}}|j|�||j|�<�<|j	|���|S#t$r|d}}Y��wxYw#t$rY�4wxYw)	z�Return a list of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    :rtype: list
    z '"z, *<rBrr�r�z<> '"r�)r�rQrNrMr�)	r��links�
replace_chars�valr�r��linkr�r�s	         rY�parse_header_linksr��s���#%�E��M��K�K�
�&�E�����x�x���&��	"��)�)�C��+�K�C��!&�s�y�y��':�;���\�\�#�&�E�
�"�[�[��-�
��U�.3�[�[��-G�D����=�)�*�
'�	���T��!'�$�L���	"��r��C�	"���
��
�s#�B?�1C�?
C�C�	C�C��asciirk�c��|dd}|tjtjfvry|ddtjk(ry|ddtjtj
fvry|j
t�}|dk(ry	|dk(r |ddd�tk(ry
|ddd�tk(ry|dk(r|ddtk(ry
|ddtk(ryy)z
    :rtype: str
    N�zutf-32r�z	utf-8-sigrkzutf-16rrdz	utf-16-berz	utf-16-lez	utf-32-bez	utf-32-le)
r�BOM_UTF32_LE�BOM_UTF32_BE�BOM_UTF8�BOM_UTF16_LE�BOM_UTF16_BErD�_null�_null2�_null3)�data�sample�	nullcounts   rY�guess_json_utfr��s����"�1�X�F�
�&�%�%�v�':�':�;�;��
�b�q�z�V�_�_�$��
�b�q�z�f�)�)�6�+>�+>�?�?�����U�#�I��A�~���A�~��#�A�#�;�&� ���!�$�Q�$�<�6�!���A�~��"�1�:�����!�"�:����r\c���t|�}|\}}}}}}}	|j}
|
s||
}}
|r#tt|
�}
dj	||
g�}
|�|}|�d}t||
|d||	f�S)z�Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.

    :rtype: str
    �@r�)r�netlocrr!r�r$)r��
new_schemer\rg�auth�_host�_portr��query�fragmentr�s           rY�prepend_scheme_if_neededr�s����s�^�F�8>�5�F�D�%���e�X��]�]�F���V�����c�6�"�����4��.�)��
�~����|����v�v�t�R���A�B�Br\c��t|�}	t|j�t|j�f}|S#tt
f$rd}Y|SwxYw)z{Given a url with authentication components, extract them into a tuple of
    username,password.

    :rtype: (str,str)
    )r�r�)r#r"�username�passwordrvr)r�r\r�s   rY�get_auth_from_urlr�.sU���c�]�F������(�'�&�/�/�*B�C���K��
�I�&�����K��s�*9�A�
Ac�B�|\}}t||d�t||d�y)z�Verifies that header parts don't contain leading whitespace
    reserved characters, or return characters.

    :param header: tuple, in the format (name, value).
    rrN)�_validate_header_part)r�r�r�s   rY�check_header_validityr�?s%���K�D�%��&�$��*��&�%��+r\c
��t|t�r
t|}n7t|t�r
t|}ntd|�d|�dt
|�����|j|�s|dk(rdnd}td|�d|����y)	Nz
Header part (z) from z# must be of type str or bytes, not rr�r�zTInvalid leading whitespace, reserved character(s), or return character(s) in header z: )r^r!rrrr)�typerR)r��header_part�header_validator_index�	validator�header_kinds     rYr�r�Js���
�+�s�#�*�+A�B�	�	�K��	'�+�,B�C�	���K�?�'�&��:1�15�k�1B�0C�
E�
�	
�
�?�?�;�'� 6�!� ;�f����&�&1�]�"�[�O�
E�
�	
�(r\c�~�t|�\}}}}}}|s||}}|jdd�d}t|||||df�S)zW
    Given a url remove the fragment and the authentication part.

    :rtype: str
    r�rr�r�)r#�rsplitr$)r�rgr�r�r�r��	_fragments       rY�
urldefragauthr�bsU��6>�c�]�2�F�F�D�&�%����V���
�]�]�3��
"�2�
&�F��v�v�t�V�U�B�?�@�@r\c���t|jdd�}|�.t|jt�r	||j�yt
d��#t
$rt
d��wxYw)zfMove file pointer back to its recorded starting position
    so it can be read again on redirect.
    rjNz;An error occurred when rewinding request body for redirect.z+Unable to rewind request body for redirect.)r��bodyr^�_body_positionrrLr+)�prepared_request�	body_seeks  rY�rewind_bodyr�ssu���(�-�-�v�t�<�I�����'�'��"�	��&�5�5�6�$�$Q�R�R���	�'�M��
�	�s�A�A()rTr!rUr�)raz6_t.SupportsItems[Any, Any] | Iterable[tuple[Any, Any]]rUzIterable[tuple[Any, Any]])rxrrUrJ)F)r�z
_t.UriTyper�r�rUztuple[str, str] | None)r�rrUrV)r�r!rUr!)r�r!rUz%Generator[BufferedWriter, None, None])r�z4Mapping[Any, Any] | Iterable[tuple[Any, Any]] | NonerUzdict[Any, Any] | None)r��NonerUr�)r�z6_t.SupportsItems[_KT, _VT] | Iterable[tuple[_KT, _VT]]rUzlist[tuple[_KT, _VT]])r�z=_t.SupportsItems[_KT, _VT] | Iterable[tuple[_KT, _VT]] | NonerUzlist[tuple[_KT, _VT]] | None)r�r!rU�	list[str])r�r!rU�dict[str, str | None])r�r!r�r�rUr!)r�r-rUr�)r�r-r��dict[str, str]rUr-)r�r!rUr�)r�r!rUztuple[str, dict[str, Any]])r��CaseInsensitiveDict[str]rUrV)rzIterable[bytes]rr2rUz"Generator[str | bytes, None, None])rrr�
int | NonerUzGenerator[bytes, None, None])rr!rr�rUzGenerator[str, None, None])rzbytes | strrr�rUz"Generator[bytes | str, None, None])rr2rUzstr | bytes | None)r"r!rUr!)r3r!r4r!rUr�)r?rJrUr!)rAr!rUr�)rEr!rUr�)rHr!r�rVrUzGenerator[None, None, None])r�r!rPrVrUr�r�)r�r!rPrVrUr�)r�r!rh�dict[str, str] | NonerUrV)T)rqzRequest | PreparedRequestrhr�rrr�rUr�)zpython-requests)r�r!rUr!)rUr�)r�r!rUzlist[dict[str, str]])r�rrUrV)r�r!r�r!rUr!)r�r!rUztuple[str, str])r��tuple[str | bytes, str | bytes]rUr�)r�r�r�zstr | bytesr�rJrUr�)r�r!rUr!)r�r0rUr�)��__doc__�
__future__rr�
contextlibrtrnrQr0r.�sysr�rrr��collectionsr�collections.abcrr�typingrrr	r
rr�urllib3.utilr
rr�rr�_internal_utilsrrrrr/rr_�compatrrrrrrrrr r!r"r#r$r%r��cookiesr'�
exceptionsr(r)r*r+�
structuresr,�http.cookiejarr-r.�_t�modelsr0r1r2r4�__annotations__�wherer5r9r:r;r�rNr=�platformrZrbr{r�r�r��contextmanagerr�r�r�r�r�r�r�r�r�r�r�rrr�	frozensetrr'r,r:r2rBrFrKrardrmrurwr{r�rlr�r�r�r�r�r�r�r�r�r�rr\rY�<module>r�s����#�
��	�	�	�
�
�
����#�/���1��$���4�����:�(���,��(�!��:�:�)��U�)�*�e�k�k�m���+�!#�S�1�
�u�1�
�e�n��
�e�n��"&����B�H�H�W�l�4�8�9J�K�L�"����
�<�<�7��$�L	/�
�=�
��
�D3�P+0�1
�	�1
�#'�1
��1
�h&�#�L���	��	��?����:
�-�
�-�	� �A� �� �
� ��H��!��@�@�F�2�0��2%�,�2���"*��'��&
�'��'�!+�'�!�'�
�'�
�%��%�)�%��%�
�%�	��	�'1�	�'�	�&�T"�M�����
�05�,5�5���0���1��1�,<�~	��:��
&��
"�����	�>#��"�L	�
�
�g���	����	�����@C�<�",�
�+�
��
� �
�
�	
�0A�"Sr\

Filemanager

Name Type Size Permission Actions
__init__.cpython-312.pyc File 5.62 KB 0644
__version__.cpython-312.pyc File 554 B 0644
_internal_utils.cpython-312.pyc File 2.05 KB 0644
_types.cpython-312.pyc File 7.07 KB 0644
adapters.cpython-312.pyc File 28.9 KB 0644
api.cpython-312.pyc File 7.83 KB 0644
auth.cpython-312.pyc File 15.39 KB 0644
certs.cpython-312.pyc File 636 B 0644
compat.cpython-312.pyc File 2.41 KB 0644
cookies.cpython-312.pyc File 27.67 KB 0644
exceptions.cpython-312.pyc File 7.74 KB 0644
help.cpython-312.pyc File 4.19 KB 0644
hooks.cpython-312.pyc File 1.52 KB 0644
models.cpython-312.pyc File 40.9 KB 0644
packages.cpython-312.pyc File 1.06 KB 0644
sessions.cpython-312.pyc File 31.13 KB 0644
status_codes.cpython-312.pyc File 5.97 KB 0644
structures.cpython-312.pyc File 7.08 KB 0644
utils.cpython-312.pyc File 39.06 KB 0644