403Webshell
Server IP : 77.50.203.18  /  Your IP : 192.168.0.10
Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23
System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64
User : warsnews.ru ( 1001)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/sos/report/plugins/__pycache__/logs.cpython-39.opt-1.pyc
a

ܓ�il�@shddlZddlZddlZddlmZmZmZmZGdd�de�ZGdd�dee�Z	Gdd�dee�Z
dS)	�N)�Plugin�	PluginOpt�IndependentPlugin�	CosPluginc@s(eZdZdZdZdZdd�Zdd�ZdS)	�LogsBasezSystem logs�logs��systemZhardwareZstoragecs>d}d|g}g}��|��r,t��|�ddd���}|��}tjd|tjtjBd�D]�}zP|d}|�d	�r�t	�
|��d
�d��}r�|t
�
|�7}n|t
�
|�7}WqRty�}	z��d|	���WYd}	~	qRd}	~	00qR|��D]$}
|
�d
�r�|t
�
|
��d
�7}q�Wd�n1�s"0Y|D]6}����|���sJ�q0��|�}|��d|�7}�q0|D]4}|�d��r�|d
d�}��|��rl��|��ql��gd����d��jdddd�t�fdd�dD��}
|
�r:��d��r:�jddgdd��jddd ��jd!d"d ���d#��r:��d$d%g�dS)&N�/etc/rsyslog.conf�/etc/syslog.conf�rzUTF-8)�encodingz-(include\((\s*)?file=([\"'`]([^'\"]*)[\"'`])))�pattern�string�flags�zecho �z $`zError parsing include(): z$IncludeConfigz^\S+\s+(-?\/.*$)\s+�-)z/var/log/auth.log*z/var/log/boot.logz/var/log/dist-upgradez/var/log/installerz/var/log/kern.log*z/var/log/messages*z/var/log/secure*z/var/log/syslog*z
/var/log/udevr
z/etc/rsyslog.drzjournalctl --disk-usagez/var/logT�s)�	recursiveZ
extra_optsc3s |]}����|d��VqdS)zlog/journal/N)�path_exists�	path_join)�.0�p��self��;/usr/lib/python3.9/site-packages/sos/report/plugins/logs.py�	<genexpr>Us�z!LogsBase.setup.<locals>.<genexpr>)z/varz/runzsystemd-journaldZjournal_fullZjournal_all�d)�tags�priority�thisZjournal_since_boot)Zbootr �lastZjournal_last_boot�all_logsz/var/log/journal/*z/run/log/journal/*)r�openr�read�re�findall�I�M�
startswith�os�getenv�split�strip�glob�	ExceptionZ
_log_debug�
splitlinesZdo_regex_find_allZpath_isfileZ
add_copy_spec�add_cmd_outputZadd_dir_listing�anyZ
is_service�add_journal�
get_option)rZrsyslogZconfsrZconfZcontent�matchZ_entZenvc�err�lineZconfig�iZjournalrrr�setupsb
�

(
8

�
��zLogsBase.setupcCs|�ddd�dS)Nz
/etc/rsyslog*z (ActionLibdbiPassword |pwd=)(.*)z\1[********])Zdo_path_regex_subrrrr�postprocbs
�zLogsBase.postprocN)�__name__�
__module__�__qualname__Z
short_desc�plugin_name�profilesr;r<rrrrrs
Lrc@seZdZdZdZdZdS)�IndependentLogsa�
    This plugin will collect logs traditionally considered to be "system" logs,
    meaning those such as /var/log/messages, rsyslog, and journals that are
    not limited to unit-specific entries.

    Note that the --since option will apply to journal collections by this
    plugin as well as the typical application to log files. Most users can
    expect typical journal collections to include the "full" journal, as well
    as journals limited to this boot and the previous boot.
    rrN)r=r>r?�__doc__r@rArrrrrBjsrBcs,eZdZedddd�gZ�fdd�Z�ZS)�CosLogs�log-daysrz"the number of days logs to collect)�name�defaultZdesccsDt���|�d�r |�d�n |�dd�}|jd|�d�d�dS)Nr$zjournalctl -o exportrErr�days)Zsince)�superr;r6r3r5)rrH��	__class__rrr;�s


z
CosLogs.setup)r=r>r?rZoption_listr;�
__classcell__rrrJrrDzs
��rD)r0r,r'Zsos.report.pluginsrrrrrrBrDrrrr�<module>	s[

Youez - 2016 - github.com/yon3zu
LinuXploit