403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
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_pkgimport.cpython-36.opt-2.pyc
3

�
�^�
�@svddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
Gdd�dej�Ze
dkrrej�dS)�N)�cache_from_source)�create_empty_filec@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
TestImportcOsRd|_x&|jtjkr,|jtjtj�7_qW|jd|_tj	j
|f|�|�dS)NZPACKAGE_z.foo)�package_name�sys�modules�random�choose�string�
ascii_letters�module_name�unittest�TestCase�__init__)�self�args�kw�r�3/opt/alt/python36/lib64/python3.6/test_pkgimport.pyrs
zTestImport.__init__cCs,x&|j|jfD]}|tjkrtj|=qWdS)N)rrrr)rrrrr�remove_moduless
zTestImport.remove_modulescCsbtj�|_tjj|j�tjj|j|j�|_	tj
|j	�ttjj|j	d��tjj|j	d�|_dS)Nz__init__.pyzfoo.py)
�tempfileZmkdtemp�test_dirr�path�append�os�joinrZpackage_dir�mkdirr�module_path)rrrr�setUps


zTestImport.setUpcCs<tj|j�|jtjj|j�d�tjj|j�|j�dS)Nr)	�shutilZrmtreerZassertNotEqualrr�count�remover)rrrr�tearDown#szTestImport.tearDownc	CsFt|j�}tjj|�r tj|�t|jd��}|j|�WdQRXdS)N�w)rrrr�existsr!�open�write)r�contentsZ
compiled_path�frrr�rewrite_file)s


zTestImport.rewrite_filecCs�|jd�yt|j�Wntk
r,Yn
Xtd��|j|jtj�|jt	tj|j
d��d}x |tt�kr�|t
jtj�7}qdW|j|�yt|j�Wntk
r�Yn
Xtd��|jd|�t|j�j}|jt||�d�dS)N�forzFailed to induce SyntaxError�foo�azFailed to induce NameError.z%s = 1�)r)�
__import__r�SyntaxError�RuntimeErrorZassertNotInrrZassertFalse�hasattrr�dir�__builtins__rr	r
r�	NameErrorr+ZassertEqual�getattr)r�var�modulerrr�test_package_import__semantics0s(

z)TestImport.test_package_import__semanticsN)	�__name__�
__module__�__qualname__rrrr"r)r8rrrrrs	r�__main__)rrrr
rrr
�importlib.utilrZtest.supportrrrr9�mainrrrr�<module>sC

Youez - 2016 - github.com/yon3zu
LinuXploit