NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/__pycache__/__init__.cpython-36.pyc
3

~�gf �@sjdZdZddlZddlZddlZddlmZddlmZdZ	dZ
eje
e	�dd	�ZeZ
Gd
d�d�ZdS)zu
This module houses the i18n setup and message function. The default is to use
gettext to internationalize messages.
z4.9.1�N)�ArgumentParser)�
SosListOptionz/usr/share/locale�soscCstjt|�S)N)�gettext�dgettext�gettext_app)�msg�r	�/usr/lib/python3.6/__init__.py�_defaultsrc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�SoSaRMain entrypoint for sos from the command line

    Upon intialization, this class loads the basic option parser which will
    include the options shared by support components/subcommands. This is also
    where all subcommands present in the local installation are discovered,
    loaded, and if a matching one is found, intialized.
    cCs&||_ddl}ddl}ddl}ddl}|jjdgf|jjddgf|j	j
gf|jjgfd�|_
y ddl}|jjdgf|j
d<Wnptk
r�}zTddl}dt|j�kr�|jjgf|j
d<n$d	t|j�kr�|jjgf|j
d<n�WYdd}~XnXd
}xT|j
j�D]F\}}|d}|jd|�dj|�}|dj}	|d
|d�|	�d�7}q�Wd}
|
|}
d}t|
|d�|_|jjddt�|jj dddd�|_!d|j!_"xv|j
j�D]h\}}|j!j#||dd|��d�}
d|�d�|
_$|
jddt�|j%|
�|dj&|
d�|
j'|d��q�W|jj(|j�|_)|j*�dS)NrZrep�cleaner�mask)�reportZclean�help�upload�	collectorZcollectz
sos.collectorZpexpect��z, �	z<30�
z6%(prog)s <component> [options]

Available components:
z1See `sos <component> --help` for more information)�usage�epilog�action�extend�	componentzsos component to run)�dest�metavarrTzsos )�aliases�progz
 [options])�parser)r)+�cmdlineZ
sos.reportZsos.cleanerZsos.helpZ
sos.uploadrZ	SoSReportr
Z
SoSCleanerrZ	SoSHelperrZ	SoSUpload�_componentsZ
sos.collectorrZSoSCollector�ModuleNotFoundErrorZsos.missing�strrZmissingZMissingCollectZMissingPexpect�items�insert�join�descrr �registerrZadd_subparsersZ
subparsersZrequiredZ
add_parserr�_add_common_optionsZadd_parser_optionsZset_defaults�
parse_args�args�_init_component)�selfr,r�errZ_com_stringZcom�valuer�_comr(Zusage_stringr�compZ_com_subparserr	r	r
�__init__/sb




zSoS.__init__c	Cs|jd�}|jddddd�|jdtdd	d
dd�|jd
dddd�|jddddddd�|jddddddd�|jdddddd�|jdddd d!td"d#�|jd$d%d&d'd(d)d�|jd*d+d,d-d.d/gd0d1�|j�}|jd2ddd3d�|jd4d5d6�|jd7d8d6�dS)9z@Adds the options shared across components to the parser
        zGlobal Optionsz--batchF�
store_truezDo not prompt interactively)�defaultrrz
--config-fileZstoreZconfig_filez/etc/sos/sos.confz$specify alternate configuration file)�typerrr5rz--debug�debugz6enable interactive debugging using the python debugger)rrrz-qz--quiet�quietzonly print fatal errors)rrr5rz-sz	--sysrootZsysrootNz!system rootdir path (default='/')z	--tmp-dirZtmp_dirz%specify alternate temporary directoryz-tz	--threadsZthreads�zNumber of threads to use)rrr5r6rz-vz	--verbose�count�	verbosityrzincrease verbosityz-zz--compression-typeZcompression_type�autoZgzipZxzzcompression technology to use)r�choicesrz	--encryptz_Encrypt the archive, either prompting for a password/key or referencing an environment variablez
--encrypt-keyz(Encrypt the archive using a GPG key-pair)rz--encrypt-passz$Encrypt the archive using a password)Zadd_argument_group�add_argumentr$�intZadd_mutually_exclusive_group)r.r Z
global_grpZencrypt_grpr	r	r
r*xsH








zSoS._add_common_optionscCs�|jj}||jkr"td|�d��yB|j|d}|jrNtj�dkrNtd��||j|j|j	�|_
WnLtk
r�}z0td|�d|���|jjr�|�tj
d�WYdd}~XnXdS)	znDetermine which component has been requested by the user, and then
        initialize that component.
        zUnknown subcommand 'z' specifiedrz*Component must be run with root privilegeszCould not initialize 'z': rN)r,rr"�printZ
root_required�os�getuid�	Exceptionr r!�
_componentr7�sys�exit)r.r1Z_to_loadr/r	r	r
r-�s
zSoS._init_componentcCs|jj�dS)N)rD�execute)r.r	r	r
rG�szSoS.executeN)�__name__�
__module__�__qualname__�__doc__r3r*r-rGr	r	r	r
r&s
I/r)rK�__version__rArEr�argparserZsos.optionsrZgettext_dirr�bindtextdomainrZ_sosrr	r	r	r
�<module>s

NineSec Team - 2022