404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.119.163.163: ~ $
3

�f� �@s�dZdZddlZddlZddlmZddlmZddlZdZ	dZ
eje
e	�dd	�ZeZ
yeWnek
rxeZYnXGd
d�d�ZdS)zu
This module houses the i18n setup and message function. The default is to use
gettext to internationalize messages.
z4.7.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.
    c
Cs||_ddl}ddl}ddl}|jjdgf|jjddgf|jj	gfd�|_
y ddl}|jj
dgf|j
d<Wnhtk
r�}zLddl}d|jkr�|jjgf|j
d<n d	|jkr�|jjgf|j
d<n�WYdd}~XnXd
}xX|j
D]N}|j
|d}|jd|�dj|�}|j
|dj}|d
|d�|�d�7}q�Wd}	|	|}	d}
t|	|
d�|_|jjddt�|jjdddd�|_d|j_xt|j
D]j}|jj||j
|dd|d�}d||_|jddt�|j |�|j
|dj!|d�|j"|d��q�W|jj#|j�|_$|j%�dS)NrZrep�cleaner�mask)�reportZclean�help�	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 %s)�aliases�progzsos %s [options])�parser)r)&�cmdlineZ
sos.reportZsos.cleanerZsos.helprZ	SoSReportr
Z
SoSCleanerrZ	SoSHelper�_componentsZ
sos.collectorrZSoSCollector�ModuleNotFoundErrorZsos.missingrZmissingZMissingCollectZMissingPexpect�insert�join�descrr�registerrZadd_subparsersZ
subparsersZrequiredZ
add_parserr�_add_common_optionsZadd_parser_optionsZset_defaults�
parse_args�args�_init_component)
�selfr)r�errZ_com_stringZcomr�_comr%Zusage_stringr�compZ_com_subparserr	r	r
�__init__5s^





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)�typerrr1rz--debug�debugz6enable interactive debugging using the python debugger)rrrz-qz--quiet�quietzonly print fatal errors)rrr1rz-sz	--sysrootZsysrootNz!system rootdir path (default='/')z	--tmp-dirZtmp_dirz%specify alternate temporary directoryz-tz	--threadsZthreads�zNumber of threads to use)rrr1r2rz-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_argument�str�intZadd_mutually_exclusive_group)r+rZ
global_grpZencrypt_grpr	r	r
r'|sH








zSoS._add_common_optionscCs�|jj}||jj�kr"td|�yB|j|d}|jrNtj�dkrNtd��||j	|j|j
�|_WnHtk
r�}z,td||f�|jjr�|�t
jd�WYdd}~XnXdS)znDetermine which component has been requested by the user, and then
        initialize that component.
        z!Unknown subcommand '%s' specifiedrz*Component must be run with root privilegeszCould not initialize '%s': %srN)r)rr!�keys�printZ
root_required�os�getuid�	Exceptionrr �
_componentr3�sys�exit)r+r-Z_to_loadr,r	r	r
r*�szSoS._init_componentcCs|jj�dS)N)rB�execute)r+r	r	r
rE�szSoS.executeN)�__name__�
__module__�__qualname__�__doc__r/r'r*rEr	r	r	r
r,s
G/r)rI�__version__r?rC�argparserZsos.optionsrrZgettext_dirr�bindtextdomainrZ_sosr"�	NameError�ImportErrorrr	r	r	r
�<module>s 


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 5.04 KB 0644
__init__.cpython-36.pyc File 5.04 KB 0644
archive.cpython-36.opt-1.pyc File 22.42 KB 0644
archive.cpython-36.pyc File 22.42 KB 0644
component.cpython-36.opt-1.pyc File 14.84 KB 0644
component.cpython-36.pyc File 14.84 KB 0644
missing.cpython-36.opt-1.pyc File 2.68 KB 0644
missing.cpython-36.pyc File 2.68 KB 0644
options.cpython-36.opt-1.pyc File 11.79 KB 0644
options.cpython-36.pyc File 11.79 KB 0644
utilities.cpython-36.opt-1.pyc File 18.3 KB 0644
utilities.cpython-36.pyc File 18.3 KB 0644