- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.145.66.195
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/tracer/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/tracer/tests/__pycache__/test_tracer.cpython-36.pyc
3

"e�
�
@s�ddlTddlmZddlmZddlmZmZddlm	Z	ddl
mZmZm
Z
mZyddlmZWnddlmZYnXGd	d
�d
ej�ZGdd�de�ZGd
d�de	�ZGdd�de�ZGdd�de�ZGdd�de�Zddd�Zedkr�ej�dS)�)�*�)�Tracer)�Rules)�Applications�Application)�AffectedProcess)�ProcessesCollection�PackagesCollection�ApplicationsCollection�AffectedProcessesCollection)�patchc@s0eZdZdd�Zeddd�dd��Zdd	�Zd
S)�	TestRulescCs>t�t_tt�tttd�|_d|j_tj	ddd��t
t_dS)N)�memoryi�ZkernelT)�name�ignore)
rrZ_appsr�PackageManagerMockr�dump_memory_mock�tracerZ	timestampZ_append_application�
ProcessesMockrZprocesses_factory)�self�r�!/usr/lib/python3.6/test_tracer.py�setUps
zTestRules.setUpz0tracer.resources.applications.System.init_systemZdummy)Zreturn_valuecCs>|jj�}|jt|�ttjd�tjd�g��|j|t�dS)N�baz�qux)rZtrace_affectedZassertSetEqual�setr�find�assertIsInstancer)rZinit_system�affectedrrr�test_trace_affecteds
$zTestRules.test_trace_affectedcCsV|jjtjd�t�}|j|t�|jt|�d�|d}|j|t	�|j|j
d�dS)Nrrr�)rZtrace_applicationrr�AffectedProcessMockrrZassertEqual�lenr�pid)rr�processrrr�test_trace_application sz TestRules.test_trace_applicationN)�__name__�
__module__�__qualname__rr
r r&rrrrrsrc@sXeZdZdd�Zdd�Zedd��Zedd��Zed	d
��Zdd�Z	d
d�Z
dd�ZdS)�ProcessMockcCs||_||_||_||_dS)N)r$�files�_name�_create_time)rr$r�create_timer+rrr�__init__+szProcessMock.__init__cCs|jS)N)r,)rrrrr1szProcessMock.namecCs|jS)N)r,)rrrr�	real_name4szProcessMock.real_namecCsdS)NFr)rrrr�is_interpreted8szProcessMock.is_interpretedcCsdS)NFr)rrrr�
is_session<szProcessMock.is_sessioncCs|jS)N)r-)rrrrr.@szProcessMock.create_timecCsgS)Nr)rrrr�childrenCszProcessMock.childrencCsdS)Nr)rrrr�parentFszProcessMock.parentN)r'r(r)r/r�propertyr0r1r2r.r3r4rrrrr**sr*c@seZdZddd�ZdS)r"NcCs||_t�|_t�|_dS)N)r$rZpackagesr+)rr$rrrr/KszAffectedProcessMock.__init__)N)r'r(r)r/rrrrr"Jsr"c@seZdZedd��ZdS)rc
CsNttddddddg�tddd	d
ddg�td
dddddg�tdddddg�g�S)N�ZfooiW�file1�file2�file3�Zbari'�file10�file11�file12r!ri
�file7�ria�file4�file9)r	r*rrrr�allSs
zProcessesMock.allN)r'r(r)�staticmethodrBrrrrrRsrc@seZdZdd�ZdS)�PackageMockcCs||_||_||_dS)N)r�modifiedr+)rrrEr+rrrr/^szPackageMock.__init__N)r'r(r)r/rrrrrD]srDc	@s`eZdZedddddg�edddd	d
g�eddd
ddg�edddddg�gZdd�Zdd�ZdS)r�Ai
r7r8r9�Bi\r@Zfile5Zfile6�Ciar>Zfile8rA�Di�"r;r<r=cstt�fdd�|j��S)Ncs
|j�kS)N)rE)�p)�	unix_timerr�<lambda>msz8PackageManagerMock.packages_newer_than.<locals>.<lambda>)r
�filter�	_packages)rrKr)rKr�packages_newer_thanlsz&PackageManagerMock.packages_newer_thancCs$x|jD]}|j|kr|jSqWdS)N)rNrr+)rZpkg_name�packagerrr�
package_filesos
z PackageManagerMock.package_filesN)r'r(r)rDrNrOrQrrrrrdsrNcCsLi}xBtj�D]6}x0|jD]&}||kr6||j|�q|g||<qWqW|S)N)rrBr+�append)�userrr%�filerrrrusr�__main__)N)Z__meta__Ztracer.resources.tracerrZtracer.resources.rulesrZtracer.resources.applicationsrrZtracer.resources.processesrZtracer.resources.collectionsr	r
rrZ
unittest.mockr
ZmockZunittestZTestCaser�objectr*r"rrDrrr'�mainrrrr�<module>s$ 


Youez - 2016 - github.com/yon3zu
LinuXploit