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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�=XcA'����dZddlmZddlZddlmZddlmZmZm	Z	gd�Z
Gd�d	e��ZGd
�de��Z
Gd�d
e
��ZGd�de
��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd �d!e��ZGd"�d#e��ZGd$�d%e��ZGd&�d'e��ZGd(�d)e��ZGd*�d+e��ZGd,�d-e��ZGd.�d/e��ZGd0�d1ee ��Z!Gd2�d3e��Z"Gd4�d5e��Z#Gd6�d7e��Z$e$Z%dS)8ay
:mod:`websockets.exceptions` defines the following exception hierarchy:

* :exc:`WebSocketException`
    * :exc:`ConnectionClosed`
        * :exc:`ConnectionClosedError`
        * :exc:`ConnectionClosedOK`
    * :exc:`InvalidHandshake`
        * :exc:`SecurityError`
        * :exc:`InvalidMessage`
        * :exc:`InvalidHeader`
            * :exc:`InvalidHeaderFormat`
            * :exc:`InvalidHeaderValue`
            * :exc:`InvalidOrigin`
            * :exc:`InvalidUpgrade`
        * :exc:`InvalidStatus`
        * :exc:`InvalidStatusCode` (legacy)
        * :exc:`NegotiationError`
            * :exc:`DuplicateParameter`
            * :exc:`InvalidParameterName`
            * :exc:`InvalidParameterValue`
        * :exc:`AbortHandshake`
        * :exc:`RedirectHandshake`
    * :exc:`InvalidState`
    * :exc:`InvalidURI`
    * :exc:`PayloadTooBig`
    * :exc:`ProtocolError`

�)�annotationsN)�Optional�)�datastructures�frames�http11)�WebSocketException�ConnectionClosed�ConnectionClosedError�ConnectionClosedOK�InvalidHandshake�
SecurityError�InvalidMessage�
InvalidHeader�InvalidHeaderFormat�InvalidHeaderValue�
InvalidOrigin�InvalidUpgrade�
InvalidStatus�InvalidStatusCode�NegotiationError�DuplicateParameter�InvalidParameterName�InvalidParameterValue�AbortHandshake�RedirectHandshake�InvalidState�
InvalidURI�
PayloadTooBig�
ProtocolError�WebSocketProtocolErrorc��eZdZdZdS)r	z?
    Base class for all exceptions defined by websockets.

    N��__name__�
__module__�__qualname__�__doc__���7/usr/lib/python3/dist-packages/websockets/exceptions.pyr	r	D����������r)r	c�V�eZdZdZ	ddd
�Zdd�Zedd���Zedd���ZdS)r
aG
    Raised when trying to interact with a closed connection.

    Attributes:
        rcvd (Optional[Close]): if a close frame was received, its code and
            reason are available in ``rcvd.code`` and ``rcvd.reason``.
        sent (Optional[Close]): if a close frame was sent, its code and reason
            are available in ``sent.code`` and ``sent.reason``.
        rcvd_then_sent (Optional[bool]): if close frames were received and
            sent, this attribute tells in which order this happened, from the
            perspective of this side of the connection.

    N�rcvd�Optional[frames.Close]�sent�rcvd_then_sent�Optional[bool]�return�Nonec�0�||_||_||_dS�N�r-r/r0)�selfr-r/r0s    r*�__init__zConnectionClosed.__init__Zs ����	���	�,����r)�strc��|j�&|j�|j�J�dS|j�J�d|j�d�S|j�|j�J�d|j�d�S|j�J�|jrd|j�d|j��Sd|j�d|j��S)Nzno close frame received or sentzsent z; no close frame receivedz	received z; no close frame sentz; then sent z; then received r6�r7s r*�__str__zConnectionClosed.__str__ds����9���y� ��*�2�2�2�8�8��*�2�2�2�C�t�y�C�C�C�C��y� ��*�2�2�2�C�4�9�C�C�C�C��*�6�6�6��&�J�I�t�y�I�I�d�i�I�I�I�I�4�9�I�I�d�i�I�I�Ir)�intc�,�|j�dn|jjS)Ni�)r-�coder;s r*r?zConnectionClosed.codeys���y�(�t�t�d�i�n�<r)c�,�|j�dn|jjS)N�)r-�reasonr;s r*rBzConnectionClosed.reason}s���Y�&�r�r�D�I�,<�<r)r5)r-r.r/r.r0r1r2r3�r2r9)r2r=)	r$r%r&r'r8r<�propertyr?rBr(r)r*r
r
Ks���������$*.�	-�-�-�-�-�J�J�J�J�*�=�=�=��X�=��=�=�=��X�=�=�=r)r
c��eZdZdZdS)rz�
    Like :exc:`ConnectionClosed`, when the connection terminated with an error.

    A close code other than 1000 (OK) or 1001 (going away) was received or
    sent, or the closing handshake didn't complete properly.

    Nr#r(r)r*rr�s���������r)rc��eZdZdZdS)rz�
    Like :exc:`ConnectionClosed`, when the connection terminated properly.

    A close code 1000 (OK) or 1001 (going away) was received and sent.

    Nr#r(r)r*rr�����������r)rc��eZdZdZdS)r
zK
    Raised during the handshake when the WebSocket connection fails.

    Nr#r(r)r*r
r
�r+r)r
c��eZdZdZdS)rzs
    Raised when a handshake request or response breaks a security rule.

    Security limits are hard coded.

    Nr#r(r)r*rr�rGr)rc��eZdZdZdS)rzD
    Raised when a handshake request or response is malformed.

    Nr#r(r)r*rr�r+r)rc�$�eZdZdZddd	�Zd
d
�ZdS)rzJ
    Raised when a HTTP header doesn't have a valid format or value.

    N�namer9�value�
Optional[str]r2r3c�"�||_||_dSr5�rLrM�r7rLrMs   r*r8zInvalidHeader.__init__������	���
�
�
r)c�v�|j�d|j�d�S|jdkrd|j�d�Sd|j�d|j��S)Nzmissing z headerrAzempty zinvalid z	 header: �rMrLr;s r*r<zInvalidHeader.__str__�sW���:��0�d�i�0�0�0�0�
�Z�2�
�
�.�D�I�.�.�.�.�>�d�i�>�>�$�*�>�>�>r)r5�rLr9rMrNr2r3rC�r$r%r&r'r8r<r(r)r*rr�sK��������
�����?�?�?�?�?�?r)rc�$��eZdZdZd�fd
�Z�xZS)rz
    Raised when a HTTP header cannot be parsed.

    The format of the header doesn't match the grammar for that header.

    rLr9�error�header�posr=r2r3c�\��t���||�d|�d|����dS)Nz at z in ��superr8)r7rLrXrYrZ�	__class__s     �r*r8zInvalidHeaderFormat.__init__�s9���
������%�>�>�S�>�>�f�>�>�?�?�?�?�?r))
rLr9rXr9rYr9rZr=r2r3�r$r%r&r'r8�
__classcell__�r^s@r*rr�sQ���������@�@�@�@�@�@�@�@�@�@r)rc��eZdZdZdS)rz~
    Raised when a HTTP header has a wrong value.

    The format of the header is correct but a value isn't acceptable.

    Nr#r(r)r*rr�rGr)rc�$��eZdZdZd�fd�Z�xZS)rzD
    Raised when the Origin header in a request isn't allowed.

    �originrNr2r3c�L��t���d|��dS)N�Originr\)r7rdr^s  �r*r8zInvalidOrigin.__init__�s#���
������6�*�*�*�*�*r))rdrNr2r3r_ras@r*rr�sG���������
+�+�+�+�+�+�+�+�+�+r)rc��eZdZdZdS)rzF
    Raised when the Upgrade or Connection header isn't correct.

    Nr#r(r)r*rr�r+r)rc�"�eZdZdZd
d�Zdd�Zd	S)rzJ
    Raised when a handshake response rejects the WebSocket upgrade.

    �response�http11.Responser2r3c��||_dSr5)ri)r7ris  r*r8zInvalidStatus.__init__�s
�� ��
�
�
r)r9c�"�d|jjd��S)N�+server rejected WebSocket connection: HTTP �d)ri�status_coder;s r*r<zInvalidStatus.__str__�s!��
2��M�-�1�
2�
2�	
r)N)rirjr2r3rCrVr(r)r*rr�sF��������
!�!�!�!�
�
�
�
�
�
r)rc�"�eZdZdZdd�Zd
d
�ZdS)rzC
    Raised when a handshake response status code is invalid.

    ror=�headers�datastructures.Headersr2r3c�"�||_||_dSr5)rorq)r7rorqs   r*r8zInvalidStatusCode.__init__�s��&�������r)r9c��d|j��S)Nrm)ror;s r*r<zInvalidStatusCode.__str__�s��O�T�=M�O�O�Or)N)ror=rqrrr2r3rCrVr(r)r*rr�sL��������
����P�P�P�P�P�Pr)rc��eZdZdZdS)rz6
    Raised when negotiating an extension fails.

    Nr#r(r)r*rrr+r)rc�"�eZdZdZd	d�Zd
d�ZdS)rzK
    Raised when a parameter name is repeated in an extension header.

    rLr9r2r3c��||_dSr5�rL�r7rLs  r*r8zDuplicateParameter.__init__�
����	�	�	r)c��d|j��S)Nzduplicate parameter: rxr;s r*r<zDuplicateParameter.__str__s��2�t�y�2�2�2r)N�rLr9r2r3rCrVr(r)r*rr
sF��������
����3�3�3�3�3�3r)rc�"�eZdZdZd	d�Zd
d�ZdS)rzJ
    Raised when a parameter name in an extension header is invalid.

    rLr9r2r3c��||_dSr5rxrys  r*r8zInvalidParameterName.__init__rzr)c��d|j��S)Nzinvalid parameter name: rxr;s r*r<zInvalidParameterName.__str__ s��5�$�)�5�5�5r)Nr|rCrVr(r)r*rrsF��������
����6�6�6�6�6�6r)rc�"�eZdZdZdd�Zdd	�Zd
S)
rzK
    Raised when a parameter value in an extension header is invalid.

    rLr9rMrNr2r3c�"�||_||_dSr5rPrQs   r*r8zInvalidParameterValue.__init__*rRr)c�r�|j�
d|j��S|jdkr
d|j��Sd|j�d|j��S)Nzmissing value for parameter rAzempty value for parameter zinvalid value for parameter z: rTr;s r*r<zInvalidParameterValue.__str__.sQ���:��=�$�)�=�=�=�
�Z�2�
�
�;��	�;�;�;�K�$�)�K�K�t�z�K�K�Kr)NrUrCrVr(r)r*rr$sL��������
����L�L�L�L�L�Lr)rc�&�eZdZdZ	ddd�Zdd
�ZdS)ra�
    Raised to abort the handshake on purpose and return a HTTP response.

    This exception is an implementation detail.

    The public API
    is :meth:`~websockets.server.WebSocketServerProtocol.process_request`.

    Attributes:
        status (~http.HTTPStatus): HTTP status code.
        headers (Headers): HTTP response headers.
        body (bytes): HTTP response body.
    r)�status�http.HTTPStatusrq�datastructures.HeadersLike�body�bytesr2r3c�T�||_tj|��|_||_dSr5)r�r�Headersrqr�)r7r�rqr�s    r*r8zAbortHandshake.__init__Fs(�����%�-�g�6�6�����	�	�	r)r9c�n�d|jd�dt|j���dt|j���d�S)NzHTTP rnz, z
 headers, z bytes)r��lenrqr�r;s r*r<zAbortHandshake.__str__PsN��
&�D�K�%�
&�
&��4�<� � �
&�
&��4�9�~�~�
&�
&�
&�	
r)N)r))r�r�rqr�r�r�r2r3rCrVr(r)r*rr7sP��������$�	�����
�
�
�
�
�
r)rc�"�eZdZdZd	d�Zd
d�ZdS)rzd
    Raised when a handshake gets redirected.

    This exception is an implementation detail.

    �urir9r2r3c��||_dSr5�r�)r7r�s  r*r8zRedirectHandshake.__init__`s
������r)c��d|j��S)Nzredirect to r�r;s r*r<zRedirectHandshake.__str__cs��(�d�h�(�(�(r)N)r�r9r2r3rCrVr(r)r*rrXsF������������)�)�)�)�)�)r)rc��eZdZdZdS)rz�
    Raised when an operation is forbidden in the current state.

    This exception is an implementation detail.

    It should never be raised in normal circumstances.

    Nr#r(r)r*rrgs���������r)rc�"�eZdZdZd
d�Zdd�Zd	S)rzM
    Raised when connecting to an URI that isn't a valid WebSocket URI.

    r�r9�msgr2r3c�"�||_||_dSr5�r�r�)r7r�r�s   r*r8zInvalidURI.__init__xs���������r)c�$�|j�d|j��S)Nz isn't a valid URI: r�r;s r*r<zInvalidURI.__str__|s���(�:�:���:�:�:r)N)r�r9r�r9r2r3rCrVr(r)r*rrrsF��������
����;�;�;�;�;�;r)rc��eZdZdZdS)rzS
    Raised when receiving a frame with a payload exceeding the maximum size.

    Nr#r(r)r*rr�r+r)rc��eZdZdZdS)r z3
    Raised when a frame breaks the protocol.

    Nr#r(r)r*r r �r+r)r )&r'�
__future__r�http�typingrrArrr�__all__�	Exceptionr	r
rrr
rrrrrrrrrrrrrrr�AssertionErrorrrrr r!r(r)r*�<module>r�s�����<#�"�"�"�"�"�����������,�,�,�,�,�,�,�,�,�,�����:���������4=�4=�4=�4=�4=�)�4=�4=�4=�n�����,���������)���������)���������$���������%����?�?�?�?�?�$�?�?�?�&	@�	@�	@�	@�	@�-�	@�	@�	@����������+�+�+�+�+�M�+�+�+������]����

�

�

�

�

�$�

�

�

� P�P�P�P�P�(�P�P�P������'����
3�
3�
3�
3�
3�)�
3�
3�
3�
6�
6�
6�
6�
6�+�
6�
6�
6�L�L�L�L�L�,�L�L�L�&
�
�
�
�
�%�
�
�
�B)�)�)�)�)�(�)�)�)������%�~����;�;�;�;�;�#�;�;�;������&���������&����'���r)

Youez - 2016 - github.com/yon3zu
LinuXploit