Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/ |
Upload File : |
o ���bT � @ s, d dl mZ d dlmZ G dd� de�ZdS )� )�SoSCleanerParser)�SoSUsernameMapc sF e Zd ZdZdZdZg Zg d�Zd� fdd� Zdd � Z d d� Z � ZS ) �SoSUsernameParsera� Parser for obfuscating usernames within an sosreport archive. Note that this parser does not rely on regex matching directly, like most other parsers do. Instead, usernames are discovered via scraping the collected output of lastlog. As such, we do not discover new usernames later on, and only usernames present in lastlog output will be obfuscated, and those passed via the --usernames option if one is provided. zUsername Parser�username_map) �core�nobody� nfsnobody�shutdown�stack�reboot�root�ubuntu�username�wtmpNc s( t � | _tt| ��|� | j�|� d S �N)r �mapping�superr �__init__�load_names_from_options)�self�config� opt_names�� __class__� �E/usr/lib/python3/dist-packages/sos/cleaner/parsers/username_parser.pyr ) s zSoSUsernameParser.__init__c C sp t � }|�� D ]#}z|�� d }W n ty Y qw |r$|�� | jv r%q|�|� q|D ]}| j�|� q-dS )z�Since we don't get the list of usernames from a straight regex for this parser, we need to override the initial parser prepping here. r N) �set� splitlines�split� Exception�lower� skip_list�addr �get)r �content�users�line�user�eachr r r �load_usernames_into_map. s ��z)SoSUsernameParser.load_usernames_into_mapc C s |dfS )Nr r )r r&