[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.128.206.181: ~ $
�

>�Dg�d����ddlZddlZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
Z
ddlmZm
Z
mZddlmZddlmZerddlmZnddlmZer.ddlZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZejd��ZGd�de��Z Gd�de!��Z"Gd�de!��Z#Gd�de#��Z$d�Z%d�Z&d�Z'ej(d���Z)d�Z*dS)�N)�datetime�	timedelta)�Real)�capture_internal_exceptions�logger�	to_string)�PY2)�MYPY)�Mapping)�	Generator)�Optional)�Any)�Dict)�List)�Tuple)�SamplingContextz5^[ 	]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ 	]*$c�*�eZdZ	dd�Zd�Zd�Zd�ZdS)�EnvironHeaders�HTTP_c�"�||_||_dS�N)�environ�prefix)�selfrrs   �I/opt/imunify360/venv/lib64/python3.11/site-packages/sentry_sdk/tracing.py�__init__zEnvironHeaders.__init__0s����������c�x�|j|j|�dd�����zS�N�-�_)rr�replace�upper)r�keys  r�__getitem__zEnvironHeaders.__getitem__9s0���|�D�K�#�+�+�c�3�*?�*?�*E�*E�*G�*G�G�H�Hrc�N�td�t|��D����S)Nc3�K�|]}dV��dS)�N�)�.0r!s  r�	<genexpr>z)EnvironHeaders.__len__.<locals>.<genexpr>?s"����)�)��1�)�)�)�)�)�)r)�sum�iter�rs r�__len__zEnvironHeaders.__len__=s%���)�)�d�4�j�j�)�)�)�)�)�)rc#�K�|jD]y}t|t��s�|�dd�����}|�|j��s�[|t|j��d�V��zdSr)r�
isinstance�strr"r#�
startswithr�len)r�ks  r�__iter__zEnvironHeaders.__iter__As�������	(�	(�A��a��%�%�
���	�	�#�s�#�#�)�)�+�+�A��<�<���,�,�
���C���$�$�&�&�'�'�'�'�'�	(�	(rN)r)�__name__�
__module__�__qualname__rr%r/r6r)rrrr/s]�����������I�I�I�*�*�*�
(�
(�
(�
(�
(rrc�"�eZdZdZdZd�Zd�ZdS)�
_SpanRecorderz5Limits the number of spans recorded in a transaction.��maxlen�spansc�(�|dz
|_g|_dS)Nr(r<�rr=s  rrz_SpanRecorder.__init__Ss���q�j�����
�
�
rc��t|j��|jkr	d|_dS|j�|��dSr)r4r>r=�_span_recorder�append)r�spans  r�addz_SpanRecorder.add]sA���t�z�?�?�T�[�(�(�"&�D�����J���d�#�#�#�#�#rN)r7r8r9�__doc__�	__slots__rrEr)rrr;r;Ns=������?�?�#�I����$�$�$�$�$rr;c���eZdZdZd�Z										dd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zed���Z
ed
���Zd�Zed���Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�ZdS)�Span)�trace_id�span_id�parent_span_id�same_process_as_parent�sampled�op�description�start_timestamp�_start_timestamp_monotonic�status�	timestamp�_tags�_datarB�hub�_context_manager_state�_containing_transactionc�|�d|vrt�t��St�|��S)z_
        Backwards-compatible implementation of Span and Transaction
        creation.
        �transaction)�object�__new__�Transaction)�cls�kwargss  rr]zSpan.__new__|s3���F�"�"��>�>�+�.�.�.��~�~�c�"�"�"rNTc��|ptj��j|_|ptj��jdd�|_||_||_||_||_||_	|	|_
||_i|_i|_
tj��|_	t#j��|_n#t($rYnwxYwd|_d|_d|_dS)N�)�uuid�uuid4�hexrJrKrLrMrNrOrPrSrWrUrVr�utcnowrQ�time�perf_counterrR�AttributeErrorrTrBrY)rrJrKrLrMrNrOrPrWrSr[s           rrz
Span.__init__�s���!�4�D�J�L�L�$4��
��7�$�*�,�,�"2�2�3�3�"7���,���&<��#�������&�����������
���
�'��0�0���	�
/3�.?�.A�.A�D�+�+���	�	�	��D�	�������"���'+��$�$�$s�B8�8
C�Cc�p�|j�t|��|_|j�|��dSr)rBr;rEr@s  r�init_span_recorderzSpan.init_span_recorder�s8����&�"/��"7�"7�D�������%�%�%�%�%rc��d|jj�d|j�d|j�d|j�d|j�d|j�d|j�d�S)	N�<z(op=z, description:�, trace_id=�
, span_id=�, parent_span_id=�
, sampled=�)>)�	__class__r7rOrPrJrKrLrNr.s r�__repr__z
Span.__repr__�sZ���
�N�#�#�#��G�G�G������M�M�M��L�L�L������L�L�L�
�	
rc��|jptjj}|jd\}}|j}||_|||f|_|S)N���)rW�
sentry_sdk�Hub�current�_stackrDrX)rrWr!�scope�old_spans     r�	__enter__zSpan.__enter__�sD���h�0�*�.�0���:�b�>���5��:����
�'*�E�8�&<��#��rc��|�|�d��|j\}}}|`|�|��||_dS)N�internal_error)�
set_statusrX�finishrD)r�ty�value�tbrWr{r|s       r�__exit__z
Span.__exit__�sM�����O�O�,�-�-�-�#�:���U�H��'����C������
�
�
rc��|�d|j��td|jd|jd�|��}t|t��r||_n|j|_|jx|_}|r|�	|��|S)a
        Start a sub-span from the current span or transaction.

        Takes the same arguments as the initializer of :py:class:`Span`. The
        trace id, sampling decision, transaction pointer, and span recorder are
        inherited from the current span/transaction.
        rNN)rJrKrLr))
�
setdefaultrNrIrJrKr1r^rYrBrE)rr`�rv�recorders    r�start_childzSpan.start_child�s���	���)�T�\�2�2�2�
�
��]�D���
�
�QW�
�
���d�K�(�(�	F�)-�B�&�&�)-�)E�B�&�'+�':�:���H��	��L�L������	rc�D�tjd��|jdi|��S)z$Deprecated: use start_child instead.z:Deprecated: use Span.start_child instead of Span.new_span.r))r�warningr�)rr`s  r�new_spanz
Span.new_span�s.��	��S�T�T�T��t��)�)�&�)�)�)rc�z�|turtjd��tjt|��fi|��S)aJ
        Create a Transaction with the given params, then add in data pulled from
        the 'sentry-trace' header in the environ (if any) before returning the
        Transaction.

        If the 'sentry-trace' header is malformed or missing, just create and
        return a Transaction instance with the given params.
        zXDeprecated: use Transaction.continue_from_environ instead of Span.continue_from_environ.)rIrr�r^�continue_from_headersr)r_rr`s   r�continue_from_environzSpan.continue_from_environ�sI���$�;�;��N�9�
�
�
��0���1H�1H�S�S�F�S�S�Src��|turtjd��tj|�d��fi|��}|�tdi|��}d|_|S)a3
        Create a Transaction with the given params, then add in data pulled from
        the 'sentry-trace' header (if any) before returning the Transaction.

        If the 'sentry-trace' header is malformed or missing, just create and
        return a Transaction instance with the given params.
        zXDeprecated: use Transaction.continue_from_headers instead of Span.continue_from_headers.�sentry-traceNFr))rIrr�r^�from_traceparent�getrM)r_�headersr`r[s    rr�zSpan.continue_from_headerss���$�;�;��N�9�
�
�
�"�2��K�K��'�'�
�
�+1�
�
����%�/�/��/�/�K�-2��*��rc#�:K�d|���fV�dS)Nr�)�to_traceparentr.s r�iter_headerszSpan.iter_headers*s)�����d�1�1�3�3�3�3�3�3�3�3rc��|turtjd��|sdS|�d��r|�d��r
|dd�}t
�t|����}|�dS|���\}}}|�#d�	t|d����}|�#d	�	t|d����}|r|d
k}nd}td|||d�|��S)
a-
        Create a Transaction with the given params, then add in data pulled from
        the given 'sentry-trace' header value before returning the Transaction.

        If the header value is malformed or missing, just create and return a
        Transaction instance with the given params.
        zNDeprecated: use Transaction.from_traceparent instead of Span.from_traceparent.Nz00-z-00����z{:032x}rbz{:016x}�0)rJrL�parent_sampledr))rIrr�r3�endswith�_traceparent_header_format_re�matchr2�groups�format�intr^)r_�traceparentr`r�rJrL�sampled_strr�s        rr�zSpan.from_traceparent.s5���$�;�;��N�4�
�
�
�
�	��4��!�!�%�(�(�	,�[�-A�-A�%�-H�-H�	,�%�a��d�+�K�-�3�3�C��4D�4D�E�E���=��4�05�����-��.�+��� �'�'��H�b�(9�(9�:�:�H��%�&�-�-�c�.�"�.E�.E�F�F�N��	"�(�C�/�N�N�!�N��
��)�)�
�
��	
�
�	
rc�Z�d}|jdurd}|jdurd}|j�d|j�d|��S)N�T�1Fr�r )rNrJrK)rrNs  rr�zSpan.to_traceparent_sF�����<�4����G��<�5� � ��G�!�]�]�]�D�L�L�L�'�'�B�Brc��||j|<dSr)rU�rr$r�s   r�set_tagzSpan.set_tagh�����
�3���rc��||j|<dSr)rVr�s   r�set_dataz
Span.set_datalr�rc��||_dSr�rS)rr�s  rr�zSpan.set_statusps
������rc�V�|�dt|����|dkr|�d��dSd|cxkrdkr�nn�|dkr|�d��dS|dkr|�d��dS|d	kr|�d
��dS|dkr|�d��dS|d
kr|�d��dS|dkr|�d��dS|�d��dSd|cxkrdkrqnnn|dkr|�d��dS|dkr|�d��dS|dkr|�d��dS|�d��dS|�d��dS)Nzhttp.status_codei��oki�i��permission_deniedi��	not_foundi��resource_exhaustedi��failed_preconditioni��unauthenticatedi��already_exists�invalid_argumentiXi��deadline_exceededi��
unimplementedi��unavailabler�
unknown_error)r�r2r�)r�http_statuss  r�set_http_statuszSpan.set_http_statusts�����'��[�)9�)9�:�:�:������O�O�D�!�!�!�!�!�
�K�
%�
%�
%�
%�#�
%�
%�
%�
%�
%��c�!�!���� 3�4�4�4�4�4���#�#�����,�,�,�,�,���#�#���� 4�5�5�5�5�5���#�#���� 5�6�6�6�6�6���#�#���� 1�2�2�2�2�2���#�#���� 0�1�1�1�1�1���� 2�3�3�3�3�3�
�K�
%�
%�
%�
%�#�
%�
%�
%�
%�
%��c�!�!���� 3�4�4�4�4�4���#�#�����0�0�0�0�0���#�#����
�.�.�.�.�.���� 0�1�1�1�1�1��O�O�O�,�,�,�,�,rc��|jdkS)Nr�r�r.s r�
is_successzSpan.is_success�s���{�d�"�"rc�0�|j�dS|p|jptjj}	tj��|jz
}|jt|���z|_n(#t$rtj��|_YnwxYwt||��dS)N)�seconds)rTrWrwrxryrgrhrRrQrrirrf�#_maybe_create_breadcrumbs_from_span)rrW�duration_secondss   rr�zSpan.finish�s����>�%��4��7�T�X�7���!7��	/�#�0�2�2�T�5T�T��!�1�I�FV�4W�4W�4W�W�D�N�N���	/�	/�	/�%�_�.�.�D�N�N�N�	/����	,�C��6�6�6��ts�8A�"B�Bc	���|j|j|j|j|j|j|j|jd�}|jr|j|j	d<|j	}|r||d<|j
}|r||d<|S)N)rJrKrLrMrOrPrQrTrS�tags�data)rJrKrLrMrOrPrQrTrSrUrV)rr�r�r�s    r�to_jsonzSpan.to_json�s����
��|�"�1�&*�&A��'��+�#�3���	
�	
���;�	/�#'�;�D�J�x� ��z���	��B�v�J��z���	��B�v�J��	rc�j�|j|j|j|j|jd�}|jr
|j|d<|S)N)rJrKrLrOrPrS)rJrKrLrOrPrS)rr�s  r�get_trace_contextzSpan.get_trace_context�sG���
��|�"�1��'��+�
�
���;�	'��;�B�x�L��	r)
NNNTNNNNNNr)r7r8r9rGr]rrkrtr}r�r�r��classmethodr�r�r�r�r�r�r�r�r�r�r�r�r�r)rrrIrIes��������I�,#�#�#� ���#�������',�',�',�',�R&�&�&�

�

�

����	�	�	����2*�*�*��T�T��[�T�*����[��44�4�4��.
�.
��[�.
�`C�C�C� � � � � � ����-�-�-�B#�#�#�����&���4����rrIc�B��eZdZdZ		d	d�Zd�Zd
d�Z�fd�Zd�Z�xZ	S)r^)�namer�r�Nc��|s-d|vr)tjd��|�d��}tj|fi|��||_||_dS)Nr[z^Deprecated: use Transaction(name=...) to create transactions instead of Span(transaction=...).)rr��poprIrr�r�)rr�r�r`s    rrzTransaction.__init__�so���	-�
��/�/��N�4�
�
�
��:�:�m�,�,�D��
�d�%�%�f�%�%�%���	�,����rc��d|jj�d|j�d|j�d|j�d|j�d|j�d|j�d�S)	Nrmz(name=z, op=rnrorprqrr)rsr7r�rOrJrKrLrNr.s rrtzTransaction.__repr__�sW���
�N�#�#�#��I�I�I��G�G�G��M�M�M��L�L�L������L�L�L�
�	
rc
����j�dS�j�tjd��dS|p�jpt
jj}|j}|�dS�j	stj
d��d�_	t��|���j
s�j
�tj
d��dS�fd��jjD��}|�d�j	d����i�j�j�j|d���S)	Nz.Discarding transaction because sampled = FalsezCTransaction has no name, falling back to `<unlabeled transaction>`.z<unlabeled transaction>z1Discarding transaction without sampling decision.c�N��g|]!}|�u�|j�
|�����"Sr)rTr�)r*rDrs  �r�
<listcomp>z&Transaction.finish.<locals>.<listcomp>s=���
�
�
���4���D�N�$>�
�L�L�N�N�$>�$>�$>rr[�trace)�typer[�contextsr�rTrQr>)rTrBr�debugrWrwrxry�clientr�r�rIr�rNr>�
capture_eventr�rUrQ)rrWr��finished_spanss`   rr�zTransaction.finish�sA����>�%��4���&��L�I�J�J�J��4��7�T�X�7���!7������>��4��y�	2��N�U�
�
�
�2�D�I����D�#�����|�	��|�#���R�S�S�S��4�
�
�
�
��+�1�
�
�
��� � �%�#�y�$�d�&<�&<�&>�&>�?��
�!�^�#'�#7�'�
�
�

�

�
	
rc���tt|�����}|j|d<|j|d<|j|d<|S)Nr�rNr�)�superr^r�r�rNr�)rr�rss  �rr�zTransaction.to_json+sG���
�;��
%�
%�
-�
-�
/�
/���Y��6�
����9�
�#�2�����	rc
���|jptjj}|j}|r|jpi}d�|jr
d|jzdznd|j���}|rt|��s	d|_
dS|j
�dSt|�d����r|d|��n|d	�|d	n|d
}t|��s1tjd�|�����d|_
dS|sVtjd
�|t|�d����rdnd�����d|_
dSt#j��t%|��k|_
|j
r*tjd�|�����dStjd�|t%|�������dS)aP
        Sets the transaction's sampling decision, according to the following
        precedence rules:

        1. If a sampling decision is passed to `start_transaction`
        (`start_transaction(name: "my transaction", sampled: True)`), that
        decision will be used, regardlesss of anything else

        2. If `traces_sampler` is defined, its decision will be used. It can
        choose to keep or ignore any parent sampling decision, or use the
        sampling context data to make its own decision or to choose a sample
        rate for the transaction.

        3. If `traces_sampler` is not defined, but there's a parent sampling
        decision, the parent sampling decision will be used.

        4. If `traces_sampler` is not defined and there's no parent sampling
        decision, `traces_sample_rate` will be used.
        z{op}transaction <{name}>rmz> r�)rOr�FN�traces_samplerr��traces_sample_ratezN[Tracing] Discarding {transaction_description} because of invalid sample rate.)�transaction_descriptionz?[Tracing] Discarding {transaction_description} because {reason}z"traces_sampler returned 0 or Falseztraces_sample_rate is set to 0)r��reasonz,[Tracing] Starting {transaction_description}z}[Tracing] Discarding {transaction_description} because it's not included in the random sample (sampling rate = {sample_rate}))r��sample_rate)rWrwrxryr��optionsr�rOr��has_tracing_enabledrN�callabler��_is_valid_sample_raterr�r��random�float)r�sampling_contextrWr�r�r�r�s       r�_set_initial_sampling_decisionz*Transaction._set_initial_sampling_decision5sl��,�h�0�*�.�0������,�f�n�3���"<�"C�"C�(,��7��d�g�
��$�$�R�t�y�#D�#
�#
��
�	�0��9�9�	� �D�L��F��<�#��F�����$4�5�5�6�6�
�%�G�$�%�&6�7�7�7�
$�$4�5�A�!�!1�2�2��1�2�	�%�[�1�1�	��N�`�g�g�,C�h���
�
�
�
!�D�L��F��	��L�Q�X�X�,C�$�G�K�K�0@�$A�$A�B�B�>�<�<�=�Y���	
�	
�	
�!�D�L��F�
�}����{�);�);�;����<�	��L�>�E�E�,C�F���
�
�
�
�
�
�L�P�W�W�,C� %�k� 2� 2�W���
�
�
�
�
r)r�Nr)
r7r8r9rGrrtr�r�r��
__classcell__)rss@rr^r^�s��������*�I���-�-�-�-�(

�

�

�1
�1
�1
�1
�f�����b�b�b�b�b�b�brr^c�p�t|�d��p|�d����S)zo
    Returns True if either traces_sample_rate or traces_sampler is
    non-zero/defined, False otherwise.
    r�r�)�boolr�)r�s rr�r��s1������0�1�1�R�W�[�[�AQ�5R�5R�S�S�Src�R�t|t��rtj|��r8t	jd�|t|�������dSt|��}|dks|dkr*t	jd�|�����dSdS)	z�
    Checks the given sample rate to make sure it is valid type and value (a
    boolean or a number between 0 and 1, inclusive).
    z}[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got {rate} of type {type}.)�rater�Frr(zX[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got {rate}.�r�T)	r1r�math�isnanrr�r�r�r�r�s rr�r��s����d�D�!�!��T�Z��%5�%5����
L�
S�
S���T�
�
�
S�
�
�	
�	
�	
�
�u���;�;�D��a�x�x�4�!�8�8���f�m�m��
n�
�
�	
�	
�	
�
�u��4rc��d}	t|d��rI|�|��}t|t��r|�|jj��}n#t$rd}YnwxYw|pt|��S)N�mogrify)	�hasattrr�r1�bytes�decode�
connection�encoding�	Exceptionr)�cursor�sql�real_sqls   r�_format_sqlr��s����H���6�9�%�%�	G��~�~�c�*�*�H��(�E�*�*�
G�#�?�?�6�+<�+E�F�F�����������������%�y��~�~�%s�AA�A-�,A-c#�&K�|jr:|jjd�dd��r|r|dgkrd}|dkrd}nd}d}t||��}i}|�||d<|�||d<|rd|d	<t	��5|�|d
|���ddd��n#1swxYwY|�d|�
��5}|���D]\}}	|�||	���|V�ddd��dS#1swxYwYdS)N�_experiments�record_sql_paramsF�pyformatr�z	db.paramsz
db.paramstyleTzdb.executemany�query)�message�categoryr��db)rOrP)	r�r�r�r�r�add_breadcrumb�
start_span�itemsr�)
rWr�r�params_list�
paramstyle�executemanyr�rDr5�vs
          r�record_sql_queriesr�s������z�
�c�j�(��8�<�<��U���
��	�k�d�V�3�3��K���#�#�!�J�����
����&�&�E�
�D���'��[���� *��_���&�!%��
��	$�	&�	&�G�G����5�7���F�F�F�G�G�G�G�G�G�G�G�G�G�G����G�G�G�G�

���4�U��	3�	3��t��J�J�L�L�	 �	 �D�A�q��M�M�!�Q������
�
�
���������������������s$�=B"�"B&�)B&�5D�D
�
D
c��|jdkr%|�|jdd|j���dS|jdkr|�dd|j���dS|jdkr%|�dd|j|j���dSdS)N�redis)rr�rr��http�httplib)r�rr��
subprocess)r�rrr�)rOrrPrUrV)rWrDs  rr�r�s����w�'�������$�7�W�4�:�	�	
�	
�	
�	
�	
�
��F�	�	���������L�L�L�L�L�	
��L�	 �	 �����!��$���		�	
�	
�	
�	
�	
�
!�	 r)+�rerc�
contextlibr�r�rgrr�numbersrrw�sentry_sdk.utilsrrr�sentry_sdk._compatr	�sentry_sdk._typesr
�collectionsr�collections.abc�typingrr
rrrrr�compiler�rr\r;rIr^r�r�r��contextmanagerrr�r)rr�<module>r s���	�	�	�	�������������
�
�
�
�����(�(�(�(�(�(�(�(���������������������
#�"�"�"�"�"�"�"�"�"�"�"��(�#�#�#�#�#�#�#�'�'�'�'�'�'��
2��M�M�M� � � � � � �������������������������������1�1�1�1�1�1� *��
��!�!��(�(�(�(�(�W�(�(�(�>$�$�$�$�$�F�$�$�$�.m�m�m�m�m�6�m�m�m�`B�B�B�B�B�$�B�B�B�JT�T�T����>&�&�&�(��'�'���'�T
�
�
�
�
r

Filemanager

Name Type Size Permission Actions
__init__.cpython-311.pyc File 992 B 0644
_compat.cpython-311.pyc File 3.78 KB 0644
_functools.cpython-311.pyc File 2.44 KB 0644
_queue.cpython-311.pyc File 11.64 KB 0644
_types.cpython-311.pyc File 1.79 KB 0644
api.cpython-311.pyc File 6.54 KB 0644
attachments.cpython-311.pyc File 2.29 KB 0644
client.cpython-311.pyc File 16.67 KB 0644
consts.cpython-311.pyc File 3.09 KB 0644
debug.cpython-311.pyc File 2.44 KB 0644
envelope.cpython-311.pyc File 12.58 KB 0644
hub.cpython-311.pyc File 25.07 KB 0644
scope.cpython-311.pyc File 16.48 KB 0644
serializer.cpython-311.pyc File 16.5 KB 0644
sessions.cpython-311.pyc File 8.71 KB 0644
tracing.cpython-311.pyc File 27.45 KB 0644
transport.cpython-311.pyc File 16.72 KB 0644
utils.cpython-311.pyc File 32.93 KB 0644
worker.cpython-311.pyc File 7.23 KB 0644