403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/botocore/__pycache__/eventstream.cpython-314.pyc
+
��i7O��@�Rt^RIHt^RIHt^RIHt^tRtRt	!RR]
4t!RR]4t!RR	]4t
!R
R]4t!RR
]4t!RR]4t!RR4tR Rlt!RR4t!RR4t!RR4t!RR4t!RR4tR#)!zBinary Event Stream Decoding)�crc32)�unpack)�EventStreamErrorc��]tRt^tRtRtR#)�ParserErrorz,Base binary flow encoding parsing exception.�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��6/usr/lib/python3/dist-packages/botocore/eventstream.pyrrs��6�rrc�6aa�]tRt^ toRtV3RltRtVtV;t#)�DuplicateHeaderz$Duplicate header found in the event.c�2<�RVR2p\SV`V4R#)zDuplicate header present: "�"N��super�__init__)�self�header�message�	__class__s&& �rr�DuplicateHeader.__init__#s���/��x�q�9��
����!rr�	rr	r
rrrr
�__classdictcell__�
__classcell__�r�
__classdict__s@@rrr s����.�"�"rrc�6aa�]tRt^(toRtV3RltRtVtV;t#)�InvalidHeadersLengthz*Headers length is longer than the maximum.c�><�RVR\2p\SV`	V4R#)zHeader length of � exceeded the maximum of N)�_MAX_HEADERS_LENGTHrr�r�lengthrrs&& �rr�InvalidHeadersLength.__init__+s%���%�f�X�-F�GZ�F[�\��
����!rrrrs@@rr"r"(�����4�"�"rr"c�6aa�]tRt^0toRtV3RltRtVtV;t#)�InvalidPayloadLengthz*Payload length is longer than the maximum.c�><�RVR\2p\SV`	V4R#)zPayload length of r$N)�_MAX_PAYLOAD_LENGTHrrr&s&& �rr�InvalidPayloadLength.__init__3s%���&�v�h�.G�H[�G\�]��
����!rrrrs@@rr+r+0r)rr+c�6aa�]tRt^8toRtV3RltRtVtV;t#)�ChecksumMismatchz8Calculated checksum did not match the expected checksum.c�:<�RVR
RVR
2p\SV`V4R#)zChecksum mismatch: expected 0x�08xz, calculated 0xNr)r�expected�
calculatedrrs&&& �rr�ChecksumMismatch.__init__;s)���2�8�C�.��PZ�[^�O_�`��
����!rrrrs@@rr0r08s����B�"�"rr0c�6aa�]tRt^@toRtV3RltRtVtV;t#)�NoInitialResponseErrorz�An event of type initial-response was not received.

This exception is raised when the event stream produced no events or
the first event in the stream was not of the initial-response type.
c�*<�Rp\SV`V4R#)z0First event was not of the initial-response typeNr)rrrs& �rr�NoInitialResponseError.__init__Gs���D��
����!rrrrs@@rr7r7@s�����"�"rr7c�a�]tRt^LtoRtRtRtRtRtRt	Rt
RtR	t^]^]^]/t
]R
4t]R4t]R4t]R
4t]R4t]R4t]R4t]R4t]RRl4t]RRl4t]R4t]R4tRtVtR#)�DecodeUtilsz�Unpacking utility functions used in the decoder.

All methods on this class take raw bytes and return  a tuple containing
the value parsed from the bytes and the number of bytes consumed to parse
that value.
z!Bz!Hz!Iz!bz!hz!iz!qz!IIIc��R#)z�This method consumes none of the provided bytes and returns True.

:type data: bytes
:param data: The bytes to parse from. This is ignored in this method.

:rtype: tuple
:rtype: (bool, int)
:returns: The tuple (True, 0)
)T�r��datas&r�unpack_true�DecodeUtils.unpack_trueds	���rc��R#)z�This method consumes none of the provided bytes and returns False.

:type data: bytes
:param data: The bytes to parse from. This is ignored in this method.

:rtype: tuple
:rtype: (bool, int)
:returns: The tuple (False, 0)
)Fr=rr>s&r�unpack_false�DecodeUtils.unpack_falseqs	���rc�Z�\\PVR,4^,pV^3#)z�Parse an unsigned 8-bit integer from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: (int, int)
:returns: A tuple containing the (parsed integer value, bytes consumed)
�N�N)rr;�UINT8_BYTE_FORMAT�r?�values& r�unpack_uint8�DecodeUtils.unpack_uint8~s(���{�4�4�d�2�h�?��B���a�x�rc�Z�\\PVR,4^,pV^3#)z�Parse an unsigned 32-bit integer from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: (int, int)
:returns: A tuple containing the (parsed integer value, bytes consumed)
�N�N)rr;�UINT32_BYTE_FORMATrIs& r�
unpack_uint32�DecodeUtils.unpack_uint32�s(���{�5�5�t�B�x�@��C���a�x�rc�Z�\\PVR,4^,pV^3#)z�Parse a signed 8-bit integer from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: (int, int)
:returns: A tuple containing the (parsed integer value, bytes consumed)
rF)rr;�INT8_BYTE_FORMATrIs& r�unpack_int8�DecodeUtils.unpack_int8�s(���{�3�3�T�"�X�>�q�A���a�x�rc�Z�\\PVR,4^,pV^3#)z�Parse a signed 16-bit integer from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: tuple
:rtype: (int, int)
:returns: A tuple containing the (parsed integer value, bytes consumed)
:N�N)rr;�INT16_BYTE_FORMATrIs& r�unpack_int16�DecodeUtils.unpack_int16��(���{�4�4�d�2�h�?��B���a�x�rc�Z�\\PVR,4^,pV^3#)z�Parse a signed 32-bit integer from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: tuple
:rtype: (int, int)
:returns: A tuple containing the (parsed integer value, bytes consumed)
rN)rr;�INT32_BYTE_FORMATrIs& r�unpack_int32�DecodeUtils.unpack_int32�r\rc�Z�\\PVR,4^,pV^3#)z�Parse a signed 64-bit integer from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: tuple
:rtype: (int, int)
:returns: A tuple containing the (parsed integer value, bytes consumed)
:N�N)rr;�INT64_BYTE_FORMATrIs& r�unpack_int64�DecodeUtils.unpack_int64�r\rc�x�\PV,p\W RV4^,pW1,pWVpWT3#)aCParse a variable length byte array from the bytes.

The bytes are expected to be in the following format:
    [ length ][0 ... length bytes]
where length is an unsigned integer represented in the smallest number
of bytes to hold the maximum length of the array.

:type data: bytes
:param data: The bytes to parse from.

:type length_byte_size: int
:param length_byte_size: The byte size of the preceding integer that
represents the length of the array. Supported values are 1, 2, and 4.

:rtype: (bytes, int)
:returns: A tuple containing the (parsed byte array, bytes consumed).
N)r;�UINT_BYTE_FORMATr)r?�length_byte_size�uint_byte_formatr'�	bytes_end�array_bytess&&    r�unpack_byte_array�DecodeUtils.unpack_byte_array�sJ��&'�7�7�8H�I���(�/@�0@�*A�B�1�E���-�	��I�6���%�%rc�V�\PW4wr#VPR4V3#)apParse a variable length utf-8 string from the bytes.

The bytes are expected to be in the following format:
    [ length ][0 ... length bytes]
where length is an unsigned integer represented in the smallest number
of bytes to hold the maximum length of the array and the following
bytes are a valid utf-8 string.

:type data: bytes
:param bytes: The bytes to parse from.

:type length_byte_size: int
:param length_byte_size: The byte size of the preceding integer that
represents the length of the array. Supported values are 1, 2, and 4.

:rtype: (str, int)
:returns: A tuple containing the (utf-8 string, bytes consumed).
zutf-8)r;rl�decode)r?rhrk�consumeds&&  r�unpack_utf8_string�DecodeUtils.unpack_utf8_string�s2��(!,� =� =��!
����!�!�'�*�H�4�4rc��VR,^3#)z�Parse a 16-byte uuid from the bytes.

:type data: bytes
:param data: The bytes to parse from.

:rtype: (bytes, int)
:returns: A tuple containing the (uuid bytes, bytes consumed).
:N�Nrr>s&r�unpack_uuid�DecodeUtils.unpack_uuids���C�y�"�}�rc�B�\\PV4\3#)aMParse the prelude for an event stream message from the bytes.

The prelude for an event stream message has the following format:
    [total_length][header_length][prelude_crc]
where each field is an unsigned 32-bit integer.

:rtype: ((int, int, int), int)
:returns: A tuple of ((total_length, headers_length, prelude_crc),
consumed)
)rr;�PRELUDE_BYTE_FORMAT�_PRELUDE_LENGTHr>s&r�unpack_prelude�DecodeUtils.unpack_prelude
s���{�6�6��=��O�OrrN)rX)rr	r
rrrH�UINT16_BYTE_FORMATrPrTrYr^rcrxrg�staticmethodr@rCrKrQrUrZr_rdrlrqrurzr
r�r s@rr;r;LsJ������������������� ��	
��	��	�����
��
��
��
��
��
��
��
��
��
��������������&��&�0�5��5�0�	��	��P��Prr;c�L�\W4R,pW8wd\W4hR#)l��N)rr0)r?�checksum�crc�computed_checksums&&& r�_validate_checksumr�s*���d�(�:�5���$��x�;�;�%rc�Za�]tRtRtoRtRt]R4t]R4t]R4t	Rt
VtR#)	�MessagePreludei$z2Represents the prelude of an event stream message.c�*�WnW nW0nR#�N)�total_length�headers_lengthr�)rr�r�r�s&&&&rr�MessagePrelude.__init__'s��(��,���rc�`�VPVP,
\,
^,
#)z�Calculates the total payload length.

The extra minus 4 bytes is for the message CRC.

:rtype: int
:returns: The total payload length.
)r�r�ry�rs&r�payload_length�MessagePrelude.payload_length,s%��� � �4�#6�#6�6��H�1�L�Lrc�(�VP^,
#)z�Calculates the byte offset for the end of the message payload.

The extra minus 4 bytes is for the message CRC.

:rtype: int
:returns: The byte offset from the beginning of the event stream
message to the end of the payload.
)r�r�s&r�payload_end�MessagePrelude.payload_end7s��� � �1�$�$rc�0�\VP,#)z�Calculates the byte offset for the end of the message headers.

:rtype: int
:returns: The byte offset from the beginning of the event stream
message to the end of the headers.
)ryr�r�s&r�headers_end�MessagePrelude.headers_endCs����!4�!4�4�4r)r�r�r�N)rr	r
rrr�propertyr�r�r�r
rr~s@rr�r�$sK����<��
�M��M��	%��	%��5��5rr�c�4a�]tRtRtoRtRtRRltRtVtR#)�EventStreamMessageiNz#Represents an event stream message.c�6�WnW nW0nW@nR#r�)�prelude�headers�payloadr�)rr�r�r�r�s&&&&&rr�EventStreamMessage.__init__Qs���������rc��VPPR4pVR8XgVR8XdRpRVRVPRVP/#)z
:message-type�error�	exceptioni��status_coder��body)r��getr�)rr��message_types&& r�to_response_dict�#EventStreamMessage.to_response_dictWsK���|�|�'�'��8���7�"�l�k�&A��K��;��t�|�|��D�L�L�
�	
r)r�r�r�r�N)��)	rr	r
rrrr�r
rr~s@rr�r�Ns����-��
�
rr�c�Ha�]tRtRtoRt^]P^]P^]P^]P^]P^]P^]P^]P^]P^	]P/
tRtRtRtRtRtRtR	tR
tRtVtR#)
�EventStreamHeaderParseribz�Parses the event headers from an event stream message.

Expects all of the header data upfront and creates a dictionary of headers
to return. This object can be reused multiple times to parse the headers
from multiple event stream messages.
c��RVnR#r���_datar�s&rr� EventStreamHeaderParser.__init__�s	����
rc�.�WnVP4#)z�Parses the event stream headers from an event stream message.

:type data: bytes
:param data: The bytes that correspond to the headers section of an
event stream message.

:rtype: dict
:returns: A dictionary of header key, value pairs.
)r��_parse_headers�rr?s&&r�parse�EventStreamHeaderParser.parse�s���
��"�"�$�$rc��/pVP'd*VP4wr#W!9d\V4hW1V&K;V#r�)r��
_parse_headerr)rr��namerJs&   rr��&EventStreamHeaderParser._parse_headers�s<�����j�j�j��,�,�.�K�D���%�d�+�+�!�D�M��rc�H�VP4pVP4pW3#r�)�_parse_name�_parse_value)rr�rJs&  rr��%EventStreamHeaderParser._parse_header�s&�����!���!�!�#���{�rc�l�\PVP^4wrVPV4V#)rG)r;rqr��
_advance_data)rr�rps&  rr��#EventStreamHeaderParser._parse_name�s-��$�7�7��
�
�A�F������8�$��rc�j�\PVP4wrVPV4V#r�)r;rKr�r�)r�typerps&  r�_parse_type�#EventStreamHeaderParser._parse_type�s+��$�1�1�$�*�*�=������8�$��rc��VP4pVPV,pV!VP4wr4VPV4V#r�)r��_HEADER_TYPE_MAPr�r�)r�header_type�value_unpackerrJrps&    rr��$EventStreamHeaderParser._parse_value�sC���&�&�(���.�.�{�;��(����4������8�$��rc�.�VPVRVnR#r�r�)rrps&&rr��%EventStreamHeaderParser._advance_data�s���Z�Z��	�*��
rr�N)rr	r
rrr;r@rCrUrZr_rdrlrqrur�rr�r�r�r�r�r�r�r
rr~s@rr�r�bs������	
�;�"�"�	�;�#�#�	�;�"�"�	�;�#�#�	�;�#�#�	�;�#�#�	�;�(�(�	�;�)�)�	�;�#�#�	�;�"�"�)��.�%���
�
�
�+�+rr�c�xa�]tRtRtoRtRtRtRtRtRt	Rt
R	tR
tRt
RtR
tRtRtRtRtVtR#)�EventStreamBufferi�z�Streaming based event stream buffer

A buffer class that wraps bytes from an event stream providing parsed
messages as they become available via an iterable interface.
c�@�RVnRVn\4VnR#)rN)r��_preluder��_header_parserr�s&rr�EventStreamBuffer.__init__�s����
���
�5�7��rc�8�V;PV,
unR#)zoAdd data to the buffer.

:type data: bytes
:param data: The bytes to add to the buffer to be used when parsing
Nr�r�s&&r�add_data�EventStreamBuffer.add_data�s��	
�
�
�d��
rc��VP\8�d\VP4hVP\8�d\VP4hR#r�)r�r%r"r�r-r+)rr�s&&r�_validate_prelude�#EventStreamBuffer._validate_prelude�sG���!�!�$7�7�&�w�'=�'=�>�>��!�!�$7�7�&�w�'=�'=�>�>�8rc���VPR\p\PV4wr#\	V!p\VR\^,
VP4VPV4V#r�)r�ryr;rzr�r�r�r�)r�
prelude_bytes�raw_prelude�_r�s&    r�_parse_prelude� EventStreamBuffer._parse_prelude�s]���
�
�#3�O�4�
�$�3�3�M�B��� �+�.���=�)>�?�Q�+>�?����M����w�'��rc��VP\VPPpVPPV4#r�)r�ryr�r�r�r�)r�header_bytess& rr�� EventStreamBuffer._parse_headers�s3���z�z�/�D�M�M�4M�4M�N���"�"�(�(��6�6rc�d�VPpVPVPVPpV#r�)r�r�r�r�)rr��
payload_bytess&  r�_parse_payload� EventStreamBuffer._parse_payload�s-���-�-���
�
�7�#6�#6��9L�9L�M�
��rc��VPpVPVPVPp\PV4wr4V#r�)r�r�r�r�r;rQ)rr��	crc_bytes�message_crcr�s&    r�_parse_message_crc�$EventStreamBuffer._parse_message_crc�s?���-�-���J�J�w�2�2�W�5I�5I�J�	�$�2�2�9�=����rc�b�VP\^,
VPPpV#)rO)r�ryr�r�)r�
message_bytess& r�_parse_message_bytes�&EventStreamBuffer._parse_message_bytes�s,���
�
��a��$�-�-�";�";�
�
��rc��VP4pVP4p\W!VPPR7V#))r�)r�r�r�r�r�)rr�r�s&  r�_validate_message_crc�'EventStreamBuffer._validate_message_crc�s8���-�-�/���1�1�3�
��=�4�=�=�;L�;L�M��rc��VP4pVP4pVP4p\VPW#V4pVP4V#r�)r�r�r�r�r��_prepare_for_next_message)rr�r�r�rs&    r�_parse_message� EventStreamBuffer._parse_message�sO���(�(�*���%�%�'���%�%�'��$�T�]�]�G�c�J���&�&�(��rc�d�VPVPPRVnRVnR#r�)r�r�r�r�s&rr��+EventStreamBuffer._prepare_for_next_message�s&���Z�Z��
�
� :� :� <�=��
���
rc�(�\VP4\8d\4hVPfVP4Vn\VP4VPP8d\4hVP4#)zProvides the next available message parsed from the stream

:rtype: EventStreamMessage
:returns: The next event stream message
)�lenr�ry�
StopIterationr�r�r�r�r�s&r�next�EventStreamBuffer.nextsg���t�z�z�?�_�,��/�!��=�=� � �/�/�1�D�M��t�z�z�?�T�]�]�7�7�7��/�!��"�"�$�$rc�"�VP4#r�)r�r�s&r�__next__�EventStreamBuffer.__next__s���y�y�{�rc��V#r�rr�s&r�__iter__�EventStreamBuffer.__iter__s���r)r�r�r�N)rr	r
rrrr�r�r�r�r�r�r�r�r�r�r�r�r�r
rr~s@rr�r��sU�����8�
�?��7��
�����
%�"��rr�c�Ha�]tRtRtoRtRtRtRtRtRt	Rt
R	tVtR
#)�EventStreamia<Wrapper class for an event stream body.

This wraps the underlying streaming body, parsing it for individual events
and yielding them as they come available through the iterator interface.

The following example uses the S3 select API to get structured data out of
an object stored in S3 using an event stream.

**Example:**
::
    from botocore.session import Session

    s3 = Session().create_client('s3')
    response = s3.select_object_content(
        Bucket='bucketname',
        Key='keyname',
        ExpressionType='SQL',
        RequestProgress={'Enabled': True},
        Expression="SELECT * FROM S3Object s",
        InputSerialization={'CSV': {}},
        OutputSerialization={'CSV': {}},
    )
    # This is the event stream in the response
    event_stream = response['Payload']
    end_event_received = False
    with open('output', 'wb') as f:
        # Iterate over events in the event stream as they come
        for event in event_stream:
            # If we received a records event, write the data to a file
            if 'Records' in event:
                data = event['Records']['Payload']
                f.write(data)
            # If we received a progress event, print the details
            elif 'Progress' in event:
                print(event['Progress']['Details'])
            # End event indicates that the request finished successfully
            elif 'End' in event:
                print('Result is complete')
                end_event_received = True
    if not end_event_received:
        raise Exception("End event not received, request incomplete.")
c�`�WnW nW@nW0nVP	4VnR#r�)�_raw_stream�
_output_shape�_operation_name�_parser�_create_raw_event_generator�_event_generator)r�
raw_stream�output_shape�parser�operation_names&&&&&rr�EventStream.__init__Gs*��%��)��-���� $� @� @� B��rc#�r"�VPF"pVPV4pV'gKVx�K$	R#5ir�)r�_parse_event)r�event�parsed_events&  rr��EventStream.__iter__Ns0����*�*�E��,�,�U�3�L��|�"�"�+�s�&7�
7c#�"�\4pVPP4FpVPV4TRjx�L
K 	R#L
5ir�)r�r�streamr�)r�event_stream_buffer�chunks&  rr�'EventStream._create_raw_event_generatorTsA���/�1���%�%�,�,�.�E��(�(��/�*�*�*�/�*�s�>A
�A�A
c��VP4pVPPW P4pVR,^�8XdV#\	W0P
4h)r�)r�rr�rrr)rr�
response_dict�parsed_responses&&  rr
�EventStream._parse_eventZsN���.�.�0�
��,�,�,�,�]�<N�<N�O����'�3�.�"�"�"�?�4H�4H�I�Irc��\VP4pVPPR4pVR8XdV#\4h \d
\4hi;i)z:event-typezinitial-response)r�rr�r�r�r7)r�
initial_event�
event_types&  r�get_initial_response� EventStream.get_initial_responsebsi��	� ��!6�!6�7�M�&�.�.�2�2�=�A�J��/�/�$�$�0�%�&�&���	��$�&�&�	�s�8A�A�Ac�:�VPP4R#)z%Closes the underlying streaming body.N)r�closer�s&rr �EventStream.closels������� r)rrrrrN)
rr	r
rrrr�rr
rr r
rr~s@rr�r�s0����)�VC�#�+�J�'�!�!rr�Nii�)r=)r�binasciir�structr�botocore.exceptionsrryr%r-�	Exceptionrrr"r+r0r7r;r�r�r�r�r�r�rrr�<module>r&s���#���0��� ��&��	�)�	�"�k�"�"�;�"�"�;�"�"�{�"�	"�[�	"�MP�MP�`<�'5�'5�T
�
�(Q+�Q+�hb�b�JS!�S!r

Youez - 2016 - github.com/yon3zu
LinuXploit