LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /lib/frr/__pycache__/
File Upload :
Command :
Current File : //lib/frr/__pycache__/generate_support_bundle.cpython-39.pyc

a

>�sgN�@sJddlZddlZddlZddlZddlZdd�Zdd�ZedkrFe�dS)�NcCs6tj�|�r,td|�tjd�|�dd�t|d�S)NzMaking backup of zmv {0} {0}.prevT)�shell�w)�os�path�exists�print�
subprocessZ
check_call�format�open)r�r�'/usr/lib/frr/generate_support_bundle.py�open_with_backupsr
c
Cs�t��}|jddddd�|jdddd	d�|��}d
}i}d}d}z�t|j�D]�}|��}t|�dksP|ddkrvqP|�d
�}|ddkr�|d}t	�
d�}d
}qP|ddkr�d}qP|ddkr�d
}|��t|j�||<|�
�qP|r�|�|d�qPtd|���qPWn<t�yJ}z"t�d|jt|��WYd}~dSd}~00g}	|D]D}tj�|j|d�}
tjgd�||t|
�tjd�}|	�|��qT|	D]}|���q�dS)Nz-cz--configz%/etc/frr/support_bundle_commands.confzinput config)�default�helpz-lz	--log-dirz/var/log/frrzdirectory for logfilesFr�#�:Z	PROC_NAME�zw+ZCMD_LIST_STARTTZCMD_LIST_END�
zIgnoring unexpected input zCannot read config file: %s: %sz_support_bundle.log)z/usr/bin/envZvtyshz-t)�stdin�stdout�stderr)�argparse�ArgumentParser�add_argument�
parse_argsr
Zconfig�rstrip�len�split�tempfileZNamedTemporaryFile�flush�name�close�writer�IOError�loggingZfatal�strrr�joinZlog_dirr�Popenr
ZSTDOUT�append�wait)�parser�argsZ
collectingZ	proc_cmds�procZtemp�lineZcmd_line�errorZprocsZofn�prrr�main%sd��


�r0�__main__)rr$rrrr
r0�__name__rrrr�<module>s=

LittleDemon - FACEBOOK
[ KELUAR ]