403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.217.6
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
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__/web_request.cpython-37.pyc
B

�Z�_Vg�
@sfddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlmZmZmZmZmZmZmZmZmZmZddlmZddlZddlmZmZmZm Z ddl!m"Z"d	d
l#m$Z$d	dl%m&Z&d	dl'm(Z(m)Z)m*Z*m+Z+m,Z,d	d
l-m.Z.d	dl/m0Z0d	dl1m2Z2m3Z3d	dl4m5Z5m6Z6d	dl7m8Z8m9Z9m:Z:m;Z;m<Z<d	dl=m>Z>d	dl?m@Z@dZAe�r�d	dlBmCZCd	dlDmEZEd	dlFmGZGejHdddd�Gdd�d��ZIejJejKdZLdeL�d�ZMd�Nd �Od!d"�d#ePeQd$d%��D���ZRd&ZSd'jNeReSd(�ZTd)jNeMeTd*�ZUe�Vd+�ZWe�VeU�ZXGd,d-�d-eeYefe*�ZZGd.d/�d/eZ�Z[dS)0�N)�	parsedate)�SimpleCookie)�MappingProxyType)
�
TYPE_CHECKING�Any�Dict�Iterator�Mapping�MutableMapping�Optional�Tuple�Union�cast)�	parse_qsl)�CIMultiDict�CIMultiDictProxy�	MultiDict�MultiDictProxy)�URL�)�hdrs)�AbstractStreamWriter)�DEBUG�
ChainMapProxy�HeadersMixin�reify�sentinel)�RawRequestMessage)�HttpVersion)�BodyPartReader�MultipartReader)�EmptyStreamReader�StreamReader)�DEFAULT_JSON_DECODER�JSONDecoder�LooseHeaders�
RawHeaders�StrOrURL)�HTTPRequestEntityTooLarge)�StreamResponse)�BaseRequest�	FileField�Request)�Application)�RequestHandler)�UrlMappingMatchInfoT)Zauto_attribs�frozen�slotsc@s8eZdZUeed<eed<ejed<eed<ded<dS)r+�name�filename�file�content_typezCIMultiDictProxy[str]�headersN)�__name__�
__module__�__qualname__�str�__annotations__�io�BufferedReader�r>r>�F/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/web_request.pyr+9s


r+z!#$%&'*+.^_`|~-�[z]+z[{}]�ccs|]}t|�VqdS)N)�chr)�.0�cr>r>r?�	<genexpr>HsrE)�	� �!�#�z
\\[\t !-~]z"(?:{quoted_pair}|{qdtext})*")ZqdtextZquoted_pairz0({token})=({token}|{quoted_string})(:\d{{1,4}})?)�tokenZ
quoted_stringz\\([\t !-~])c@sleZdZejejejejejhZ	e
jeddddddddd	d
ddd
ddddg�BZdddddd�e
ededejeeeeefeeeeeedd�dd�Zeeeeeed�eeeeeedd�dd�Zedd�dd ��Zedd�d!d"��Zeeejd�d#d$��Z eed�d%d&��Z!e"e
d�d'd(��Z#e"e$d�d)d*��Z%e"ejd�d+d,��Z&eed-�d.d/�Z'eedd0�d1d2�Z(edd-�d3d4�Z)ed�d5d6�Z*e+ed�d7d8�Z,e"e-d�d9d:��Z.e"e/e0eefd;fd�d<d=��Z1e"ed�d>d?��Z2e"ed�d@dA��Z3e"e4d�dBdC��Z5e"ed�dDdE��Z6e"eed�dFdG��Z7e"e$d�dHdI��Z8e"ed�dJdK��Z9e"ed�dLdM��Z:e"ed�dNdO��Z;e"dPd�dQdR��Z<e"ed�dSdT��Z=e"dUd�dVdW��Z>e"e?d�dXdY��Z@eAeeeeBjBdZ�d[d\��ZCe"eeBjBd�d]d^��ZDe"eeBjBd�d_d`��ZEe"eeBjBd�dadb��ZFe"e-d�dcdd��ZGe"e0eefd�dedf��ZHe"eId�dgdh��ZJe"ed�didj��ZKee-d�dkdl��ZLee-d�dmdn��ZMe"e-d�dodp��ZNdd�dqdr�ZOePd�dsdt�ZQed�dudv�ZReSdw�eTedx�dydz�ZUeVd�d{d|�ZWd}d�d~d�ZXd�eeed��d�d��ZYed�d�d��ZZe[e-d��d�d��Z\e-d�d�d��Z]e^dd��d�d��Z_e`dd��d�d��ZadS)�r*�_message�	_protocol�_payload_writer�_payload�_headers�_method�_version�_rel_url�_post�_read_bytes�_state�_cache�_task�_client_max_size�_loop�_transport_sslcontext�_transport_peernameiN)�client_max_size�state�scheme�host�remoter.zasyncio.Task[None])�message�payload�protocol�payload_writer�task�loopr]r^r_r`ra�returnc
Cs�|dkri}||_||_||_||_|j|_|j|_|j|_	|j
|_d|_d|_
||_i|_||_||_||_|jj}|dk	s�t�|�d�|_|�d�|_|	dk	r�|	|jd<|
dk	r�|
|jd<|dk	r�||jd<dS)NZ
sslcontextZpeernamer_r`ra)rLrMrNrOr6rP�methodrQ�versionrR�urlrSrTrUrVrWrXrYrZ�	transport�AssertionError�get_extra_infor[r\)
�selfrbrcrdrerfrgr]r^r_r`rarlr>r>r?�__init__�s6

zBaseRequest.__init__)ri�rel_urlr6r_r`ra)rirqr6r_r`rarhcCs�|jrtd��i}|tk	r"||d<|tk	rFt|�}||d<t|�|d<|tk	rxtt|��|d<tdd�|��D��|d<|j	j
f|�}	i}
|tk	r�||
d	<|tk	r�||
d
<|tk	r�||
d<|j|	|j|j
|j|j|jf|j|j��d�|
��S)
aClone itself with replacement some attributes.

        Creates and returns a new instance of Request object. If no parameters
        are given, an exact copy is returned. If a parameter is not passed, it
        will reuse the one from the current request object.

        z.Cannot clone request after reading its contentrirk�pathr6css&|]\}}|�d�|�d�fVqdS)zutf-8N)�encode)rC�k�vr>r>r?rE�sz$BaseRequest.clone.<locals>.<genexpr>�raw_headersr_r`ra)r]r^)rU�RuntimeErrorrrr:rr�tuple�itemsrL�_replace�	__class__rOrMrNrXrZrYrV�copy)rorirqr6r_r`raZdctZnew_urlrb�kwargsr>r>r?�clone�s>zBaseRequest.clone)rhcCs|jS)N)rX)ror>r>r?rf�szBaseRequest.taskcCs|jS)N)rM)ror>r>r?rd�szBaseRequest.protocolcCs|jdkrdS|jjS)N)rMrl)ror>r>r?rl�s
zBaseRequest.transportcCs|jS)N)rN)ror>r>r?�writer�szBaseRequest.writercCstjdtdd�|jS)NzRequest.message is deprecated�)�
stacklevel)�warnings�warn�DeprecationWarningrL)ror>r>r?rb�szBaseRequest.messagecCs|jS)N)rS)ror>r>r?rqszBaseRequest.rel_urlcCstjdtdd�|jS)Nz#request.loop property is deprecated�)r�)r�r�r�rZ)ror>r>r?rgszBaseRequest.loop)�keyrhcCs
|j|S)N)rV)ror�r>r>r?�__getitem__szBaseRequest.__getitem__)r��valuerhcCs||j|<dS)N)rV)ror�r�r>r>r?�__setitem__szBaseRequest.__setitem__cCs|j|=dS)N)rV)ror�r>r>r?�__delitem__szBaseRequest.__delitem__cCs
t|j�S)N)�lenrV)ror>r>r?�__len__szBaseRequest.__len__cCs
t|j�S)N)�iterrV)ror>r>r?�__iter__szBaseRequest.__iter__cCs
|jdkS)z5A bool indicating if the request is handled with SSL.�https)r_)ror>r>r?�secure szBaseRequest.secure.cCsfg}�xV|jj�tjd�D�]>}t|�}d}d}i}|�t�|���xd|kr^|k�rXnn�t	�
||�}|dk	r�|r�|�d|�}n\|��\}}	}
|	ddkr�t
�d|	dd	��}	|
r�|	|
7}	|	||��<|t|�d��7}d
}qH||dk�rd}i}|�t�|��|d7}qH||dk�r2d}|d7}qH||dk�rJ|d7}qH|�d|�}qHWqWt|�S)
a�A tuple containing all parsed Forwarded header(s).

        Makes an effort to parse Forwarded headers as specified by RFC 7239:

        - It adds one (immutable) dictionary per Forwarded 'field-value', ie
          per proxy. The element corresponds to the data in the Forwarded
          field-value added by the first proxy encountered by the client. Each
          subsequent item corresponds to those added by later proxies.
        - It checks that every value has valid syntax in general as specified
          in section 4: either a 'token' or a 'quoted-string'.
        - It un-escapes found escape sequences.
        - It does NOT validate 'by' and 'for' contents as specified in section
          6.
        - It does NOT validate 'host' contents (Host ABNF).
        - It does NOT validate 'proto' contents for valid URI scheme names.

        Returns a tuple containing one or more immutable dicts
        r>rFN�,�"z\1r���T�;z 	)rLr6ZgetallrZ	FORWARDEDr��append�typesr�_FORWARDED_PAIR_RE�match�find�groups�_QUOTED_PAIR_REPLACE_RE�sub�lower�grouprx)roZelemsZfield_value�length�posZneed_separator�elemr�r2r�Zportr>r>r?�	forwarded%s@


zBaseRequest.forwardedcCs|jr
dSdSdS)aA string representing the scheme of the request.

        Hostname is resolved in this order:

        - overridden value by .clone(scheme=new_scheme) call.
        - type of connection to peer: HTTPS if socket is SSL, HTTP otherwise.

        'http' or 'https'.
        r�ZhttpN)r[)ror>r>r?r_bszBaseRequest.schemecCs|jS)zyRead only property for getting HTTP method.

        The value is upper-cased str like 'GET', 'POST', 'PUT' etc.
        )rQ)ror>r>r?rirszBaseRequest.methodcCs|jS)zxRead only property for getting HTTP version of request.

        Returns aiohttp.protocol.HttpVersion instance.
        )rR)ror>r>r?rjzszBaseRequest.versioncCs(|jj�tj�}|dk	r|St��SdS)z�Hostname of the request.

        Hostname is resolved in this order:

        - overridden value by .clone(host=new_host) call.
        - HOST HTTP header
        - socket.getfqdn() value
        N)rLr6�getrZHOST�socketZgetfqdn)ror`r>r>r?r`�s
zBaseRequest.hostcCs$t|jttf�r|jdS|jSdS)z�Remote IP of client initiated HTTP request.

        The IP is resolved in this order:

        - overridden value by .clone(remote=new_remote) call.
        - peername of opened socket
        rN)�
isinstancer\�listrx)ror>r>r?ra�s	
zBaseRequest.remotecCstj|j|jd�}|�|j�S)N)r_r`)rZbuildr_r`�joinrS)rorkr>r>r?rk�szBaseRequest.urlcCs|jjS)z_The URL including *PATH INFO* without the host or scheme.

        E.g., ``/app/blog``
        )rSrr)ror>r>r?rr�szBaseRequest.pathcCs
t|j�S)zXThe URL including PATH_INFO and the query string.

        E.g, /app/blog?id=10
        )r:rS)ror>r>r?�path_qs�szBaseRequest.path_qscCs|jjS)z�The URL including raw *PATH INFO* without the host or scheme.
        Warning, the path is unquoted and may contains non valid URL characters

        E.g., ``/my%2Fpath%7Cwith%21some%25strange%24characters``
        )rLrr)ror>r>r?�raw_path�szBaseRequest.raw_pathzMultiDictProxy[str]cCs|jjS)z7A multidict with all the variables in the query string.)rS�query)ror>r>r?r��szBaseRequest.querycCs|jjS)z:The query string in the URL.

        E.g., id=10
        )rS�query_string)ror>r>r?r��szBaseRequest.query_stringzCIMultiDictProxy[str]cCs|jS)z4A case-insensitive multidict proxy with all headers.)rP)ror>r>r?r6�szBaseRequest.headerscCs|jjS)z$A sequence of pairs for all headers.)rLrv)ror>r>r?rv�szBaseRequest.raw_headers)�	_date_strrhcCs8|dk	r4t|�}|dk	r4tj|dd�dtjji�SdS)z/Process a date string, return a datetime objectN�Ztzinfo)r�datetimeZtimezoneZutc)r�Z	timetupler>r>r?�
_http_date�s
zBaseRequest._http_datecCs|�|j�tj��S)zyThe value of If-Modified-Since HTTP header, or None.

        This header is represented as a `datetime` object.
        )r�r6r�rZIF_MODIFIED_SINCE)ror>r>r?�if_modified_since�szBaseRequest.if_modified_sincecCs|�|j�tj��S)z{The value of If-Unmodified-Since HTTP header, or None.

        This header is represented as a `datetime` object.
        )r�r6r�rZIF_UNMODIFIED_SINCE)ror>r>r?�if_unmodified_since�szBaseRequest.if_unmodified_sincecCs|�|j�tj��S)zpThe value of If-Range HTTP header, or None.

        This header is represented as a `datetime` object.
        )r�r6r�rZIF_RANGE)ror>r>r?�if_range�szBaseRequest.if_rangecCs
|jjS)zIs keepalive enabled by client?)rLZshould_close)ror>r>r?�
keep_alive�szBaseRequest.keep_alivecCs.|j�tjd�}t|�}tdd�|��D��S)zMReturn request cookies.

        A read-only dictionary-like object.
        rAcSsi|]\}}|j|�qSr>)r�)rCr��valr>r>r?�
<dictcomp>sz'BaseRequest.cookies.<locals>.<dictcomp>)r6r�rZCOOKIErrry)ro�rawZparsedr>r>r?�cookies�szBaseRequest.cookiescCs�|j�tj�}d\}}|dk	r�yd}t�||�d\}}Wntk
rVtd��YnX|rdt|�nd}|rtt|�nd}|dkr�|dk	r�|}d}|dk	r�|dk	r�|d7}||kr�td��||kr�dkr�nntd��t	||d�S)	zMThe content of Range HTTP header.

        Return a slice instance.

        )NNNz^bytes=(\d*)-(\d*)$rzrange not in acceptable formatrzstart cannot be after endz"No start or end of range specified)
rPr�r�RANGE�re�findall�
IndexError�
ValueError�int�slice)ro�rng�start�end�patternr>r>r?�
http_ranges(zBaseRequest.http_rangecCs|jS)zReturn raw payload stream.)rO)ror>r>r?�content)szBaseRequest.contentcCstjdtdd�|j��S)z@Return True if request's HTTP BODY can be read, False otherwise.z$Deprecated, use .can_read_body #2005r�)r�)r�r�r�rO�at_eof)ror>r>r?�has_body.szBaseRequest.has_bodycCs|j��S)z@Return True if request's HTTP BODY can be read, False otherwise.)rOr�)ror>r>r?�
can_read_body6szBaseRequest.can_read_bodycCst|j�tk	S)z6Return True if request has HTTP BODY, False otherwise.)�typerOr!)ror>r>r?�body_exists;szBaseRequest.body_existsc�s$x|j��s|j��IdHqWdS)zKRelease request.

        Eat unread part of HTTP BODY if present.
        N)rOr��readany)ror>r>r?�release@szBaseRequest.releasec�sl|jdkrft�}xJ|j��IdH}|�|�|jrRt|�}||jkrRt|j|d��|sPqWt|�|_|jS)z_Read request body if present.

        Returns bytes object with full request content.
        N)�max_size�actual_size)	rU�	bytearrayrOr��extendrYr�r(�bytes)ro�body�chunkZ	body_sizer>r>r?�readHs



zBaseRequest.readc�s"|��IdH}|jpd}|�|�S)z1Return BODY as text using encoding from .charset.Nzutf-8)r��charset�decode)roZ
bytes_body�encodingr>r>r?�text]s
zBaseRequest.text)�loads)r�rhc�s|��IdH}||�S)zReturn BODY as JSON.N)r�)ror�r�r>r>r?�jsoncszBaseRequest.jsonc�st|j|j�S)z3Return async iterator to process BODY as multipart.)r rPrO)ror>r>r?�	multiparthszBaseRequest.multipartz,MultiDictProxy[Union[str, bytes, FileField]]c�s�|jdk	r|jS|j|jkr.tt��|_|jS|j}|dkrNtt��|_|jSt�}|dk�r2|��IdH}|j}|��IdH}�x�|dk	�r.d}|j	�
tj�}t
|t��r|jdk	s�t�|j�r�t��}|jdd�IdH}	xd|	�r@|�|	�}	|�|	�|t|	�7}d|k�r|k�r,nnt||d��|jdd�IdH}	q�W|�d�|dk�rZd}t|j|jttj|�||j	�}
|�|j|
�n�|jd	d
�IdH}|dk�s�|� d��r�|j!dd
�}|�|j|�|��n|�|j|�|t|�7}d|k�r|k�rnnt||d��nt"d��|��IdH}q�Wn>|��IdH}
|
�rp|j#�pPd}|�$t%|
�&��|�d	|d��t|�|_|jS)zReturn POST parameters.N)rAz!application/x-www-form-urlencodedzmultipart/form-datazmultipart/form-datari)�size)r�r�zapplication/octet-streamT)r�ztext/zutf-8)�defaultz8To decode nested multipart you need to use custom reader)Zkeep_blank_valuesr�)'rTrQ�POST_METHODSrrr5r�rY�nextr6r�rZCONTENT_TYPEr�rr2rmr3�tempfileZ
TemporaryFileZ
read_chunkr��writer�r(�seekr+rr<r=�addr��
startswithZget_charsetr�r�r�r�rstrip)ror5�outr�r�Zfieldr�Zfield_ctZtmpr�Zffr�r��datar>r>r?�postls~









zBaseRequest.post)r2r�rhcCs0|j}|dkr|S|j}|dkr$|S|�||�S)z"Extra info from protocol transportN)rMrlrn)ror2r�rdrlr>r>r?rn�szBaseRequest.get_extra_infocCs(|j�dd��d�}d�|jj|j|�S)N�ascii�backslashreplacez<{} {} {} >)rrrsr��formatr{r7rQ)roZascii_encodable_pathr>r>r?�__repr__�szBaseRequest.__repr__)�otherrhcCst|�t|�kS)N)�id)ror�r>r>r?�__eq__�szBaseRequest.__eq__cCsdS)NTr>)ror>r>r?�__bool__�szBaseRequest.__bool__)�responserhc�sdS)Nr>)ror�r>r>r?�
_prepare_hook�szBaseRequest._prepare_hook)�excrhcCs|j�|�dS)N)rOZ
set_exception)ror�r>r>r?�_cancel�szBaseRequest._cancel)N)br7r8r9rZ
METH_PATCHZ	METH_POSTZMETH_PUTZ
METH_TRACEZMETH_DELETEr�r�ATTRS�	frozensetrr"r�asyncioZAbstractEventLoopr�rrr:rrprr'r%r~�propertyrfrdZ	Transportrlrrrbrrqrgr�r�r�r�rr��boolr�rr	r�r_rirrjr`rarkrrr�r�r�r�r6r&rv�staticmethodr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r#r$r�r r�r�rnr��objectr�r�r)r��
BaseExceptionr�r>r>r>r?r*as�

6&0 <
	#_r*c	s�eZdZejedg�BZeedd��fdd�ZerHe	edd��fdd�Z
eeeeeed	�e	ee
e	e	e	dd
��fdd�Zed
d�dd��Zedd�dd��Zeed�dd��Zedd�dd�Z�ZS)r,�_match_infoN)�argsr}rhcst�j||�d|_dS)N)�superrpr�)ror�r})r{r>r?rp�szRequest.__init__)r2r�rhcs8||jkr&tjd�|jj|�tdd�t��||�dS)Nz-Setting custom {}.{} attribute is discouragedr�)r�)	r�r�r�r�r{r7r�r��__setattr__)ror2r�)r{r>r?r��s

zRequest.__setattr__)rirqr6r_r`ra)rirqr6r_r`rarhc	s.t�j||||||d�}tt|�}|j|_|S)N)rirqr6r_r`ra)r�r~rr,r�)	rorirqr6r_r`raZretZnew_ret)r{r>r?r~s

z
Request.cloner/)rhcCs|j}|dk	st�|S)zResult of route resolving.N)r�rm)ro�
match_infor>r>r?rszRequest.match_infor-cCs|j}|dk	st�|jS)zApplication instance.N)r�rmZcurrent_app)rorr>r>r?�app"szRequest.appcCsH|j}|dk	st�|j}|j}|�|�}tt|d|d���}t|�S)Nr)r�rmZappsr�indexr��reversedr)rorZlstr�idxZsublistr>r>r?�config_dict)s
zRequest.config_dict)r�rhc�s:|j}|dkrdSx"|jD]}|j�||�IdHqWdS)N)r�Z_appsZon_response_prepare�send)ror�rrr>r>r?r�3s
zRequest._prepare_hook)r7r8r9r*r�r�rrprr:r�rr'r%r~rrr�rrrr)r��
__classcell__r>r>)r{r?r,�s$	

	r,)\r�r�r<r�r��stringr�r�r�Zemail.utilsrZhttp.cookiesrr�typingrrrrr	r
rrr
rZurllib.parser�attrZ	multidictrrrrZyarlrrAr�abcrZhelpersrrrrrZhttp_parserrZhttp_writerrr�rr Zstreamsr!r"Ztypedefsr#r$r%r&r'Zweb_exceptionsr(Zweb_responser)�__all__Zweb_appr-Zweb_protocolr.Zweb_urldispatcherr/�sr+ZdigitsZ
ascii_lettersZ_TCHARZ_TOKENr�r�rx�rangeZ_QDTEXTZ_QUOTED_PAIRZ_QUOTED_STRINGZ_FORWARDED_PAIR�compiler�r�r:r*r,r>r>r>r?�<module>sd0	$





Youez - 2016 - github.com/yon3zu
LinuXploit