403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
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/jeepney/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/jeepney/__pycache__/low_level.cpython-311.pyc
�

+�c�J���ddlmZddlmZmZmZddlZddlmZGd�de	��Z
Gd�de��Zejej
d	�ZGd
�de��ZGd�d
e��ZGd�de��Zd�ZGd�d��ZGd�de��ZGd�de��Zedd��edd��edd��e��edd��edd��edd ��edd!��edd"��e��d#�
ZGd$�d%��Ze�eed&��eed&��eed'��d(���Gd)�d*��ZGd+�d,e��ZGd-�d.��ZGd/�d0��Zd1�Zd2�Zeeed'e��g����Zd3�Z d4d5d5d5d&d5d5d6d&d7�	Z!d8�Z"Gd9�d:��Z#Gd;�d<��Z$Gd=�d>��Z%Gd?�d@��Z&dS)A�)�deque)�Enum�IntEnum�IntFlagN)�Optionalc��eZdZdZdS)�SizeLimitErrorz�Raised when trying to (de-)serialise data exceeding D-Bus' size limit.

    This is currently only implemented for arrays, where the maximum size is
    64 MiB.
    N)�__name__�
__module__�__qualname__�__doc__���3/usr/lib/python3/dist-packages/jeepney/low_level.pyr	r	s��������
	�Drr	c�"�eZdZdZdZd�Zd�ZdS)�
Endianness��c�&�|tjurdndS)N�<�>�r�little��selfs r�struct_codezEndianness.struct_codes���z�0�0�0�s�s�s�:rc�&�|tjurdndS)N�l�Brrs r�	dbus_codezEndianness.dbus_codes���
� 1�1�1�t�t��<rN)r
rrr�bigrr rrrrrs<������
�F�
�C�;�;�;�=�=�=�=�=rr)rrc��eZdZdZdZdZdZdS)�MessageTyperr��N)r
rr�method_call�
method_return�error�signalrrrr#r#s"�������K��M�
�E�
�F�F�Frr#c��eZdZdZdZdZdS)�MessageFlagrrr%N)r
rr�no_reply_expected�
no_auto_start�allow_interactive_authorizationrrrr+r+#s!���������M�&'�#�#�#rr+c�2�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
S)�HeaderFieldsrrr$r%�����	N)r
rr�path�	interface�member�
error_name�reply_serial�destination�sender�	signature�unix_fdsrrrr0r0)s;�������D��I�
�F��J��L��K�
�F��I��H�H�Hrr0c�&�|||zz
}||krdS|S�Nrr)�pos�step�pads   r�paddingrD5s#��
�#��*�
�C�
�d�{�{��q��Jrc�0�eZdZd�Zdd�Zd	d�Zd�Zd�ZdS)
�	FixedTypec�0�|x|_|_||_dS�N)�size�	alignmentr)rrIrs   r�__init__zFixedType.__init__=s��%)�)��	�D�N�&����rrc���|t||j��z
}|���|jz}tj|||||jz���d}|||jzfSr@)rDrJr�struct�unpackrI)r�bufrA�
endianness�fds�code�vals       r�
parse_datazFixedType.parse_dataAsh���w�s�D�N�+�+�+���%�%�'�'�$�*:�:���m�D�#�c�#��	�/�&9�":�;�;�A�>���C�$�)�O�#�#rNc��dt||j��z}|���|jz}|tj||��zS)N�)rDrJrrM�pack)r�datarArPrQrCrRs       r�	serialisezFixedType.serialiseGsH���g�c�4�>�2�2�2���%�%�'�'�$�*:�:���V�[��t�,�,�,�,rc�B�d�|j|j��S)NzFixedType({!r}, {!r}))�formatrIrrs r�__repr__zFixedType.__repr__Ls��&�-�-�d�i��9I�J�J�Jrc�n�t|��tuo|j|jko|j|jkSrH)�typerFrIr�r�others  r�__eq__zFixedType.__eq__Os8���U���y�(�<�t�y�E�J�/F�<��%��):�:�	<r�rrH)r
rrrKrTrYr\rarrrrFrF<sl������'�'�'�$�$�$�$�-�-�-�-�
K�K�K�<�<�<�<�<rrFc�6��eZdZ�fd�Zd�fd�	Zd�Zd�Z�xZS)�Booleanc�L��t���dd��dS�Nr%�I��superrK�r�	__class__s �rrKzBoolean.__init__U�#���
������C� � � � � rrc�r��t���|||��\}}t|��|fSrH)rirT�bool)rrOrArPrQrS�new_posrks       �rrTzBoolean.parse_dataXs3����w�w�)�)�#�s�J�?�?���W��C�y�y�'�!�!rc��dS)Nz	Boolean()rrs rr\zBoolean.__repr__\����{rc�.�t|��tuSrH)r^rdr_s  rrazBoolean.__eq___����E�{�{�g�%�%rrb)r
rrrKrTr\ra�
__classcell__�rks@rrdrdTst�������!�!�!�!�!�"�"�"�"�"�"����&�&�&�&�&�&�&rrdc�B��eZdZ�fd�Zd�fd�	Zd	�fd�	Zd�Zd�Z�xZS)
�FileDescriptorc�L��t���dd��dSrfrhrjs �rrKzFileDescriptor.__init__drlrrc�d��t���|||��\}}|||fSrH)rirT)rrOrArPrQ�idxrorks       �rrTzFileDescriptor.parse_datags1����w�w�)�)�#�s�J�?�?���W��3�x�� � rNc���|�td���t|d��r|���}t|t��st|t
��st
d���|dkrtd|�d����|�|��t���
t|��dz
||��S)Nz+Sending FDs is not supported or not enabled�filenozYCannot use {data!r} as file descriptor. Expected an int or an object with fileno() methodrz#File descriptor can't be negative (�)r)�RuntimeError�hasattrr|�
isinstancern�int�	TypeError�
ValueError�appendrirY�len)rrXrArPrQrks     �rrYzFileDescriptor.serialiseks�����;��L�M�M�M��4��"�"�	!��;�;�=�=�D��d�D�!�!�	H��D�#�)>�)>�	H��G�H�H�
H��!�8�8��J�4�J�J�J�K�K�K��
�
�4�����w�w� � ��S���A��s�J�?�?�?rc��dS)NzFileDescriptor()rrs rr\zFileDescriptor.__repr__{s��!�!rc�.�t|��tuSrH)r^rwr_s  rrazFileDescriptor.__eq__~s���E�{�{�n�,�,rrbrH)	r
rrrKrTrYr\rartrus@rrwrwcs��������!�!�!�!�!�!�!�!�!�!�!�@�@�@�@�@�@� "�"�"�-�-�-�-�-�-�-rrwr�Br�h�Hr%�irgr4�q�Q�d)
�y�nr��br��u�x�tr�r�c�F�eZdZd�Zed���Zd	d�Zd
d�Zd�Zd�Z	dS)�
StringTypec��||_dSrH)�length_type)rr�s  rrKzStringType.__init__�s��&����rc��|jjSrH)r�rIrs rrJzStringType.alignment�s����$�$rrc��|j�|||��\}}||z}|||��d��}|||dz�dksJ�||dzfS)N�utf-8rrV)r�rT�decode)rrOrArPrQ�length�endrSs        rrTzStringType.parse_data�sp���&�1�1�#�s�J�G�G�����F�l���#�c�'�l�!�!�'�*�*���3�s�Q�w�;��5�(�(�(�(��C�!�G�|�rNc��t|t��s"td�|�����|�d��}|j�t|��||��}||zdzS)NzExpected str, not {!r}r�rV)r��strr�r[�encoder�rYr�)rrXrArPrQ�encoded�len_datas       rrYzStringType.serialise�ss���$��$�$�	C��4�;�;�D�A�A�B�B�B��+�+�g�&�&���#�-�-�c�'�l�l�C��L�L���'�!�E�)�)rc�6�d�|j��S)NzStringType({!r}))r[r�rs rr\zStringType.__repr__�s��!�(�(��)9�:�:�:rc�N�t|��tuo|j|jkSrH)r^r�r�r_s  rrazStringType.__eq__�s(���U���z�)�;��$��(9�9�	;rrbrH)
r
rrrK�propertyrJrTrYr\rarrrr�r��s�������'�'�'��%�%��X�%�����*�*�*�*�;�;�;�;�;�;�;�;rr�r�r�)�s�o�gc�4�eZdZdZd�Zd	d�Zd
d�Zd�Zd�ZdS)�Structr4c�d�td�|D����rtd���||_dS)Nc3�@K�|]}t|t��V��dSrH)r��	DictEntry)�.0�fs  r�	<genexpr>z"Struct.__init__.<locals>.<genexpr>�s,����8�8�A�z�!�Y�'�'�8�8�8�8�8�8rzFound dict entry outside array)�anyr��fields)rr�s  rrKzStruct.__init__�s;���8�8��8�8�8�8�8�	>��<�=�=�=�����rrc���|t|d��z
}g}|jD]3}|�||||���\}}|�|���4t	|��|fS)Nr4�rQ)rDr�rTr��tuple)rrOrArPrQ�res�field�vs        rrTzStruct.parse_data�sk���w�s�A��������[�	�	�E��%�%�c�3�
��%�D�D�F�A�s��J�J�q�M�M�M�M��S�z�z�3��rNc	��t|t��s"td�|�����t	|��t	|j��krBt
d�t	|��t	|j�������dt||j��z}|t	|��z
}g}t||j��D]I\}}|�
|�||||�����|t	|d��z
}�J|d�|��zS)NzExpected tuple, not {!r}z{} entries for {} fieldsrVr����r)
r�r�r�r[r�r�r�rDrJ�zipr�rY�join)	rrXrArPrQrC�
res_pieces�itemr�s	         rrYzStruct.serialise�s)���$��&�&�	E��6�=�=�d�C�C�D�D�D��t�9�9��D�K�(�(�(�(��7�>�>��D�	�	�3�t�{�+�+�����
��g�c�4�>�2�2�2���s�3�x�x����
��t�T�[�1�1�	'�	'�K�D�%����e�o�o�d�C���o�M�M�N�N�N��3�z�"�~�&�&�&�C�C��S�X�X�j�)�)�)�)rc�\�d�t|��j|j��S)Nz{}({!r}))r[r^r
r�rs rr\zStruct.__repr__�s#��� � ��d���!4�d�k�B�B�Brc�^�t|��t|��uo|j|jkSrH)r^r�r_s  rraz
Struct.__eq__�s'���U���t�D�z�z�)�L���u�|�0K�LrrbrH)	r
rrrJrKrTrYr\rarrrr�r��sv�������I����
����
*�
*�
*�
*�C�C�C�M�M�M�M�Mrr�c���eZdZ�fd�Z�xZS)r�c�\��t|��dkrtdt|��z���t|dttf��s5td�t
|d�������t���|��dS)Nrz%Dict entry must have 2 fields, not %drz5First field in dict entry must be simple type, not {})	r�r�r�rFr�r[r^rirK)rr�rks  �rrKzDictEntry.__init__�s�����v�;�;�!����7�#�f�+�+�E�G�G�
G��&��)�i��%<�=�=�	*��G����V�A�Y���(�(�*�*�
*�	������ � � � � r)r
rrrKrtrus@rr�r��s8�������!�!�!�!�!�!�!�!�!rr�c�L�eZdZdZedd��Zd�Zd
d�Zdd�Zd�Z	d	�Z
dS)�Arrayr%rgc��||_dSrH)�elt_type)rr�s  rrKzArray.__init__�s
�� ��
�
�
rrc��|j�|||��\}}|t||jj��z
}||z}|jt
dkr|||�|fSg}||kr<|j�||||���\}}|�|��||k�<t|jt��rt|��}||fS)Nr�r�)
r�rTrDr�rJ�simple_typesr�r�r��dict)	rrOrArPrQr�r�r�r�s	         rrTzArray.parse_data�s����&�1�1�#�s�J�G�G�����w�s�D�M�3�4�4�4���F�l���=�L��-�-�-��s�3�w�<��$�$����C�i�i��]�-�-�c�3�
��-�L�L�F�A�s��J�J�q�M�M�M��C�i�i��d�m�Y�/�/�	��s�)�)�C��C�x�rNc	���d}t|jt��r*t|t��r|���}ne|jt
dkrt|t��rd}n7t|t��s"td�	|�����t|jt��r/|jjt|��zdkrtd���t||j��}||zdz}t||jj��}|r|}	n�||z}
|
dz}g}|D]`}
|�|j�|
|
||�����|
t|d	��z
}
|
|krtd����ad
�|��}	|j�t|	��||z|��}d|z|zd|zz|	zS)NFr�TzNot suitable for array: {!r}izArray size exceeds 64 MiB limitr%r�r�rrV)r�r�r�r��itemsr��bytes�listr�r[rFrIr�r	rDrJr�rYr�r�)rrXrArPrQ�
data_is_bytes�pad1�pos_after_length�pad2rO�data_pos�	limit_pos�chunksr�r�s               rrYzArray.serialise�s���
��d�m�Y�/�/�	I�J�t�T�4J�4J�	I��:�:�<�<�D�D��m�|�C�0�0�0�j��u�6M�6M�0� �M�M��D�$�'�'�	I��:�A�A�$�G�G�H�H�H��d�m�Y�/�/�	H��
�"�S��Y�Y�.�%�7�7�$�%F�G�G�G��s�D�N�+�+����:��>���'���)@�A�A���
	#��C�C�'�$�.�H� �7�*�I��F��
L�
L���
�
�d�m�5�5��(�J�C�6�������C��r�
�O�O�+���i�'�'�(�)J�K�K�K�(��(�(�6�"�"�C��#�-�-�c�#�h�h��D��*�M�M������(�E�D�L�9�C�?�?rc�6�d�|j��S)NzArray({!r}))r[r�rs rr\zArray.__repr__%s���#�#�D�M�2�2�2rc�N�t|��tuo|j|jkSrH)r^r�r�r_s  rrazArray.__eq__(s!���U���u�$�K�4�=�E�N�+J�KrrbrH)r
rrrJrFr�rKrTrYr\rarrrr�r��s��������I��)�A�s�#�#�K�!�!�!�����$$@�$@�$@�$@�L3�3�3�L�L�L�L�Lrr�c�.�eZdZdZdd�Zd	d�Zd�Zd�ZdS)
�Variantrrc���td�|||��\}}tt|����}|�||||���\}}||f|fS�Nr�r�)r�rT�parse_signaturer�)rrOrArPrQ�sig�valtyperSs        rrTzVariant.parse_data/sc����$�/�/��S�*�E�E���S�!�$�s�)�)�,�,���%�%�c�3�
��%�D�D���S��S�z�3��rNc���|\}}tt|����}td�|||��}||�||t	|��z||���zSr�)r�r�r�rYr�)rrXrArPrQr�r��sig_bufs        rrYzVariant.serialise8sr���	��T�!�$�s�)�)�,�,���s�#�-�-�c�3�
�C�C����*�*��#��G���$�j�c�+�
�
�
�	
rc��dS)Nz	Variant()rrs rr\zVariant.__repr__@rqrc�.�t|��tuSrH)r^r�r_s  rrazVariant.__eq__CrsrrbrH)r
rrrJrTrYr\rarrrr�r�,s_�������I�����
�
�
�
����&�&�&�&�&rr�c�p�|�d��}|dkrtt|����S|dkrt��S|dkr`g}|ddkr.|�t|����|ddk�.|�d��t|��S|dkr`g}|ddkr.|�t|����|ddk�.|�d��t
|��S|dvrtd	���t|S)
z-Parse a symbolic signature into objects.
    r�ar��(r}�{�}z)}zUnexpected end of struct)	�popr�r�r�r�r�r�r�r�)r��tokenr��des    rr�r�Fs&��
�G�G�A�J�J�E���|�|��_�S�)�)�*�*�*���|�|��y�y��	�#������!�f��m�m��M�M�/�#�.�.�/�/�/��!�f��m�m�����
�
�
��f�~�~��	�#���
���!�f��m�m��I�I�o�c�*�*�+�+�+��!�f��m�m�����
�
�
���}�}��	�$����3�4�4�4��E�"�"rc�`�tjd|dd���\}t|}tj|���dz|dd���\}tj|���dz|dd���\}d|z}|t	|d��z|zS)N�crrgr%r4��)rMrN�
endian_maprrD)rO�endian�body_length�fields_array_len�
header_lens     r�
calc_msg_sizer�as����m�C��R�a�R��)�)�G�F�
��
�F��=��!3�!3�!5�!5��!;�S��1��X�F�F�L�K��
�f�&8�&8�&:�&:�S�&@�#�b��e�*�M�M����&�&�J���
�A�.�.�.��<�<rc�\�t�|d|��\}}d�|D��|fS)Nr�c�@�i|]\}}t|��|d��S)r)r0)r��kr�s   r�
<dictcomp>z'parse_header_fields.<locals>.<dictcomp>os(��2�2�2�f�q�!�L��O�O�Q�q�T�2�2�2r)�_header_fields_typerT)rOrP�lrAs    r�parse_header_fieldsr�ms6��
 �
+�
+�C��Z�
@�
@�F�A�s�2�2��2�2�2�C�7�7rr�r�r�)	rrr$r%r1r2r3r4r5c��d�t|�����D��}t�|d|��S)Nc�@�g|]\}}|jt||ff��Sr)�value�header_field_codes)r�r�r�s   r�
<listcomp>z+serialise_header_fields.<locals>.<listcomp>�s.��O�O�O�6�A�q�!�'�&�q�)�1�-�	.�O�O�Orr�)�sortedr�r�rY)r�rPr�s   r�serialise_header_fieldsrs=��O�O�V�A�G�G�I�I�=N�=N�O�O�O�A��(�(��B�
�;�;�;rc�8�eZdZd�Zd�Zdd�Zed���ZdS)�Headerc��||_t|��|_t|��|_||_||_||_||_dS)z�A D-Bus message header

        It's not normally necessary to construct this directly: use higher level
        functions and methods instead.
        N)	rPr#�message_typer+�flags�protocol_versionr��serialr�)rrPrrrr�r	r�s        rrKzHeader.__init__�sL��%���'��5�5��� ��'�'��
� 0���&����������rc	�~�d�|j|j|j|j|j|j|j��S)Nz7Header({!r}, {!r}, {!r}, {!r}, {!r}, {!r}, fields={!r}))r[rPrrrr�r	r�rs rr\zHeader.__repr__�s>��H�O�O��O�T�.��
��!�4�#3�T�[�$�+�O�O�	OrNc	��|j���dz}|�|j}tj||j���|jj|j|j	|j
|��t|j|j��zS)N�cBBBII)
rPrr	rMrWr rr�rrr�rr�)rr	r�s   rrYzHeader.serialise�s����O�'�'�)�)�H�4���>��[�F��{�1�d�o�7�7�9�9��,�2�D�J��0��+�V�5�5�*�$�+�t��G�G�	H�	Hrc	��tjd|dd���\}}}}t|}tj|���dz|dd���\}}t	||��\}}	||||||||��|	fS)N�cBBBr%�IIr�)rMrNr�rr�)
�clsrOr��msgtyper�pv�bodylenr	r�rAs
          r�from_bufferzHeader.from_buffer�s���%+�]�6�3�r��r�7�%C�%C�"������F�#�� �-��(:�(:�(<�(<�t�(C�S��2��Y�O�O����)�#�v�6�6�����s�6�7�E�2�w���G�G��L�LrrH)r
rrrKr\rY�classmethodrrrrrr�sm������
�
�
�O�O�O�
H�H�H�H��M�M��[�M�M�Mrrc�N�eZdZdZd�Zd�Zed
deddfd���Zddefd	�Z	dS)�Messagez�Object representing a DBus message.

    It's not normally necessary to construct this directly: use higher level
    functions and methods instead.
    c�"�||_||_dSrH)�header�body)rrrs   rrKzMessage.__init__�s�������	�	�	rc�h�d�t|��j|j|j��S)Nz{}({!r}, {!r}))r[r^r
rrrs rr\zMessage.__repr__�s'���&�&�t�D�z�z�':�D�K���S�S�SrrrO�returnc��t�|��\}}|j�tjd��}|t
|��kr#td|�dt
|���d����|d|�}d}tj|jvrZ|jtj}ttd|z����}|�|||j|���d}t||��S)NrzMessage expects z FDs, but only z were receivedr�(%s)r�)rrr��getr0r>r�r�r=r�r�rTrPr)	rrOrQrrA�n_fdsrr��	body_types	         rrzMessage.from_buffer�s����(�(��-�-�����
�!�!�,�"7��;�;���3�s�8�8����Q�5�Q�Q��S���Q�Q�Q���
��&�5�&�k�����!�V�]�2�2��-�� 6�7�C�'��V�c�\�(:�(:�;�;�I��'�'��S�&�2C��'�M�M�a�P�D��v�t�$�$�$rNc�
�|jj}tj|jjvrZ|jjtj}tt
d|z����}|�|jd||���}nd}t|��|j_
|r&t|��|jjtj<|j�|���}dtt|��d��z}||z|zS)a�Convert this message to bytes.

        Specifying *serial* overrides the ``msg.header.serial`` field, so a
        connection can use its own serial number without modifying the message.

        If file-descriptor support is in use, *fds* should be a
        :class:`array.array` object with type ``'i'``. Any file descriptors in
        the message will be added to the array. If the message contains FDs,
        it can't be serialised without this array.
        rrr�r)r	rVr4)
rrPr0r=r�r�r�rYrr�r�r>rD)	rr	rQr�r�r!�body_buf�
header_bufrCs	         rrYzMessage.serialise�s�����'���!�T�[�%7�7�7��+�$�\�%;�<�C�'��V�c�\�(:�(:�;�;�I� �*�*�4�9�a��S�*�I�I�H�H��H�"%�h�-�-�����	A�8;�C���D�K��|�4�5��[�*�*�&�*�9�9�
��w�s�:����2�2�2���C��(�*�*rrb)NN)
r
rrr
rKr\rr�rrYrrrrr�s���������
���T�T�T��
%�
%�e�
%�	�
%�
%�
%��[�
%�+�+�%�+�+�+�+�+�+rrc�J�eZdZdZd�Zddefd�Zd�Zd�Zde	e
fd	�Zd
S)�Parserz8Parse DBus messages from a stream of incoming data.
    c�H�t��|_g|_d|_dSrH)�
BufferPiperOrQ�
next_msg_sizers rrKzParser.__init__�s"���<�<������!����rrrXc�n�|j�|��|j�|��dS)z)Provide newly received data to the parserN)rO�writerQ�extend)rrXrQs   r�add_datazParser.add_data�s0������t�������������rc�p�|�|��tt|jd����S)zhFeed the parser newly read data.

        Returns a list of messages completed by the new data.
        N)r-r��iter�get_next_message)rrXs  r�feedzParser.feed�s1��
	
�
�
�d�����D��.��5�5�6�6�6rc��|jj}|dkrd|z
S|j�,t|j�d����|_|j|z
S)z�How many bytes can be received without going beyond the next message?

        This is only used with file-descriptor passing, so we don't get too many
        FDs in a single recvmsg call.
        r�)rO�bytes_bufferedr)r��peek)r�gots  r�
bytes_desiredzParser.bytes_desired�sU���h�%����8�8���8�O���%�!.�t�x�}�}�R�/@�/@�!A�!A�D���!�C�'�'rrc���|j�<|jjdkr,t|j�d����|_|j}|��|jj|kr�|j�|��}t�||j���}d|_|j	j
�tj
d��}|j|d�|_|SdSdS)zqParse one message, if there is enough data.

        Returns None if it doesn't have a complete message.
        Nr�r�r)r)rOr3r�r4�readrrrQrr�rr0r>)r�nms�raw_msg�msg�fds_consumeds     rr0zParser.get_next_message	s���
��%��x�&�"�,�,�%2�4�8�=�=��3D�3D�%E�%E��"�� ���O���!8�C�!?�!?��h�m�m�C�(�(�G��%�%�g�4�8�%�<�<�C�!%�D���:�,�0�0��1F��J�J�L��x��
�
�.�D�H��J�

�O�!?�!?rNrb)r
rrr
rKr�r-r1r6rrr0rrrr&r&�s���������"�"�"�
��U�����
7�7�7�(�(�(��(�7�"3������rr&c�\�eZdZdZd�Zdefd�Zdefd�Zdedefd�Z	defd	�Z
dedefd
�ZdS)r(z�A place to store received data until we can parse a complete message

    The main difference from io.BytesIO is that read & write operate at
    opposite ends, like a pipe.
    c�:�t��|_d|_dSr@)rr�r3rs rrKzBufferPipe.__init__!s���g�g�������rr�c�t�|j�|��|xjt|��z
c_dSrH)r�r�r3r�)rr�s  rr+zBufferPipe.write%s8������1�������s�1�v�v�%����r�nbytesc#�K�||jksJ�|jD]+}|d|�}|t|��z}|V�|dkrdS�,dSr@)r3r�r�)rr@�chunks   r�
_peek_iterzBufferPipe._peek_iter)sp������,�,�,�,�,��[�	�	�E��'�6�'�N�E��c�%�j�j� �F��K�K�K���{�{�����		�	rrc�R�d�|�|����S)z=Get exactly nbytes bytes from the front without removing themr)r�rC�rr@s  rr4zBufferPipe.peek2� ���x�x�����/�/�0�0�0rc#�K�||jksJ�	|j���}|xjt|��zc_|t|��krn|t|��z}|V��a|d|�||d�}}|r7|j�|��|xjt|��z
c_|V�dSrH)r3r��popleftr��
appendleft)rr@rB�rems    r�
_read_iterzBufferPipe._read_iter6s�������,�,�,�,�,�	��K�'�'�)�)�E����3�u�:�:�-�����U���#�#���c�%�j�j� �F��K�K�K�
	��7�F�7�^�U�6�7�7�^�s���	,��K�"�"�3�'�'�'����3�s�8�8�+��������rc�R�d�|�|����S)z1Take & return exactly nbytes bytes from the frontr)r�rKrEs  rr8zBufferPipe.readGrFrN)r
rrr
rKr�r+r�rCr4rKr8rrrr(r(s���������
 � � �&�u�&�&�&�&�������1�3�1�5�1�1�1�1�������"1�3�1�5�1�1�1�1�1�1rr()'�collectionsr�enumrrrrM�typingrr�r	rrr!r�r#r+r0rDrFrdrwr�r��updater�r�r�r�r�r�r�r�r�rrrr&r(rrr�<module>rQs���������'�'�'�'�'�'�'�'�'�'�
�
�
�
�������	�	�	�	�	�Z�	�	�	�=�=�=�=�=��=�=�=��%�Z�^�
<�
<�
������$����(�(�(�(�(�'�(�(�(�	�	�	�	�	�7�	�	�	����<�<�<�<�<�<�<�<�0&�&�&�&�&�i�&�&�&�-�-�-�-�-�Y�-�-�-�@
��1�c�	�	�	��1�c�	�	�	��1�c�	�	�	����	��1�c�	�	�	��1�c�	�	�	��1�c�	�	�	��1�c�	�	�	��1�c�	�	�	��	�	����;�;�;�;�;�;�;�;�<
���	��L��%�	&�	&�	��L��%�	&�	&�	��L��%�	&�	&������#M�#M�#M�#M�#M�#M�#M�#M�L	!�	!�	!�	!�	!��	!�	!�	!�CL�CL�CL�CL�CL�CL�CL�CL�L&�&�&�&�&�&�&�&�4#�#�#�6=�=�=��e�F�F�L��$5�w�w�y�y�#A�B�B�C�C��8�8�8��
�
�
�
�
�
�
�
�
�
��<�<�<�
%M�%M�%M�%M�%M�%M�%M�%M�P7+�7+�7+�7+�7+�7+�7+�7+�t2�2�2�2�2�2�2�2�j.1�.1�.1�.1�.1�.1�.1�.1�.1�.1r

Youez - 2016 - github.com/yon3zu
LinuXploit