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__/monitoring.cpython-314.pyc
+
��irP���^RIt^RIt^RIt^RIt^RIHtHtHt^RIH	t
]P!]4t
!RR4t!RR4t!RR	4t!R
R]4t!RR
]4t!RR4t!RR4tR#)�N)�ensure_bytes�ensure_unicode�urlparse)�
EXCEPTION_MAPc�:a�]tRt^to.ROtRtRtRtRtVt	R#)�Monitorc��WnW nR#)z�Abstraction for monitoring clients API calls

:param adapter: An adapter that takes event emitter events
    and produces monitor events

:param publisher: A publisher for generated monitor events
N��_adapter�
_publisher)�self�adapter�	publishers&&&�5/usr/lib/python3/dist-packages/botocore/monitoring.py�__init__�Monitor.__init__!s�� �
�#��c�b�VPFpVPW P4K 	R#)z(Register an event emitter to the monitorN)�_EVENTS_TO_REGISTER�
register_last�capture)r
�
event_emitter�event_to_registers&& r�register�Monitor.register,s&��!%�!9�!9���'�'�(9�<�<�H�":rc���VPPW4pV'dVPPV4R#R# \d%p\
P
RTTRR7Rp?R#Rp?ii;i)z�Captures an incoming event from the event emitter

It will feed an event emitter event to the monitor's adaptor to create
a monitor event and then publish that event to the monitor's publisher.
z:Exception %s raised by client monitor in handling event %sT)�exc_infoN)r�feedr�publish�	Exception�logger�debug)r
�
event_name�payload�
monitor_event�es&&,  rr�Monitor.capture1sg��
	� �M�M�.�.�z�C�M�����'�'�
�6����	��L�L�L����	
�
�
��	�s�>A�A3�A.�.A3r
N)zbefore-parameter-buildzrequest-createdzresponse-receivedz
after-callzafter-call-error)
�__name__�
__module__�__qualname__�__firstlineno__rrrr�__static_attributes__�__classdictcell__��
__classdict__s@rrrs"������	$�I�
�rrc�a�]tRt^Dto]P3RltRtRtRtRt	Rt
RtRtR	t
R
tRtRtR
tVtR#)�MonitorEventAdapterc��WnR#)z�Adapts event emitter events to produce monitor events

:type time: callable
:param time: A callable that produces the current time
N��_time)r
�times&&rr�MonitorEventAdapter.__init__Es	���
rc�0�VPV4!R/VB#)aXFeed an event emitter event to generate a monitor event

:type emitter_event_name: str
:param emitter_event_name: The name of the event emitted

:type emitter_payload: dict
:param emitter_payload: The payload to associated to the event
    emitted

:rtype: BaseMonitorEvent
:returns: A monitor event based on the event emitter events
    fired
�)�_get_handler)r
�emitter_event_name�emitter_payloads&&&rr�MonitorEventAdapter.feedMs��� � �!3�4�G��G�Grc�t�\VRVPR4^,PRR4,4#)�_handle_�.�-�_)�getattr�split�replace)r
r#s&&rr9� MonitorEventAdapter._get_handler]s6����*�z�/�/��4�Q�7�?�?��S�I�I�
�	
rc��\VPPVPVP	4R7VR&R#)��service�	operation�	timestamp�current_api_call_eventN)�APICallEvent�
service_model�
service_id�	wire_name�_get_current_time)r
�model�context�kwargss&&&,r�_handle_before_parameter_build�2MonitorEventAdapter._handle_before_parameter_buildbs4��,8��'�'�2�2��o�o��,�,�.�-
��(�)rc��VPpVR,PVP4R7pVPVnVP
VnWCR&R#)rK)rJ�current_api_call_attempt_eventN)rR�new_api_call_attemptrP�headers�request_headers�url)r
�requestrSrR�new_attempt_events&&,  r�_handle_request_created�+MonitorEventAdapter._handle_request_createdisW���/�/��#�$�
�
�
��)?�)?�)A�
�
B�	�-4�O�O��)� '�����4E�0�1rc���VPR4pVPV4VnVeCVR,R,VnVR,R,VnVPR4VnV#W5nV#)rW�ResponseMetadata�HTTPStatusCode�HTTPHeaders�Error)�pop�_get_latency�latency�http_status_code�response_headers�get�parsed_error�wire_exception)r
�parsed_responserR�	exceptionrS�
attempt_events&&&&, r�_handle_response_received�-MonitorEventAdapter._handle_response_receivedrs��� ���$D�E�
� $� 1� 1�-� @�
���&�-<�"�.��. �M�*�.=�"�.��.�M�*�*9�)<�)<�W�)E�M�&���,5�(��rc�n�VR,PRR4VR,nVPV4#)ra�MaxAttemptsReachedFrK)rj�retries_exceeded�_complete_api_call)r
rR�parsedrSs&&&,r�_handle_after_call�&MonitorEventAdapter._handle_after_call�s;��=C��>
�

�#�"�E�
*�	�(�)�:��&�&�w�/�/rc�^�VPV4VR,nVPV4#�rK)�_is_retryable_exceptionrtru)r
rRrnrSs&&&,r�_handle_after_call_error�,MonitorEventAdapter._handle_after_call_error�s3��"�9�9�)�D�	�$�	
�
��&�&�w�/�/rc�B�\V\\R,44#)�GENERAL_CONNECTION_ERROR)�
isinstance�tuple�RETRYABLE_EXCEPTIONS)r
rns&&rr{�+MonitorEventAdapter._is_retryable_exception�s ����u�1�2L�M�N�
�	
rc�T�VPR4pVPV4VnV#rz)rerfrg)r
rR�
call_events&& rru�&MonitorEventAdapter._complete_api_call�s*���[�[�!9�:�
�!�.�.�z�:�
���rc�D�VP4VP,
#�N)rPrJ�r
�events&&rrf� MonitorEventAdapter._get_latency�s���%�%�'�%�/�/�9�9rc�B�\VP4R,4#)i�)�intr4�r
s&rrP�%MonitorEventAdapter._get_current_time�s���4�:�:�<�$�&�'�'rr3N)r(r)r*r+r5rrr9rTr^rprwr|r{rurfrPr,r-r.s@rr1r1DsO���� �I�I��H� 
�

�F��"0�0�
�
�
:�(�(rr1c�2a�]tRt^�toRtRtRtRtVtR#)�BaseMonitorEventc�*�WnW nW0nR#)aCBase monitor event

:type service: str
:param service: A string identifying the service associated to
    the event

:type operation: str
:param operation: A string identifying the operation of service
    associated to the event

:type timestamp: int
:param timestamp: Epoch time in milliseconds from when the event began
NrG)r
rHrIrJs&&&&rr�BaseMonitorEvent.__init__�s����"��"�rc�P�VPPRVP:R2#)�(�))�	__class__r(�__dict__r�s&r�__repr__�BaseMonitorEvent.__repr__�s%���.�.�)�)�*�!�D�M�M�+<�A�>�>rc�n�\WP4'dVPVP8H#R#)F)r�r�r�)r
�others&&r�__eq__�BaseMonitorEvent.__eq__�s'���e�^�^�,�,��=�=�E�N�N�2�2�r)rIrHrJN)	r(r)r*r+rr�r�r,r-r.s@rr�r��s����#�$?��rr�c�<aa�]tRt^�toRV3RlltRtRtVtV;t#)rLc�d<�\SV`WVR7W@nWPnVf.VnW`nR#)a	Monitor event for a single API call

This event corresponds to a single client method call, which includes
every HTTP requests attempt made in order to complete the client call

:type service: str
:param service: A string identifying the service associated to
    the event

:type operation: str
:param operation: A string identifying the operation of service
    associated to the event

:type timestamp: int
:param timestamp: Epoch time in milliseconds from when the event began

:type latency: int
:param latency: The time in milliseconds to complete the client call

:type attempts: list
:param attempts: The list of APICallAttempts associated to the
    APICall

:type retries_exceeded: bool
:param retries_exceeded: True if API call exceeded retries. False
    otherwise
rGN)�superrrg�attemptsrt)r
rHrIrJrgr�rtr�s&&&&&&&�rr�APICallEvent.__init__�s<���H	����I�	�	
��� �
����D�M� 0�rc��\VPVPVR7pVPP	V4V#)z�Instantiates APICallAttemptEvent associated to the APICallEvent

:type timestamp: int
:param timestamp: Epoch time in milliseconds to associate to the
    APICallAttemptEvent
rG)�APICallAttemptEventrHrIr��append)r
rJros&& rrX�!APICallEvent.new_api_call_attempt�s7��,��L�L�D�N�N�i�
�
�	
�
�
���]�+��r)r�rgrt)NNF)	r(r)r*r+rrXr,r-�
__classcell__�r�r/s@@rrLrL�s����+1�Z�rrLc�6aa�]tRt^�toRV3RlltRtVtV;t#)r�c�~<�\SV`WVR7W@nWPnW`nWpnW�nW�nW�nR#)a�Monitor event for a single API call attempt

This event corresponds to a single HTTP request attempt in completing
the entire client method call.

:type service: str
:param service: A string identifying the service associated to
    the event

:type operation: str
:param operation: A string identifying the operation of service
    associated to the event

:type timestamp: int
:param timestamp: Epoch time in milliseconds from when the HTTP request
    started

:type latency: int
:param latency: The time in milliseconds to complete the HTTP request
    whether it succeeded or failed

:type url: str
:param url: The URL the attempt was sent to

:type http_status_code: int
:param http_status_code: The HTTP status code of the HTTP response
    if there was a response

:type request_headers: dict
:param request_headers: The HTTP headers sent in making the HTTP
    request

:type response_headers: dict
:param response_headers: The HTTP headers returned in the HTTP response
    if there was a response

:type parsed_error: dict
:param parsed_error: The error parsed if the service returned an
    error back

:type wire_exception: Exception
:param wire_exception: The exception raised in sending the HTTP
    request (i.e. ConnectionError)
rGN)	r�rrgr[rhrZrirkrl)r
rHrIrJrgr[rhrZrirkrlr�s&&&&&&&&&&&�rr�APICallAttemptEvent.__init__�sG���r	����I�	�	
����� 0��.�� 0��(��,�r)rhrgrkrZrir[rl)NNNNNNN)r(r)r*r+rr,r-r�r�s@@rr�r��s����B-�B-rr�c�.a�]tRtRto^�t^�t^�tRtRtRRRRRR	/t	R
]
P!R4R]
P!R
4/t.R)Ot
RtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtR t R!t!R"t"R#t#R$t$R%t%R&t&R't'Vt(R(#)*�
CSMSerializeriB�izx-amzn-requestid�XAmznRequestIdzx-amz-request-id�
XAmzRequestIdz
x-amz-id-2�XAmzId2�v4zSAWS4-HMAC-SHA256 Credential=(?P<access_key>\w+)/\d+/(?P<signing_region>[a-z0-9-]+)/�s3zAWS (?P<access_key>\w+):c�4�VPV4WnR#)z�Serializes monitor events to CSM (Client Side Monitoring) format

:type csm_client_id: str
:param csm_client_id: The application identifier to associate
    to the serialized events
N)�_validate_client_id�
csm_client_id�r
r�s&&rr�CSMSerializer.__init__ds��	
� � ��/�*�rc�r�\V4VP8�d\RVRVPR24hR#)z&The value provided for csm_client_id: z exceeds the maximum length of z charactersN)�len�_MAX_CLIENT_ID_LENGTH�
ValueErrorr�s&&rr��!CSMSerializer._validate_client_idnsH���}��� :� :�:��8���H)�)-�)C�)C�(D�K�Q��
�;rc��VPV4pVPV4pW2R&VPF0p\WR4pVfK\VRV,4!WRVR7K2	\	\
P!VRR74#)z�Serializes a monitor event to the CSM format

:type event: BaseMonitorEvent
:param event: The event to serialize to bytes

:rtype: bytes
:returns: The CSM serialized form of the event
�TypeN�_serialize_)�
event_type)�
separators)�,�:)�_get_base_event_dict�_get_event_type�_SERIALIZEABLE_EVENT_PROPERTIESrBr�json�dumps)r
r��
event_dictr��attr�values&&    r�	serialize�CSMSerializer.serializeus���.�.�u�5�
��)�)�%�0�
�'�6���8�8�D��E��.�E�� ���m�d�2�3��*��9��D�J�J�z�j�I�J�Jrc�"�R^RVP/#)�Version�ClientId�r�r�s&&rr��"CSMSerializer._get_base_event_dict�s���q���*�*�
�	
rc��WR&R#)�ServiceNr8)r
rHr�rSs&&&,r�_serialize_service� CSMSerializer._serialize_service�s
�� '�9�rc��WR&R#)�ApiNr8)r
rIr�rSs&&&,r�_serialize_operation�"CSMSerializer._serialize_operation�s
��%�5�rc��WR&R#)�	TimestampNr8)r
rJr�rSs&&&,r�_serialize_timestamp�"CSMSerializer._serialize_timestamp�s
��"+�;�rc�f�\V4VR&V'dVPW!R,4R#R#)�AttemptCountN���)r��_add_fields_from_last_attempt)r
r�r�rSs&&&,r�_serialize_attempts�!CSMSerializer._serialize_attempts�s*��%(��]�
�>�"���.�.�z�B�<�H�rc��VP'dBVPVP4pVeW1R&VPVP4VR&VPeVPVR&VPeVPVPVR4VPe VPVPVR4R#R#)N�Region�	UserAgent�FinalHttpStatusCode�ApiCall)rZ�_get_region�_get_user_agentrhrk�_serialize_parsed_errorrl�_serialize_wire_exception)r
r��last_attempt�regions&&& rr��+CSMSerializer._add_fields_from_last_attempt�s����'�'�'��%�%�l�&B�&B�C�F��!�'-�8�$�&*�&:�&:��,�,�'�J�{�#��(�(�4�0<�0M�0M�J�,�-��$�$�0��(�(��)�)�:�y�
��&�&�2��*�*��+�+�Z��
�3rc�:�VR8XdWR&R#VR8XdWR&R#R#)r��Latency�ApiCallAttempt�AttemptLatencyNr8)r
rgr�r�s&&&&r�_serialize_latency� CSMSerializer._serialize_latency�s)����"�$+�y�!�
�+�
+�+2�'�(�,rc�$�V'd^M^VR&R#)��MaxRetriesExceededNr8)r
rtr�rSs&&&,r�_serialize_retries_exceeded�)CSMSerializer._serialize_retries_exceeded�s��1A�1�a�
�'�(rc�6�\V4PVR&R#)�FqdnN)r�netloc)r
r[r�rSs&&&,r�_serialize_url�CSMSerializer._serialize_url�s��%�c�]�1�1�
�6�rc���VPV4VR&VPV4'dVPV4VR&VPV4pVeWBR&RV9dVR,VR&R#R#)r��	AccessKeyNr�zX-Amz-Security-Token�SessionToken)r��
_is_signed�_get_access_keyr�)r
rZr�rSr�s&&&, r�_serialize_request_headers�(CSMSerializer._serialize_request_headers�sz��#'�"6�"6��"G�
�;���?�?�?�+�+�&*�&:�&:�?�&K�J�{�#��!�!�/�2����#)�x� �!�_�4�)8�&�*�J�~�&�5rc��WR&R#)�HttpStatusCodeNr8)r
rhr�rSs&&&,r�_serialize_http_status_code�)CSMSerializer._serialize_http_status_code�s
��(8�#�$rc�p�VPP4FwrEWA9gK
W,W%&K	R#r�)�"_RESPONSE_HEADERS_TO_EVENT_ENTRIES�items)r
rir�rS�header�entrys&&&,  r�_serialize_response_headers�)CSMSerializer._serialize_response_headers�s1��"�D�D�J�J�L�M�F��)�$4�$<�
�!�Mrc���VR8XdRMRpVPVR,VP4W%R,&VPVR,VP4W%R,&R#)r��Final��Code�AwsException�Message�AwsExceptionMessageN)�	_truncate�_MAX_ERROR_CODE_LENGTH�_MAX_MESSAGE_LENGTH)r
rkr�r�rS�field_prefixs&&&&, rr��%CSMSerializer._serialize_parsed_error�sb��#-�	�"9�w�r��48�N�N��� �$�"=�"=�5
�
�.�0�1�<@�>�>���#�T�%=�%=�<
�
�"7�7�8rc���VR8XdRMRpVPVPPVP4W%R,&VP\	V4VP
4W%R,&R#)r�rr�SdkException�SdkExceptionMessageN)rr�r(�_MAX_EXCEPTION_CLASS_LENGTH�strr)r
rlr�r�rSrs&&&&, rr��'CSMSerializer._serialize_wire_exception�si��#-�	�"9�w�r��48�N�N��$�$�-�-�t�/O�/O�5
�
�.�0�1�<@�>�>�����!9�!9�<
�
�"7�7�8rc�f�\V\4'dR#\V\4'dR#R#)r�r�N)r�rLr�r�s&&rr��CSMSerializer._get_event_type�s(���e�\�*�*��
��2�
3�
3�#�4rc�l�VPV4pVPV4wr4VPR4#)�
access_key)�_get_auth_value�_get_auth_match�group)r
rZ�auth_valrA�
auth_matchs&&   rr�CSMSerializer._get_access_key�s5���'�'��8���,�,�X�6�
������-�-rc��VPV4'gR#VPV4pVPV4wr4VR8wdR#VPR4#)Nr��signing_region)rr+r,r-)r
rZr.�signature_versionr/s&&   rr��CSMSerializer._get_region�sU������/�/���'�'��8��(,�(<�(<�X�(F�%����$����� 0�1�1rc�l�VP\VPRR44VP4#)z
User-Agentr)rrrj�_MAX_USER_AGENT_LENGTH�r
rZs&&rr��CSMSerializer._get_user_agents1���~�~��?�.�.�|�R�@�A��'�'�
�	
rc��RV9#��
Authorizationr8r7s&&rr�CSMSerializer._is_signed
s
���/�1�1rc�&�\VR,4#r:)rr7s&&rr+�CSMSerializer._get_auth_value
s���o�o�>�?�?rc��VPP4F#wr#VPV4pV'gK W$3u#	R#)N)NN)�_AUTH_REGEXSr�match)r
r.r3�regexrAs&&   rr,�CSMSerializer._get_auth_matchsD��(,�(9�(9�(?�(?�(A�$���K�K��)�E��u�(�/�/�)B��rc�^�\V4V8�d\PRVV4VRV#V#)z6Truncating following value to maximum length of %s: %sN)r�r!r")r
�text�
max_lengths&&&rr�CSMSerializer._truncates7���t�9�z�!��L�L�H���
�
���$�$��rr�N)rHrIrJr�rgrtr[rZrhrirkrl))r(r)r*r+r�r$rr6rr�re�compiler@r�rr�r�r�r�r�r�r�r�r�r�rrrrr�r�r�rr�r�rr+r,rr,r-r.s@rr�r�Bs�������"%�� �� �����,��O��i�*�&�	
�b�j�j�
/�
�
	
�b�j�j�4�5�
�L�
'�#�+��K�(
�(�&�,�I�
�*3�H�
2��8�
=�	
�	
�$�.�
2�
�2�@���rr�c�0a�]tRtRtoRtRtRtRtVtR#)�SocketPublisheri"c�.�WnW#3VnW@nR#)a�Publishes monitor events to a socket

:type socket: socket.socket
:param socket: The socket object to use to publish events

:type host: string
:param host: The host to send events to

:type port: integer
:param port: The port on the host to send events to

:param serializer: The serializer to use to serialize the event
    to a form that can be published to the socket. This must
    have a `serialize()` method that accepts a monitor event
    and return bytes
N)�_socket�_address�_serializer)r
�socket�host�port�
serializers&&&&&rr�SocketPublisher.__init__%s��"�����
�%�rc��VPPV4p\V4VP8�d-\PR\V4VP4R#VPPW P4R#)z�Publishes a specified monitor event

:type event: BaseMonitorEvent
:param event: The monitor event to be sent
    over the publisher's socket to the desired address.
z`Serialized event of size %s exceeds the maximum length allowed: %s. Not sending event to socket.N)	rOr�r��_MAX_MONITOR_EVENT_LENGTHr!r"rM�sendtorN)r
r��serialized_events&& rr�SocketPublisher.publish:sn�� �+�+�5�5�e�<���� �4�#A�#A�A��L�L�<��$�%��.�.�	
�
������,�m�m�<r)rNrOrMNi )	r(r)r*r+rVrrr,r-r.s@rrKrK"s���� (��&�*=�=rrK)r��loggingrHr5�botocore.compatrrr�botocore.retryhandlerrr��	getLoggerr(r!rr1r�rLr�r�rKr8rr�<module>r^s�����	��B�B�G�	�	�	�8�	$��)�)�X](�](�@��89�#�9�xC-�*�C-�L]�]�@(=�(=r

Youez - 2016 - github.com/yon3zu
LinuXploit