AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

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

���b��@sBddlmZmZddlZddlZddlmZGdd�dee�ZdS)�)�Plugin�RedHatPluginN)�Pathc@seZdZdZdZdd�ZdS)�
UnpackagedzDCollects a list of files that are not handled by the package manager�
unpackagedcs�dd�}d�fdd�	}�fdd�}�jdd�sdS|��g}t�fd	d
��j��jj���D����D]}|||�7}q3�fdd�|D�}||�}�jd
�|�ddd�dS)NcSstjd�d�S)z3Return a list of directories in $PATH.
            �PATH�:)�os�environ�split�rr�?/usr/lib/python3/dist-packages/sos/report/plugins/unpackaged.py�get_env_path_listsz+Unpackaged.setup.<locals>.get_env_path_listc
s�g}tj|dd�D]Z\}}}|r"|D]��fdd�|D�|dd�<q|D],}��||�}zt�t�|�j�r<t|���}Wn	t	yFYq$w|�
tj�|��q$|D]}|�
tj���||���qSq	|S)z�Return a list of all files present on the system, excluding
                any directories listed in `exclude`.

            :param path: the starting path
            :param exclude: list of paths to exclude
            T)�topdownc�g|]}|�vr|�qSrr)�.0�d��err
�
<listcomp>)�z>Unpackaged.setup.<locals>.all_files_system.<locals>.<listcomp>N)
r	�walk�	path_join�stat�S_ISLNK�lstat�st_moder�resolve�	Exception�append�path�realpath)r �exclude�	file_list�root�dirs�files�name��selfrr
�all_files_systems*��

��z*Unpackaged.setup.<locals>.all_files_systemc	sJg}|D]}��|�}��|�r|�d�|t�|���q|�|�q|S)z4Format the unpackaged list as a string.
            z{} -> {})r�path_islinkr�formatr	�readlink)r&�expanded�f�fpr(rr
�
format_output8s

z'Unpackaged.setup.<locals>.format_outputT)�cmdc3s2�|]�t�fdd��D��rtj���VqdS)csg|]}��|��qSr)�
startswith)r�p��xrr
rMsz.Unpackaged.setup.<locals>.<genexpr>.<listcomp>N)�anyr	r r!)r)�pathsr5r
�	<genexpr>Js��

�z#Unpackaged.setup.<locals>.<genexpr>crrr)rr6)�all_frpmrr
rRrz$Unpackaged.setup.<locals>.<listcomp>�
r)�plug_dir)N)�test_predicate�set�policy�mangle_package_path�package_manager�	all_files�add_string_as_file�join)r)rr*r1�all_fsystemr�not_packaged�not_packaged_expandedr)r:r8r)r
�setups&

��
�zUnpackaged.setupN)�__name__�
__module__�__qualname__�
short_desc�plugin_namerHrrrr
rsr)�sos.report.pluginsrrr	r�pathlibrrrrrr
�<module>s


Anon7 - 2022
AnonSec Team