403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.141.38.5
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/multipart.cpython-37.opt-1.pyc
B

�k�a�~�@sddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZddlmZmZmZddlmZm Z m!Z!ddl"m#Z#m$Z$m%Z%m&Z&m'Z'dd	l(m)Z)m*Z*m+Z+m,Z,dd
l-m.Z.ddl/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6ddl7m8Z8d
Z9e�r>ddl:m;Z;Gdd�de<�Z=Gdd�de<�Z>ee?eee?ee?e?ffd�dd�Z@d'ee?e?fe?ee?d�dd�ZAGdd�d�ZBGdd�d�ZCe6eCe2jDd�Gdd �d e3��ZEGd!d"�d"�ZFee3e?e?fZGGd#d$�d$e3�ZHGd%d&�d&�ZIdS)(�N)�deque)�
TracebackType)�
TYPE_CHECKING�Any�
AsyncIterator�Deque�Dict�Iterator�List�Mapping�Optional�Sequence�Tuple�Type�Union�cast)�	parse_qsl�unquote�	urlencode)�CIMultiDict�CIMultiDictProxy�MultiMapping�)�CONTENT_DISPOSITION�CONTENT_ENCODING�CONTENT_LENGTH�CONTENT_TRANSFER_ENCODING�CONTENT_TYPE)�CHAR�TOKEN�parse_mimetype�reify)�
HeadersParser)�JsonPayload�LookupError�Order�Payload�
StringPayload�get_payload�payload_type)�StreamReader)�MultipartReader�MultipartWriter�BodyPartReader�BadContentDispositionHeader�BadContentDispositionParam�parse_content_disposition�content_disposition_filename)�ClientResponsec@seZdZdS)r.N)�__name__�
__module__�__qualname__�r6r6�D/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/multipart.pyr.Asr.c@seZdZdS)r/N)r3r4r5r6r6r6r7r/Esr/)�header�returncs�ttd�dd��ttd�dd�}ttd��fdd�}ttd�dd	�}ttd�d
d�}d�ttjt��d
�tttd�dd�}|s�difS|�d�^}}�|�s�t�	t
|��difSi}�x�|�r�|�d�}	d|	kr�t�	t
|��difS|	�dd�\}
}|
���
�}
|��}|
|k�r,t�	t
|��difS�|
��sJt�	t|	��q��n\||
��r�||��rp||dd��}n�|��s�t�	t|	��q��n||
��r
||��r�|�dd�\}}
}|�p�d}nt�	t|	��q�yt||d�}Wn&tk
�rt�	t|	��w�YnXn�d}||��r4d}||dd��d��}nV�|��rDd}nF|�r�|�d|d��}||��r�|�d�||dd��d��}d}|�r�t�	t
|��difS|||
<q�W|��|fS)N)�stringr9cSst|�ott|�kS)N)�boolr�set)r:r6r6r7�is_tokenLsz+parse_content_disposition.<locals>.is_tokencSs |d|dkodkSS)Nr����"r6)r:r6r6r7�	is_quotedOsz,parse_content_disposition.<locals>.is_quotedcs�|�o|�d�dkS)N�'�)�count)r:)r=r6r7�
is_rfc5987Rsz-parse_content_disposition.<locals>.is_rfc5987cSs
|�d�S)N�*)�endswith)r:r6r6r7�is_extended_paramUsz4parse_content_disposition.<locals>.is_extended_paramcSs@|�d�d}|sdS|�d�r,||d�n
||d�}|��S)NrErFr>)�findrF�isdigit)r:�posZ	substringr6r6r7�is_continuous_paramXs
"z6parse_content_disposition.<locals>.is_continuous_param�)�chars)�textrMr9cSst�d|�d�d|�S)Nz\\([z])z\1)�re�sub)rNrMr6r6r7�unescape_sz+parse_content_disposition.<locals>.unescape�;r�=rr>rArBzutf-8�strictTFz\/)�strr;�join�maprO�escaper�split�warnings�warnr.�pop�lower�strip�lstripr/r�UnicodeDecodeError)r8r@rDrGrKrQZdisptype�parts�params�item�key�value�encoding�_Zfailed�_valuer6)r=r7r0Isz&













r0�filename)rb�namer9c
s�d|�|sdS�|kr |�S||kr0||Sg}t�fdd�|��D��}xXt|�D]L\}\}}|�dd�\}}|�d�r�|dd�}|t|�kr�|�|�qXPqXW|s�dSd�|�}d|kr�|�dd	�\}	}}|	p�d
}	t||	d�S|SdS)Nz%s*c3s$|]\}}|���r||fVqdS)N)�
startswith)�.0rdre)�name_sufr6r7�	<genexpr>�sz/content_disposition_filename.<locals>.<genexpr>rErr>rLrArBzutf-8rT)	�sorted�items�	enumeraterYrFrU�appendrVr)
rbrjraZfnparamsZnumrdrerg�tailrfr6)rmr7r1�s2

r1c@steZdZdZdddd�dd�Zdd�d	d
�Zedd�dd
�Zed�dd�Z	e
edd�dd�Zdd�dd�ZdS)�MultipartResponseWrapperzzWrapper around the MultipartReader.

    It takes care about
    underlying connection and close it when it needs in.
    r2r+N)�resp�streamr9cCs||_||_dS)N)rurv)�selfrurvr6r6r7�__init__�sz!MultipartResponseWrapper.__init__)r9cCs|S)Nr6)rwr6r6r7�	__aiter__�sz"MultipartResponseWrapper.__aiter__)r+r-c�s|��IdH}|dkrt�|S)N)�next�StopAsyncIteration)rw�partr6r6r7�	__anext__�sz"MultipartResponseWrapper.__anext__cCs|jj��S)z2Returns True when all response data had been read.)ru�content�at_eof)rwr6r6r7r�szMultipartResponseWrapper.at_eofc�s,|j��IdH}|j��r(|��IdH|S)z#Emits next multipart reader object.N)rvrzr�release)rwrcr6r6r7rz�s
zMultipartResponseWrapper.nextc�s|j��IdHdS)z_Release the connection gracefully.

        All remaining content is read to the void.
        N)rur�)rwr6r6r7r��sz MultipartResponseWrapper.release)
r3r4r5�__doc__rxryrr}r;rrrzr�r6r6r6r7rt�srtc@s�eZdZdZdZededd�dd�Zedd�d	d
�Z	ed�dd�Z
eed�d
d�Zdd�e
ed�dd�Zefeed�dd�Zeed�dd�Zeed�dd�Zed�dd�Zdd�dd�Zdd�eeed �d!d"�Zdd�eeeeeefd �d#d$�Zdd�eeeeeefd �d%d&�Ze
d�d'd(�Zeed)�d*d+�Zeed)�d,d-�Zeed)�d.d/�Z eed0�d1d2�Z!e"eed�d3d4��Z#e"eed�d5d6��Z$dS)7r-z&Multipart reader for single body part.i zCIMultiDictProxy[str]N)�boundary�headersr~r9cCs`||_||_||_d|_|j�td�}|dk	r6t|�nd|_d|_t	�|_
d|_d|_i|_
dS)NFr)r��	_boundary�_content�_at_eof�getr�int�_length�_read_bytesr�_unread�_prev_chunk�_content_eof�_cache)rwr�r�r~�lengthr6r6r7rxszBodyPartReader.__init__)r9cCs|S)Nr6)rwr6r6r7ryszBodyPartReader.__aiter__c�s|��IdH}|dkrt�|S)N)rzr{)rwr|r6r6r7r}szBodyPartReader.__anext__c�s|��IdH}|sdS|S)N)�read)rwrcr6r6r7rzszBodyPartReader.nextF)�decode)r�r9c�sF|jr
dSt�}x"|js2|�|�|j�IdH�qW|rB|�|�S|S)z�Reads body part data.

        decode: Decodes data following by encoding
                method from Content-Encoding header. If it missed
                data remains untouched
        �N)r��	bytearray�extend�
read_chunk�
chunk_sizer�)rwr��datar6r6r7r� s
zBodyPartReader.read)�sizer9c�s�|jr
dS|jr"|�|�IdH}n|�|�IdH}|jt|�7_|j|jkrVd|_|jr||j��IdH}d|ks|td��|S)zWReads body part content chunk of the specified size.

        size: chunk size
        r�NTs
z3reader did not read all the data or it is malformed)	r�r��_read_chunk_from_length�_read_chunk_from_streamr��lenr��readline�AssertionError)rwr��chunkZclrfr6r6r7r�0s
zBodyPartReader.read_chunkc�s:|jdk	std��t||j|j�}|j�|�IdH}|S)Nz(Content-Length required for chunked read)r�r��minr�r�r�)rwr�r�r�r6r6r7r�Fsz&BodyPartReader._read_chunk_from_lengthc	�sR|t|j�dkstd��|jdk}|r<|j�|�IdH|_|j�|�IdH}|jt|j���7_|jdksxtd��|jdk	s�t�|j|}d|j}|r�|�	|�}n |�	|t
dt|j�t|���}|dk�rBt���(tj
dtd�|j�||d��WdQRX||k�r$|jd|�|_|t|j�|�}|�sBd	|_|j}||_|S)
NrBz<Chunk size must be greater or equal than boundary length + 2�zReading after EOFs
r�ignore)�categoryT)r�r�r�r�r�r�r�r�rrH�maxrZ�catch_warnings�filterwarnings�DeprecationWarningZunread_datar�)rwr�Zfirst_chunkr�ZwindowrP�idx�resultr6r6r7r�Ns4


 


z&BodyPartReader._read_chunk_from_streamc�s�|jr
dS|jr|j��}n|j��IdH}|�|j�rz|�d�}|j}|jd}||ksb||kr�d|_|j�|�dSn4|j��IdH}|�|j�r�|dd�}|j�|�|S)z Reads body part by line by line.r�Ns
s--T���)	r�r��popleftr�r�rkr��rstriprr)rw�lineZsliner�Z
last_boundary�	next_liner6r6r7r�ps$

zBodyPartReader.readlinec�s,|jr
dSx|js&|�|j�IdHqWdS)z0Like read(), but reads all the data to the void.N)r�r�r�)rwr6r6r7r��szBodyPartReader.release)rf)rfr9c�s,|jdd�IdH}|p |jdd�}|�|�S)z;Like read(), but assumes that body part contains text data.T)r�Nzutf-8)�default)r��get_charsetr�)rwrfr�r6r6r7rN�szBodyPartReader.textc�sH|jdd�IdH}|sdS|p(|jdd�}ttttft�|�|���S)z<Like read(), but assumes that body parts contains JSON data.T)r�Nzutf-8)r�)	r�r�rrrUr�json�loadsr�)rwrfr�r6r6r7r��s
zBodyPartReader.jsonc�sL|jdd�IdH}|sgS|dk	r(|}n|jdd�}t|���|�d|d�S)zFLike read(), but assumes that body parts contain form urlencoded data.T)r�Nzutf-8)r�)Zkeep_blank_valuesrf)r�r�rr�r�)rwrfr�Z
real_encodingr6r6r7�form�szBodyPartReader.formcCs|jS)z<Returns True if the boundary was reached or False otherwise.)r�)rwr6r6r7r�szBodyPartReader.at_eof)r�r9cCs,t|jkr|�|�}t|jkr(|�|�S|S)z�Decodes data.

        Decoding is done according the specified Content-Encoding
        or Content-Transfer-Encoding headers value.
        )rr��_decode_content_transferr�_decode_content)rwr�r6r6r7r��s




zBodyPartReader.decodecCsb|j�td���}|dkr*t�|tj�S|dkrDt�|dtj�S|dkrP|Std|����dS)NrL�deflate�gzip��identityzunknown content encoding: )r�r�rr]�zlibZ
decompress�	MAX_WBITS�RuntimeError)rwr�rfr6r6r7r��szBodyPartReader._decode_contentcCsT|j�td���}|dkr$t�|�S|dkr6t�|�S|dkrB|Std�	|���dS)NrL�base64zquoted-printable)�binaryZ8bitZ7bitz%unknown content transfer encoding: {})
r�r�rr]r�Z	b64decode�binasciiZa2b_qpr��format)rwr�rfr6r6r7r��s

z'BodyPartReader._decode_content_transfer)r�r9cCs$|j�td�}t|�}|j�d|�S)z>Returns charset parameter from Content-Type header or default.rL�charset)r�r�rr �
parameters)rwr��ctype�mimetyper6r6r7r��szBodyPartReader.get_charsetcCst|j�t��\}}t|d�S)z|Returns name specified in Content-Disposition header.

        If the header is missing or malformed, returns None.
        rj)r0r�r�rr1)rwrgrbr6r6r7rj�szBodyPartReader.namecCst|j�t��\}}t|d�S)zReturns filename specified in Content-Disposition header.

        Returns None if the header is missing or malformed.
        ri)r0r�r�rr1)rwrgrbr6r6r7ri�szBodyPartReader.filename)%r3r4r5r�r��bytesr*rxrryr}rrzr;r�r�r�r�r�r�r�rUrNrrr�r
rr�rr�r�r�r�r!rjrir6r6r6r7r-�s2"&&r-)�ordercs8eZdZeeedd��fdd�Zedd�dd�Z�ZS)�BodyPartReaderPayloadN)re�args�kwargsr9csTt�j|f|�|�i}|jdk	r,|j|d<|jdk	r@|j|d<|rP|jd|�dS)Nrjri�
attachmentT)r�T)�superrxrjriZset_content_disposition)rwrer�r�rb)�	__class__r6r7rx�s



zBodyPartReaderPayload.__init__)�writerr9c�sN|j}|jdd�IdH}x0|rH|�|�|��IdH|jdd�IdH}qWdS)Ni)r�)rhr��writer�)rwr�Zfieldr�r6r6r7r�s
zBodyPartReaderPayload.write)r3r4r5r-rrxr��
__classcell__r6r6)r�r7r��sr�c@s.eZdZdZeZdZeZe	e
e
fedd�dd�Ze
dd�dd	�Zeedefd�d
d�Zeded
�dd��Zed�dd�Zeedefd�dd�Zdd�dd�Zedefd�dd�Zdedefd�dd�Ze
d�dd�Zed�dd�Zdd�d d!�Zdd�d"d#�Zdd�d$d%�Zdd�d&d'�Z dS)(r+zMultipart body reader.N)r�r~r9cCs:||_d|����|_||_d|_d|_d|_g|_dS)Nz--FT)	r��
_get_boundary�encoder�r��
_last_partr��_at_bofr�)rwr�r~r6r6r7rxszMultipartReader.__init__r-)r9cCs|S)Nr6)rwr6r6r7ry"szMultipartReader.__aiter__c�s|��IdH}|dkrt�|S)N)rzr{)rwr|r6r6r7r}'szMultipartReader.__anext__r2)�responser9cCs|�|||j|j��}|S)z�Constructs reader instance from HTTP response.

        :param response: :class:`~aiohttp.client.ClientResponse` instance
        )�response_wrapper_clsr�r~)�clsr��objr6r6r7�
from_response/s	zMultipartReader.from_responsecCs|jS)z@Returns True if the final boundary was reached, false otherwise.)r�)rwr6r6r7r=szMultipartReader.at_eofc�sb|jr
dS|��IdH|jr4|��IdHd|_n|��IdH|jrLdS|��IdH|_|jS)z#Emits the next multipart body part.NF)r��_maybe_release_last_partr��_read_until_first_boundary�_read_boundary�fetch_next_partr�)rwr6r6r7rzAszMultipartReader.nextc�s6x0|js0|��IdH}|dkr P|��IdHqWdS)z=Reads all the body parts to the void till the final boundary.N)r�rzr�)rwrcr6r6r7r�Ss
zMultipartReader.releasec�s|��IdH}|�|�S)z"Returns the next body part reader.N)�
_read_headers�_get_part_reader)rwr�r6r6r7r�[szMultipartReader.fetch_next_partzCIMultiDictProxy[str])r�r9cCs\|�td�}t|�}|jdkrF|jdkr8t|�||j�S|�||j�S|�|j||j�SdS)z�Dispatches the response by the `Content-Type` header.

        Returns a suitable reader instance.

        :param dict headers: Response headers
        rL�	multipartN)r�rr �type�multipart_reader_clsr��part_reader_clsr�)rwr�r�r�r6r6r7r�bs


z MultipartReader._get_part_readercCsbt|jt�}|jdks td��d|jkr<td|jt��|jd}t|�dkr^td|��|S)Nr�z!multipart/* content type expectedr�z$boundary missed for Content-Type: %s�Fz&boundary %r is too long (70 chars max))r r�rr�r�r��
ValueErrorr�)rwr�r�r6r6r7r�vs

zMultipartReader._get_boundaryc�s |jr|j��S|j��IdHS)N)r�r\r�r�)rwr6r6r7�	_readline�s
zMultipartReader._readlinec�s\xV|��IdH}|dkr&td|j��|��}||jkr<dS||jdkrd|_dSqWdS)Nr�z#Could not find starting boundary %rs--T)r�r�r�r�r�)rwr�r6r6r7r��s
z*MultipartReader._read_until_first_boundaryc�s�|��IdH��}||jkrnv||jdkr~d|_|��IdH}|��IdH}|dd�dkrl|j�|�q�|j�||g�ntd|�d|j����dS)Ns--TrBzInvalid boundary z, expected )r�r�r�r�r�rrr�r�)rwr�Zepiloguer�r6r6r7r��s
zMultipartReader._read_boundaryc�sLdg}x,|j��IdH}|��}|�|�|sPqWt�}|�|�\}}|S)Nr�)r�r�r^rrr"Z
parse_headers)rw�linesr��parserr�Zraw_headersr6r6r7r��s
zMultipartReader._read_headersc�s>|jdk	r:|j��s$|j��IdH|j�|jj�d|_dS)z8Ensures that the last read body part is read completely.N)r�rr�r�r�)rwr6r6r7r��s


z(MultipartReader._maybe_release_last_part)!r3r4r5r�rtr�r�r-r�rrUr*rxrryrrr}�classmethodr�r;rrzr�r�r�r�r�r�r�r�r�r�r6r6r6r7r+s,


r+csreZdZdZd)eeedd��fdd�
Zdd�dd	�Zeee	ee	ee
dd
�dd�Zee
d�d
d�Zed�dd�Zed�dd�Ze�d�Ze�d�Zeed�dd��Zeed�dd��Zd*eeeeed�dd�Zeed�dd�Zd+eeeeed�dd �Zd,e e!e"eefe#eeffeeeed�d!d"�Z$eeed�d#d$��Z%d-eedd&�d'd(�Z&�Z'S).r,zMultipart body writer.�mixedN)�subtyper�r9csr|dk	r|nt��j}y|�d�|_Wntk
rDtd�d�YnXd|�d|j��}t�j	d|d�g|_
dS)N�asciiz(boundary should contain ASCII only charsz
multipart/z; boundary=)�content_type)�uuidZuuid4�hexr�r��UnicodeEncodeErrorr��_boundary_valuer�rx�_parts)rwr�r�r�)r�r6r7rx�szMultipartWriter.__init__)r9cCs|S)Nr6)rwr6r6r7�	__enter__�szMultipartWriter.__enter__)�exc_type�exc_val�exc_tbr9cCsdS)Nr6)rwr�r�r�r6r6r7�__exit__�szMultipartWriter.__exit__cCs
t|j�S)N)�iterr�)rwr6r6r7�__iter__�szMultipartWriter.__iter__cCs
t|j�S)N)r�r�)rwr6r6r7�__len__�szMultipartWriter.__len__cCsdS)NTr6)rwr6r6r7�__bool__�szMultipartWriter.__bool__s\A[!#$%&'*+\-.^_`|~\w]+\Zs[\x00-\x08\x0A-\x1F\x7F]cCs^|j}t�|j|�r|�d�St�|j|�r4td��|�dd�}|�dd�}d|�d�dS)zyWrap boundary parameter value in quotes, if necessary.

        Reads self.boundary and returns a unicode sting.
        r�z*boundary value contains invalid characters�\s\\�"s\"r?)	r�rO�match�_valid_tchar_regexr��search�_invalid_qdtext_char_regexr��replace)rwreZquoted_value_contentr6r6r7r��s
zMultipartWriter._boundary_valuecCs|j�d�S)Nr�)r�r�)rwr6r6r7r�szMultipartWriter.boundary)r�r�r9cCsn|dkrt�}t|t�r.|j�|�|�|�Syt||d�}Wn tk
r^td|��YnX|�|�SdS)N)r�zCannot create payload from %r)	r�
isinstancer&r��update�append_payloadr(r$�	TypeError)rwr�r��payloadr6r6r7rrs

zMultipartWriter.append)rr9cCs�|j�td���}|r,|dkr,td|����|dkr8d}|j�td���}|dkr`td�|���|dkrld}|j}|dk	r�|s�|s�t|�|jt	<|j
�|||f�|S)	z)Adds a new body part to multipart writer.rL)r�r�r�zunknown content encoding: r�N)rLr�zquoted-printabler�z%unknown content transfer encoding: {}r�)r�r�rr]r�rr�r�rUrr�rr)rwrrf�te_encodingr�r6r6r7r&s(

zMultipartWriter.append_payloadcCs |dkrt�}|�t||d��S)zHelper to append JSON part.N)r�)rrr#)rwr�r�r6r6r7�append_jsonFszMultipartWriter.append_jsoncCsVt|ttf�st�|dkr t�}t|t�r6t|���}t|dd�}|�t	||dd��S)z&Helper to append form urlencoded part.NT)Zdoseqz!application/x-www-form-urlencoded)r�r�)
rr
rr�r�listrprrr')rwr�r�r�r6r6r7�append_formOs
zMultipartWriter.append_formcCsxd}xX|jD]N\}}}|s(|s(|jdkr,dS|tdt|j�d|jt|j�d�7}qW|dt|j�d7}|S)zSize of the payload.rNrB�)r�r�r�r�r��_binary_headers)rwZtotalr|rfrr6r6r7r�ds.zMultipartWriter.sizeT)r��close_boundaryr9c�s�x�|jD]�\}}}|�d|jd�IdH|�|j�IdH|sF|r�t|�}|r\|�|�|rj|�|�|�|�IdH|��IdHn|�|�IdH|�d�IdHqW|r�|�d|jd�IdHdS)zWrite body.s--s
Ns--
)r�r�r�r�MultipartPayloadWriter�enable_compression�enable_encoding�	write_eof)rwr�rr|rfr�wr6r6r7r�xs

zMultipartWriter.write)r�N)N)N)N)T)(r3r4r5r�rUrrxr�r�
BaseExceptionrr�r	�_Partr�r�r�r;r�rO�compiler�r��propertyr�r�rrr&rrrrrr
rrr	r�r�r�r6r6)r�r7r,�s2


!
*r,c@sdeZdZedd�dd�Zedd�dd�Zdejfee	dd	�d
d�Z
dd�d
d�Zedd�dd�Z
dS)r
N)r�r9cCs||_d|_d|_d|_dS)N)�_writer�	_encoding�	_compress�_encoding_buffer)rwr�r6r6r7rx�szMultipartPayloadWriter.__init__)rfr9cCs*|dkr||_t�|_n|dkr&d|_dS)Nr�zquoted-printable)rr�r)rwrfr6r6r7r�s

z&MultipartPayloadWriter.enable_encodingr�)rf�strategyr9cCs.|dkrdtjntj}tj||d�|_dS)Nr�r�)Zwbitsr)r�r�Zcompressobjr)rwrfrZ	zlib_moder6r6r7r�sz)MultipartPayloadWriter.enable_compression)r9c�s\|jdk	r.|j��}|r.d|_|�|�IdH|jdkrX|jrX|j�t�|j��IdHdS)Nr�)r�flushr�rrrr��	b64encode)rwr�r6r6r7r�s


z MultipartPayloadWriter.write_eof)r�r9c�s�|jdk	r"|r"|j�|�}|s"dS|jdkr�|j}|dk	s>t�|�|�|r�tt|�d�\}}|d|d�||dd�}|_|r�t�	|�}|j
�|�IdHn6|jdkr�|j
�t�
|��IdHn|j
�|�IdHdS)Nr�r�zquoted-printable)r�compressrrr�r��divmodr�r�rrr�r�Zb2a_qp)rwr�ZbufZdiv�modZ	enc_chunkZb64chunkr6r6r7r��s$


$

zMultipartPayloadWriter.write)r3r4r5rrxrUrr�ZZ_DEFAULT_STRATEGYr�rrr�r�r6r6r6r7r
�sr
)ri)Jr�r�r�rOr�rZr��collectionsr�typesr�typingrrrrrr	r
rrr
rrrrZurllib.parserrrZ	multidictrrrZhdrsrrrrrZhelpersrrr r!Zhttpr"rr#r$r%r&r'r(r)Zstreamsr*�__all__Z
client_reqrepr2�RuntimeWarningr.r/rUr0r1rtr-Z	try_firstr�r+rr,r
r6r6r6r7�<module>sH@$	
"b/{:H

Youez - 2016 - github.com/yon3zu
LinuXploit