| Server IP : 216.238.111.58 / Your IP : 216.73.217.34 Web Server : LiteSpeed System : Linux hosting.smartskills.com.br 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64 User : skillsitcom ( 1002) PHP Version : 8.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/sos/cleaner/preppers/__pycache__/ |
Upload File : |
3
ܓ�i� � @ s d dl mZ G dd� de�ZdS )� )�
SoSPrepperc @ s e Zd ZdZdZdd� ZdS )�HostnamePrepperaw
Prepper for providing domain and hostname information to the hostname
mapping.
The items from hostname sources are handled manually via the _get_items
method, rather than passing the file directly, as the parser does not know
what hostnames or domains to match on initially.
This will also populate the regex_items list with local short names.
�hostnamec C sF g }d}|j rd}n
|jrd}|j|�}|r�|dkr�|jd�}t|�dkrl|j|d � | jd j|d � t|�dkr�dj|dd � �}|j|j � � |j|j � � |jd
�}xr|j
� D ]f}|jd�s�d|kr�q�|j� dd � } x<| D ]4}
t|
jd��dk�r| jd j|
� q�|j|
� q�W q�W x| jj
D ]}|j|� �q.W |S )
Nr zsos_commands/host/hostname_-fz"data/insights_commands/hostname_-fZ localhost�.� r � � z etc/hosts�#���)Zis_sosZis_insightsZget_file_content�split�len�appendZregex_items�add�join�strip�
splitlines�
startswithZopts�domains)�self�archive�itemsZ_fileZcontentr Z
top_domainZ_hosts�lineZhostln�hostZdomain� r �/usr/lib/python3.6/hostname.py�_get_items_for_hostname s8
z'HostnamePrepper._get_items_for_hostnameN)�__name__�
__module__�__qualname__�__doc__�namer r r r r r s
r N)Zsos.cleaner.preppersr r r r r r �<module> s