- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.144.97.170
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_views.cpython-36.pyc
3

"e@'�
@s&ddlmZddlTddlmZddlmZddlmZddl	m
Z
mZddlm
Z
dd	lmZdd
lmZmZddlZddlZddlZddlZejdd
dgd�ZejZyddlmZWnddlmZYnXeejj_eejj_eejj _Gdd�de!j"�Z#Gdd�de$�Z%Gdd�de$�ZdS)�)�unicode_literals�)�*)�StringIO)�DefaultView)�
HelperView)�Applications�Application)�ApplicationsCollection)�Package)�ProcessMock�AffectedProcessMockN�tracerTZen)ZfallbackZ	languages)�patchc@sxeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
eddd�dd��ZdS)�	TestViewscCst�|_dS)N)r�out)�self�r� /usr/lib/python3.6/test_views.py�setUp#szTestViews.setUpcCsFt|j�}|jdt��|jdtg��|j�|j|jj�d�dS)N�args�applications�)rr�assign�ArgsMockr
�render�assertEqual�getvalue)r�viewrrr�test_default_none&s

zTestViews.test_default_nonec
Cspt|j�}|jdt��|jdttdddd��tdddd��tdd	d
d��g��|j�|j|jj�d�dS)Nrr�applicationzfirst helper�first)�type�helper�namez
second helper�secondzthird helper�thirdzkYou should restart:
  * Some applications using:
      first helper
      second helper
      third helper
)	rrrrr
r	rrr)rrrrr�test_default_with_helpers-s
z#TestViews.test_default_with_helpersc
Cspt|j�}|jdt��|jdttdddd��tdddd��tdddd��g��|j�|j|jj�d�dS)	Nrrr �foo)r"r$r#�bar�bazzSYou should restart:
  * These applications manually:
      bar
      baz
      foo
)	rrrrr
r	rrr)rrrrr�test_default_without_helpers>s
z&TestViews.test_default_without_helpersc
Cs�t|j�}|jdt��|jdttdddd��tdddd��tdd	d
d��tdddd��tdd
dd��tdddd��g��|j�|j|jj�d�dS)Nrrr zfirst helperr!)r"r#r$z
second helperr%zthird helperr&r()r"r$r#r)r*z�You should restart:
  * Some applications using:
      first helper
      second helper
      third helper

  * These applications manually:
      bar
      baz
      foo
)	rrrrr
r	rrr)rrrrr�!test_default_with_without_helpersOs
z+TestViews.test_default_with_without_helpersc
Cstt|j�}|jdtdd��|jdttdddd��tdd	d
d��tdddd��g��|j�|j|jj�d
�dS)NrT)�allr�sessionr(�h1)r"r$r#r)�h2r*�h3zbYou should restart:
  * These applications restarting your session:
      bar
      baz
      foo
)	rrrrr
r	rrr)rrrrr�test_default_all_sessionhs
z"TestViews.test_default_all_sessionc
Cstt|j�}|jdtdd��|jdttdddd��tdd	d
d��tdddd��g��|j�|j|jj�d
�dS)NrT)r-r�staticr(r/)r"r$r#r)r0r*r1zbYou should restart:
  * These applications rebooting your computer:
      bar
      baz
      foo
)	rrrrr
r	rrr)rrrrr�test_default_all_staticys
z!TestViews.test_default_all_staticc
Cs�t|j�}|jdtdd��|jdttdddd��tdd	d
d��tdddd��td
ddd��td
ddd��td
ddd��g��|j�|j|jj�d�dS)NrT)r-rr.r(r/)r"r$r#r)r0r*r1r3�aaa�h4�bbbZh5ZcccZh6z�You should restart:
  * These applications restarting your session:
      bar
      baz
      foo

  * These applications rebooting your computer:
      aaa
      bbb
      ccc
)	rrrrr
r	rrr)rrrrr�test_default_all_session_static�s
z)TestViews.test_default_all_session_staticcCs�t|j�}|jdtdd��|jdttdddd��tdd	d
d��tdddd��tdd
dd��tdddd��tdddd��tdddd��tdddd��g��|j�|j|jj�d�dS)NrT)r-rr zfirst helperr!)r"r#r$z
second helperr%r()r"r$r#r)r.r*r/�quxr0r3r5r1r7r6aYou should restart:
  * Some applications using:
      first helper
      second helper

  * These applications manually:
      bar
      foo

  * These applications restarting your session:
      baz
      qux

  * These applications rebooting your computer:
      aaa
      bbb
)	rrrrr
r	rrr)rrrrr�test_default_all�s
zTestViews.test_default_allcCs�t|j�}|jdt��|jdttdddd��tdddd��tdd	dd
��tdddd
��tdd
dd
��tdddd
��tdddd
��g��|j�|j|jj�d�dS)Nrrr zfirst helperr!)r"r#r$z
second helperr%r()r"r$r#r)r.r*r/r9r0r3r5r1a!You should restart:
  * Some applications using:
      first helper
      second helper

  * These applications manually:
      bar
      foo

Additionally, there are:
  - 2 processes requiring restart of your session (i.e. Logging out & Logging in again)
  - 1 processes requiring reboot
)	rrrrr
r	rrr)rrrrr�test_default_not_all�s
zTestViews.test_default_not_allc
Cspt|j�}|jdt��|jdttdddd��tdddd��td	d
dd��g��|j�|j|jj�d�dS)
Nrrr.r(r/)r"r$r#r)r0r3r*r1z�There are:
  - 2 processes requiring restart of your session (i.e. Logging out & Logging in again)
  - 1 processes requiring reboot
)	rrrrr
r	rrr)rrrrr�test_default_note_only�s
z TestViews.test_default_note_onlyz0tracer.resources.applications.System.init_systemZdummy)Zreturn_valuecCs�tdddddg�tdddddg�g}td	�}d|_d
|_d|_ddg|_td�}t|g�|_|g}t	|j
�}|jdtdd
��|jd|�|jdt
jd��|jd|�|jd|�|jdd�|j�|j|j
j�d�dS)N�r(i�Zfile1Zfile2�i.Zfile3Z
foopackagezFoo package descriptionZcategr)�verbose�	processesr �package�affected_byZaffectsa;* foo
    Package:     foopackage
    Description: Foo package description
    Type:        Application
    State:       foo has been started by None some-time ago. PID - 2
                 foo has been started by None some-time ago. PID - 3

    Affected by:
        foopackage
            file1
            file2
)rrZmodified�description�category�filesr
�setZpackagesrrrrr�findrrr)rZinit_systemr@rAZa1rBrrrr�test_helper�s(

zTestViews.test_helperN)�__name__�
__module__�__qualname__rrr'r+r,r2r4r8r:r;r<rrHrrrrr!s!rc@seZdZdZZddd�ZdS)rNFcCs||_||_||_||_dS)N)r-�quiet�userr?)rr-rLrMr?rrr�__init__szArgsMock.__init__)FFFF)rIrJrKr-rLrNrrrrrsrc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)rcCs(d|_||_||_||_||_d|_dS)Nz	some-time)�parent�pidrE�_name�_create_timeZstr_started_ago)rrPr$�create_timerErrrrN"szProcessMock.__init__cCs|jS)N)rQ)rrrrr$*szProcessMock.namecCs|jS)N)rR)rrrrrS-szProcessMock.create_timecCsgS)Nr)rrrr�children0szProcessMock.childrencCsdS)Nr)rrrr�username3szProcessMock.usernameN)rIrJrKrNr$rSrTrUrrrrr!s
r)&Z
__future__rZ__meta__Ztracer.resources.pycomprZtracer.views.defaultrZtracer.views.helperrZtracer.resources.applicationsrr	Ztracer.resources.collectionsr
Ztracer.resources.packagerZtest_tracerrr
rZtracer.views.note_for_hidden�gettextZtranslation�tZugettext�_Z
unittest.mockrZmockZviews�defaultr#Znote_for_hiddenZunittestZTestCaser�objectrrrrr�<module>s2


w

Youez - 2016 - github.com/yon3zu
LinuXploit