HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/python.cpython-36.pyc
3

3��d�@szddlmZmZmZmZmZddlmZddlZddl	Z	ddl
Z
Gdd�de�ZGdd�deee�ZGdd	�d	ee�Z
dS)
�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOpt)�
RHELPolicyNc@s,eZdZdZdZdZd	Zd
ZdZdd�Z	dS)�PythonznCaptures information on the installed python runtime(s), as well as
    python modules installed via pip.
    zPython runtime�python�systemz	python -VcCsV|j|jdd�|jd�}|ddkrRx*|dj�dd�D]}|jd|�q<WdS)	Nzpython-version)Zsuggest_filenamezwhereis pip -bZstatusr�output�z%s list installed)�add_cmd_output�python_versionZexec_cmd�split)�selfZpipsZpip�r�/usr/lib/python3.6/python.py�setup!s
zPython.setupN)r
)r	)
�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofiles�packagesrrrrrrrsrc@seZdZdZdZdS)�UbuntuPythonz
python3 -V�python3N)r)rrrrrrrrrr.srcsDeZdZdZdZeddd	d
�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�platform-python�hashesFz#collect hashes for all python files)�defaultZdesccs@|jddg�t|jt�r.|jj�dkr.d|_tt|�j�dS)Nz
python2 -Vz
python3 -V�z/usr/libexec/platform-python -V)	r
�
isinstanceZpolicyrZdist_versionr�superrr)r)�	__class__rrrAs
zRedHatPython.setupcCs<|jd�r8|jd��}|jtj|j�dd��WdQRXdS)Nrzdigests.json�)�indent)Z
get_optionZcollection_file�write�json�dumps�
get_hashes)rZhfilerrr�collectHs
zRedHatPython.collectcCs�dgi}ddddg}x�|D]�}x�tj|j|��D]�\}}}x�|D]�}|jd�sPq@|j||�}yft|d��R}	tj�}
|	jd�}x|r�|
j|�|	jd�}q~W|
j	�}
|dj
||
d	��WdQRXWq@tk
r�|jd
|�Yq@Xq@Wq0WqW|S)N�digestsz/usr/libz
/usr/lib64z/usr/local/libz/usr/local/lib64z.py�rbi)�filepath�sha256z Unable to read python file at %s)
�os�walkZ	path_join�endswith�open�hashlibr/�read�updateZ	hexdigest�append�IOErrorZ
_log_error)rr,Zpy_pathsZpy_path�root�_�filesZ_filer.�fZdigest�datarrrr*Ms4




zRedHatPython.get_hashes)r	rrrr)rrrrrrZoption_listrr+r*�
__classcell__rr)r$rr4s
r)Zsos.report.pluginsrrrrrZsos.policies.distros.redhatrr0r(r4rrrrrrr�<module>s