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__/python.cpython-310.pyc
o

i��d�@szddlmZmZmZmZmZddlmZddlZddl	Z	ddl
Z
Gdd�de�ZGdd�deee�ZGdd	�d	ee�Z
dS)
�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOpt)�
RHELPolicyNc@s,eZdZdZdZdZdZdZdZdd�Z	d	S)
�PythonznCaptures information on the installed python runtime(s), as well as
    python modules installed via pip.
    zPython runtime�python)�system)r	z	python -VcCsV|j|jdd�|�d�}|ddkr'|d��dd�D]}|�d|�qdSdS)	Nzpython-version)�suggest_filenamezwhereis pip -b�statusr�output�z%s list installed)�add_cmd_output�python_version�exec_cmd�split)�self�pips�pip�r�;/usr/lib/python3/dist-packages/sos/report/plugins/python.py�setup!s�
�zPython.setupN)
�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profiles�packagesrrrrrrrsrc@seZdZdZdZdS)�UbuntuPython�
python3 -V)�python3N)rrrrr rrrrr!.sr!csDeZdZdZdZedddd�gZ�fdd�Zd	d
�Zdd�Z	�Z
S)
�RedHatPythona In addition to the base information, on Red Hat family distributions the
    python plugin also supports the 'hashes' option. If enabled, this plugin
    will generate a json-formatted listing of all pyfiles within the
    distribution-standard python package installation locations.
    )r	�python36�python2r#zplatform-python�hashesFz#collect hashes for all python files)�default�desccs@|�ddg�t|jt�r|j��dkrd|_tt|���dS)Nz
python2 -Vr"�z/usr/libexec/platform-python -V)	r�
isinstance�policyr�dist_versionr�superr$r)r��	__class__rrrAs
zRedHatPython.setupcCsV|�d�r)|�d��}|�tj|��dd��Wd�dS1s"wYdSdS)Nr'zdigests.json�)�indent)�
get_option�collection_file�write�json�dumps�
get_hashes)r�hfilerrr�collectHs

"��zRedHatPython.collectcCs�dgi}gd�}|D]m}t�|�|��D]b\}}}|D]Z}|�d�s#q|�||�}z<t|d��-}	t��}
|	�d�}|rG|
�|�|	�d�}|s;|
�	�}
|d�
||
d��Wd�n1s_wYWqtyu|�d|�Yqwqq
|S)N�digests)z/usr/libz
/usr/lib64z/usr/local/libz/usr/local/lib64z.py�rbi)�filepath�sha256z Unable to read python file at %s)
�os�walk�	path_join�endswith�open�hashlibr>�read�update�	hexdigest�append�IOError�
_log_error)rr;�py_paths�py_path�root�_�files�_filer=�f�digest�datarrrr8Ms@�



�
���
����zRedHatPython.get_hashes)rrrrr r�option_listrr:r8�
__classcell__rrr/rr$4s��r$)�sos.report.pluginsrrrrr�sos.policies.distros.redhatrr?r6rDrr!r$rrrr�<module>s


Spamworldpro Mini