ok

Mini Shell

Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/urllib3/util/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/urllib3/util/__pycache__/url.cpython-311.pyc

�

m��f�6���ddlmZddlZddlmZddlmZddlmZgd�Z	dZ
ejd	��Zejd
��Z
ejdejejz��ZdZd
Zd�ee���Zeed�Zgd�ZdZdd�d�eD����zdzZdezdzZdezdzezdzZdZejd��Zejdezdz��Zejdezdz��Zejdezdz��Z ejdedd�zdz��Z!ejd ezd!z��Z"d"e�de�de�d#�Z#eje#ejejz��Z$e%d$��Z&e%d%��Z'e&e'zd&hzZ(e(d'd(hzZ)e)d)hzxZ*Z+Gd*�d+ed+e	����Z,d,�Z-d5d.�Z.d/�Z/d0�Z0d1�Z1d2�Z2d3�Z3d4�Z4dS)6�)�absolute_importN)�
namedtuple�)�LocationParseError)�six��scheme�auth�host�port�path�query�fragment)�http�httpsNz%[a-fA-F0-9]{2}z^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)zS^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?(?://([^\\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$z(?:[0-9]{1,3}\.){3}[0-9]{1,3}z[0-9A-Fa-f]{1,4}z(?:{hex}:{hex}|{ipv4}))�hex�ipv4)r�ls32)	z(?:%(hex)s:){6}%(ls32)sz::(?:%(hex)s:){5}%(ls32)sz%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)sz2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)sz6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)sz/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)sz'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)sz&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)sz(?:(?:%(hex)s:){0,6}%(hex)s)?::zDABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~z(?:�|c�"�g|]}|tz��
S�)�_subs��.0�xs  �G/opt/imunify360/venv/lib64/python3.11/site-packages/urllib3/util/url.py�
<listcomp>r6s��<�<�<�1�Q��Y�<�<�<��)z
(?:%25|%)(?:[z]|%[a-fA-F0-9]{2})+z\[z)?\]z!(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*z!^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$�^�$����(z)\]$z^(z)(?::([0-9]{0,5}))?$zBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~z!$&'()*+,;=�:�@�/�?c���eZdZdZdZ							d
�fd�	Zed���Zed���Zed���Z	ed���Z
d	�Z�xZS)�Urlz�
    Data structure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`. Both the scheme and host are normalized as they are
    both case-insensitive according to RFC 3986.
    rNc
����|r|�d��sd|z}|�|���}tt|���||||||||��S)Nr&)�
startswith�lower�superr)�__new__)	�clsr	r
rrr
rr�	__class__s	        �rr.zUrl.__new__[sm����	�����,�,�	���:�D����\�\�^�^�F��S�#���&�&����t�T�4���
�
�	
rc��|jS)z@For backwards-compatibility with urlparse. We're nice like that.)r��selfs r�hostnamezUrl.hostnamems���y�rc�@�|jpd}|j�
|d|jzz
}|S)z)Absolute path including the query string.r&Nr')r
r)r3�uris  r�request_urizUrl.request_urirs.���i��3���:�!��3���#�#�C��
rc�@�|jrd|j|jfzS|jS)z(Network location including host and portz%s:%d)rrr2s r�netlocz
Url.netloc|s*���9�	4��d�i���3�3�3��y�rc��|\}}}}}}}d}|�||dzz
}|�||dzz
}|�||z
}|�|dt|��zz
}|�||z
}|�|d|zz
}|�|d|zz
}|S)a�
        Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example: ::

            >>> U = parse_url('http://google.com/mail/')
            >>> U.url
            'http://google.com/mail/'
            >>> Url('http', 'username:password', 'host.com', 80,
            ... '/path', 'query', 'fragment').url
            'http://username:password@host.com:80/path?query#fragment'
        �Nz://r%r$r'�#)�str)	r3r	r
rrr
rr�urls	         rr>zUrl.url�s���&;?�7���d�D�$��x������6�F�?�"�C����4�$�;��C����4�K�C����4�#�d�)�)�#�#�C����4�K�C����4�%�<��C����4�(�?�"�C��
rc��|jS�N)r>r2s r�__str__zUrl.__str__�s	���x�r)NNNNNNN)
�__name__�
__module__�__qualname__�__doc__�	__slots__r.�propertyr4r7r9r>rA�
__classcell__)r0s@rr)r)Rs�����������I��
�
�
�
���
�
�
�
�
�
�$����X������X������X���%�%��X�%�N������rr)c��d}d}|D]*}|�|��}|dkr�|�||kr|}|}�+|�|dkr|ddfS|d|�||dzd�|fS)a�
    .. deprecated:: 1.25

    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    Nrr;�)�find)�s�delims�min_idx�	min_delim�d�idxs      r�split_firstrR�s���$�G��I�
�����f�f�Q�i�i����7�7���?�c�G�m�m��G��I����'�A�+�+��"�d�{���X�g�X�;��'�A�+�-�-�(�)�3�3r�utf-8c��|�|Stj|��}t�d�|��\}}|�dd��}||�d��k}t
��}tdt|����D]�}|||dz�}t|��}	|r|dks|	dkr|�
��|vr||z
}�H|�dt|	��d	d�����
d	�����z����|�
|��S)
zfPercent-encodes a URI component without reapplying
    onto an already percent-encoded component.
    Nc�P�|�d�����S)Nr)�group�upper)�matchs r�<lambda>z'_encode_invalid_chars.<locals>.<lambda>�s��e�k�k�!�n�n�*�*�,�,�rrS�
surrogatepass�%rrJ�r)r�ensure_text�
PERCENT_RE�subn�encode�count�	bytearray�range�len�ord�decode�extendr�zfillrW)
�	component�
allowed_chars�encoding�percent_encodings�	uri_bytes�is_percent_encoded�encoded_component�i�byte�byte_ords
          r�_encode_invalid_charsrs�sV��������	�*�*�I�
$.�?�?�,�,�i�$�$� �I� �� � ��/�:�:�I�*�i�o�o�d�.C�.C�C��!����
�1�c�)�n�n�
%�
%�	W�	W����Q��U��#���t�9�9���	�4�4�<�<��s�N�N�t�{�{�}�}�
�=�=���%���� � ���X���q�r�r�):�)A�)A�)C�)C�)I�)I�!�)L�)L�)R�)R�)T�)T�!U�V�V�V�V��#�#�H�-�-�-rc��|�d��}g}|D];}|dkr�	|dkr|�|���%|r|����<|�d��r |r|dr|�dd��|�d��r|�d��d�|��S)Nr&�.z..rr;)z/.z/..)�split�append�popr+�insert�endswith�join)r
�segments�output�segments    r�_remove_path_dot_segmentsr�s����z�z�#���H�
�F��
�
���c�>�>��
��_�_��M�M�'�"�"�"�"��	��J�J�L�L�L�����s����V��v�a�y���
�
�a������}�}�]�#�#���
�
�b�����8�8�F���rc��|�rvt|tj��rtj|��}|tv�r>t
�|��}|r�t�|��}|r�|�	d��\}}|||�}|�
d��r|dkr|dd�}n
|dd�}dt|t��z}|d|��
��|z||d�zS|�
��St�|��sDtjd�d�|�d��D������S|S)NrJz%25��%�.c�,�g|]}t|����Sr)�_idna_encode)r�labels  rrz#_normalize_host.<locals>.<listcomp>)s ��P�P�P�u�|�E�2�2�P�P�Prru)�
isinstancer�binary_type�
ensure_str�NORMALIZABLE_SCHEMES�
IPV6_ADDRZ_RErX�
ZONE_ID_RE�search�spanr+rs�UNRESERVED_CHARSr,�IPV4_REr{rv)rr	�is_ipv6rX�start�end�zone_ids       r�_normalize_hostr�sr�����d�C�O�,�,�	(��>�$�'�'�D��)�)�)�#�)�)�$�/�/�G��
�"�)�)�$�/�/���(�!&���A���J�E�3�"�5��9�o�G��)�)�%�0�0�.�W��5E�5E�")�!�"�"�+���")�!�"�"�+��!�$9�'�CS�$T�$T�T�G�����<�-�-�/�/�'�9�D����J�F�F��:�:�<�<�'��]�]�4�(�(�
��~��I�I�P�P��
�
�3���P�P�P�Q�Q�����Krc��|r�td�|D����r�	ddl}n2#t$r%tjtd��d��YnwxYw	|�|���dd���S#|j$r(tjtd|z��d��YnwxYw|����d��S)Nc�4�g|]}t|��dk��S)r\)rers  rrz _idna_encode.<locals>.<listcomp>/s"��0�0�0�a�S��V�V�c�\�0�0�0rrz-Unable to parse URL without the 'idna' moduleT)�strict�
std3_rulesz#Name '%s' is not a valid IDNA label�ascii)	�any�idna�ImportErrorr�
raise_fromrr`r,�	IDNAError)�namer�s  rr�r�.s���
��0�0�4�0�0�0�1�1�
�	��K�K�K�K���	�	�	��N�"�#R�S�S��
�
�
�
�
�	����
	��;�;�t�z�z�|�|�D�T�;�J�J�J���~�	�	�	��N�"�#I�D�#P�Q�Q�SW�
�
�
�
�
�	�����:�:�<�<���w�'�'�'s!�"�,A�A�)A?�?/B1�0B1c���t�|�����\}}t|t��}t|t
��}|�|d|zz
}|S)zHPercent-encodes a request target so that there are no invalid charactersNr')�	TARGET_RErX�groupsrs�
PATH_CHARS�QUERY_CHARS)�targetr
rs   r�_encode_targetr�@sZ���/�/�&�)�)�0�0�2�2�K�D�%�
"�4��
4�
4�F�!�%��5�5�E����#��+����Mrc����|st��S|}t�|��sd|z}	t�|�����\}}}}}|dup|���tv}|r|���}|rn|�d��\}}	}
|pd}t�|
�����\}}|r|rt|t��}|dkrd}nd\}}}|�-t|��}d|cxkrdksnt|���t||��}|r&|r$t|��}t|t ��}|r|rt|t"��}|r|rt|t$��}n9#t&t(f$r%t+jt|��d��cYSwxYw|s	|�|�d}nd}t/|t*j��r
t*j�nt*j��fd�}
t|
|��|
|��|
|��||
|��|
|��|
|���	��S)
a

    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.
    This parser is RFC 3986 compliant.

    The parser logic and helper functions are based heavily on
    work done in the ``rfc3986`` module.

    :param str url: URL to parse into a :class:`.Url` namedtuple.

    Partly backwards-compatible with :mod:`urlparse`.

    Example::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    z//Nr%r;)NNNri��c�"��|�|n
�|��Sr@r)r�ensure_funcs �r�ensure_typezparse_url.<locals>.ensure_type�s����I�q�q�;�;�q�>�>�1rr)r)�	SCHEME_REr��URI_RErXr�r,r��
rpartition�
_HOST_PORT_RErs�USERINFO_CHARS�intrr�rr�r��FRAGMENT_CHARS�
ValueError�AttributeErrorrr�r��	text_typer]r�)r>�
source_urlr	�	authorityr
rr�
normalize_urir
�_�	host_portrrr�r�s              @r�	parse_urlr�Js����,���u�u���J����C� � ���S�j��"D�39�<�<��3D�3D�3K�3K�3M�3M�0��	�4����$��P�&�,�,�.�.�<P�*P�
��	$��\�\�^�^�F��		0�!*�!5�!5�c�!:�!:��D�!�Y��<�4�D�&�,�,�Y�7�7�>�>�@�@�J�D�$��
C�
�
C�,�T�>�B�B���r�z�z����/��D�$�����t�9�9�D���&�&�&�&��&�&�&�&�(��-�-�-��t�V�,�,���	;�T�	;�,�T�2�2�D�(��z�:�:�D��	>�U�	>�)�%��=�=�E��	G�X�	G�,�X�~�F�F�H�����'�D�D�D��~�0��<�<�d�C�C�C�C�C�D��������� 4��D�D��D��#�s�}�%�%�%��o����n��2�2�2�2�2���{�6�"�"�
�[��
�
�
�[��
�
�
�
�[��
�
��k�%� � ���X�&�&����s�E6F+�+3G!� G!c�L�t|��}|jpd|j|jfS)z4
    Deprecated. Use :func:`parse_url` instead.
    r)r�r	r4r)r>�ps  r�get_hostr��s'��	�#���A��8��v�q�z�1�6�1�1r)rS)5�
__future__r�re�collectionsr�
exceptionsr�packagesr�	url_attrsr��compiler^r��UNICODE�DOTALLr��IPV4_PAT�HEX_PAT�format�LS32_PATr�_variations�UNRESERVED_PATr{�IPV6_PAT�ZONE_ID_PAT�IPV6_ADDRZ_PAT�REG_NAME_PATr�r��IPV6_REr��BRACELESS_IPV6_ADDRZ_REr��_HOST_PORT_PATr��setr��SUB_DELIM_CHARSr�r�r�r�r)rRrsrr�r�r�r�r�rrr�<module>r�sX��&�&�&�&�&�&�	�	�	�	�"�"�"�"�"�"�+�+�+�+�+�+�������K�K�K�	�/���R�Z�*�
+�
+�
��B�J�8�9�9�	�	����
�J����

�
��,��
��#�*�*�w�X�*�F�F����*�*������*Y���3�8�8�<�<��<�<�<�=�=�=��C����.�1F�F����!�F�*�[�8�7�B��3���B�J�;�<�<�	�
�"�*�S�8�^�c�)�
*�
*��
�"�*�S�8�^�c�)�
*�
*����
�3��/�#�5�6�6�
�$�"�*�S�>�!�B�$�+?�%?�#�%E�F�F��
�R�Z��k�)�G�3�
4�
4�
�
��L�L��H�H��N�N���
��
�>�2�:��	�+A�B�B�
��3�H�����#�m�$�$��!�O�3�s�e�;��
�s�C�j�
(�
�)�S�E�1�1��n�Z�Z�Z�Z�Z�*�*�U�I�
&�
&�Z�Z�Z�z 4� 4� 4�F.�.�.�.�D���<���8(�(�(�$���^�^�^�B2�2�2�2�2r

Zerion Mini Shell 1.0