Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/ssh.cpython-310.pyc
o

i��d
�@s*ddlmZmZmZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�	PluginOptc@sBeZdZdZdZdZeddedd�gZdd	�Z	d
d�Z
dd
�ZdS)�SshzSecure shell service�ssh)�services�security�system�identity�	userconfsTz5Changes whether module will collect user .ssh configs)�default�val_type�desccCsF|�ddd��ddg}|�|�|�|�|�d�r!|��dSdS)N�sshd_config�
ssh_config)z/etc/ssh/sshd_config$z/etc/ssh/ssh_config$z/etc/ssh/ssh_configz/etc/ssh/sshd_configr)�
add_file_tags�
add_copy_spec�included_configs�
get_option�user_ssh_files_permissions)�self�sshcfgs�r�8/usr/lib/python3/dist-packages/sos/report/plugins/ssh.py�setups��


�z	Ssh.setupc	Cs�zN|D]H}|�d�d}t|�|�d��/}|D]$}t|���dks&|�d�r'q|���d�r;|��}|j|d|d�qWd�n1sFwYqWdStyXYdSw)	N�/����rr�#�include�)�tags)�split�open�	path_join�len�
startswith�lowerr�	Exception)rr�sshcfg�tag�cfgfile�line�confargrrrr0s$������zSsh.included_configsc	Cs�|�d�}|dr6zt|�d���}|��}Wd�n1s wYWnty5|�d�YdSw|d��}|D]%}z|�|�d�dd	�}|�|�rY|�	d
�
|��Wq>tycYq>wdS)z�
        Iterate over .ssh folders in user homes to see their permissions.

        Bad permissions can prevent SSH from allowing access to given user.
        z
getent passwd�statusz/etc/passwdNzCouldn't read /etc/passwd�output�:�z.sshz
ls -laZ {})�exec_cmdr#r$�	readlinesr(�
_log_error�
splitlinesr"�
path_isdir�add_cmd_output�format�
IndexError)r�
users_data�passwd_file�users_data_lines�usr_line�home_dirrrrrAs,

��
�
���zSsh.user_ssh_files_permissionsN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr�str�option_listrrrrrrrrs��rN)�sos.report.pluginsrrrrrrrr�<module>s


Spamworldpro Mini