NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/__pycache__/reporting.cpython-36.opt-1.pyc
3

~�g5�@s�dZyddlZWnek
r,ddlZYnXGdd�d�ZGdd�de�ZGdd�de�Zd	d
�ZGdd�de�ZGd
d�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
dd�ZGdd�d�ZGdd�de�ZGdd�de�ZdS)zS This provides a restricted tag language to define the sos report
    index/report
�Nc@s eZdZiZdd�Zdd�ZdS)�NodecCstj|j�S)N)�json�dumps�data)�self�r�/usr/lib/python3.6/reporting.py�__str__szNode.__str__cCsdS)NFr)r�noderrr�can_addszNode.can_addN)�__name__�
__module__�__qualname__rr	rrrrrrsrc@seZdZdZdS)�Leafz0Marker class that can be added to a Section nodeN)rr
r�__doc__rrrrr"src@s(eZdZdZdd�Zdd�Zdd�ZdS)	�Reportz?The root element of a report. This is a container for sections.cCs
i|_dS)N)r)rrrr�__init__)szReport.__init__cCs
t|t�S)N)�
isinstance�Section)rr
rrrr,szReport.can_addcGs*x$|D]}|j|�r|j|j|j<qWdS)N)rr�name)r�nodesr
rrr�add/s

z
Report.addN)rr
rrrrrrrrrr&srcCst|t�r|S|jdd�S)z3returns a string text for a given unicode/str input�utf8�ignore)r�str�decode)�srrr�_decode5src@s(eZdZdZdd�Zdd�Zdd�ZdS)	rzeA section is a container for leaf elements. Sections may be nested
    inside of Report objects only.cCst|�|_i|_dS)N)rrr)rrrrrr>s
zSection.__init__cCs
t|t�S)N)rr)rr
rrrrBszSection.can_addcGs4x.|D]&}|j|�r|jj|jg�j|j�qWdS)N)rr�
setdefault�ADDS_TO�append)rrr
rrrrEs

zSection.addN)rr
rrrrrrrrrr:src@seZdZdZdd�ZdS)�CommandZcommandscCst|�|t|�d�|_dS)N)r�return_code�href)rr)rrr"r#rrrrOszCommand.__init__N)rr
rrrrrrrr!Ksr!c@seZdZdZdd�ZdS)�
CopiedFileZcopied_filescCst|�t|�d�|_dS)N)rr#)rr)rrr#rrrrYszCopiedFile.__init__N)rr
rrrrrrrr$Usr$c@seZdZdZdd�ZdS)�CreatedFileZ
created_filescCst|�t|�d�|_dS)N)rr#)rr)rrr#rrrrbszCreatedFile.__init__N)rr
rrrrrrrr%^sr%c@seZdZdZdd�ZdS)�AlertZalertscCst|�|_dS)N)rr)r�contentrrrrkszAlert.__init__N)rr
rrrrrrrr&gsr&c@seZdZdZdd�ZdS)�NoteZnotescCst|�|_dS)N)rr)rr'rrrrssz
Note.__init__N)rr
rrrrrrrr(osr(cCs
|jd�S)a Return True if 'string' ends with a backslash, and False otherwise.

        Define this as a named function for no other reason than that pep8
        now forbids binding of a lambda expression to a name:

        'E731 do not assign a lambda expression, use a def'
    �\)�endswith)�stringrrr�ends_bswsr,c@s�eZdZdZdZdZdZdZdZdZ	dZ
dZd	ZdZ
d
ZddZeed
dfeeddfeeddfeeddfeeddffZgZdd�Zdd�Zdd�ZdS)�PlainTextReportz@Will generate a plain text report from a top_level Report object�z  * %(name)sz  ! %sz  * %szLoaded Plugins:z  {name}�
�z{name}�=�Hz-  commands executed:z-  files copied:z-  files created:z
-  alerts:z	-  notes:cCsttj|j��|_dS)N)�sorted�dict�itemsr�report_data)rZreport_noderrrr�szPlainTextReport.__init__c
Cs,g|_}t|j�dkr$|j|j�|j|j�d}d}t|j�}xH|jD]>\}}|d|��7}|d7}||jdkrJ||krJ||j7}qJW||j7}|j|�xV|jD]L\}}|j|j	�|j|��x*|j
D] \}}	}
}|j||j|
|	|�q�Wq�Wt|j
�dk�r|j|j
�djtdd�|��}|S)Nrr.z  �r/cSst|t�r|S|jdd�S)Nrr)rrr)�irrr�<lambda>�sz)PlainTextReport.unicode.<locals>.<lambda>)�line_buf�len�HEADERr �PLUGLISTHEADERr6�PLUGLISTMAXITEMS�PLUGLISTSEP�PLUGLISTFOOTER�PLUGDIVIDER�subsections�process_subsectionr�FOOTER�join�map)
rr:�liner8Z	plugcountZsection_name�_Zsection_contentsZtype_�format_�header�footer�outputrrr�unicode�s2




zPlainTextReport.unicodecCs`||kr\|jj|�x.t|j|�dd�d�D]}|jj||�q,Wt|�dkr\|jj|�dS)NcSst|t�r|dSdS)Nrr.)rr4)�xrrrr9�sz4PlainTextReport.process_subsection.<locals>.<lambda>)�keyr)r:r r3�getr;)rZsectionrOrJrIrK�itemrrrrC�sz"PlainTextReport.process_subsectionN)rr
rrr<rD�LEAF�ALERT�NOTEr=�PLUGLISTITEMr?r>r@�PLUGINFORMATrAr!r$r%r&r(rBr:rrMrCrrrrr-�s,



"r-c@sveZdZdZdZdZdZdZdZdZ	dZ
dZd	Zd
Z
dZdZeed
dfeeddfeeddfeeddfeeddffZdS)�
HTMLReportz:Will generate a HTML report from a top_level Report objecta�<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head>
            <meta http-equiv="Content-Type" content="text/html;
                  charset=utf-8" />
            <title>Sos System Report</title>
            <style type="text/css">
                td {
                    padding: 0 5px;
                   }
            </style>
        </head>
        <body>
z</body></html>z(<li><a href="%(href)s">%(name)s</a></li>z<li>%s</li>z#<h3>Loaded Plugins:</h3><table><tr>z&<td><a href="#{name}">{name}</a></td>
z
</tr>
<tr>r0z
</tr></table>z+<h2 id="{name}">Plugin <em>{name}</em></h2>z<hr/>
z<p>Commands executed:</p><ul>z</ul>z<p>Files copied:</p><ul>z<p>Files created:</p><ul>z<p>Alerts:</p><ul>z<p>Notes:</p><ul>N)rr
rrr<rDrRrSrTr=rUr?r>r@rVrAr!r$r%r&r(rBrrrrrW�s$



rWc@seZdZdZdd�ZdS)�
JSONReportz:Will generate a JSON report from a top_level Report objectcCstj|jddd�}|S)N�F)�indentZensure_ascii)rrr6)rrLrrrrM�szJSONReport.unicodeN)rr
rrrMrrrrrX�srX)rr�ImportErrorZ
simplejsonrrrrrr!r$r%r&r(r,r-rWrXrrrr�<module>s$
		K&

NineSec Team - 2022