404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.73.134: ~ $
3

\�me�	@s�ddlZddlZddlmZddlmZmZmZddddddd	d
d�ZdZd
Z	dZ
dd�Zdd�Zdd�Z
ddd�Zdd�Zedkr�ee��dS)�N)�datetime)�
atomic_helper�subp�utilzfinished running cloud-initz%starting search for local datasourcesz!searching for network datasourceszrunning config moduleszfinalizing moduleszrunning modules forzrunning single module )Zfinishedz
init-localzinit-network�initzmodules-configz
modules-final�modulesZsinglez%Y-%m-%d %H:%M:%S,%fz%b %d %H:%M:%S.%f %Yz%b %d %H:%M:%S %YcCs�dd�tdd�D�}|j�d|kr^t}d|kr4t}tj|dttj�j�|�}|j	d�}n(d	|kr~tj|t
�}|j	d�}nt|�}t|�S)
NcSsg|]}tj|�qS�)�calendarZ
month_abbr)�.0�mrr�/usr/lib/python3.6/dump.py�
<listcomp> sz#parse_timestamp.<locals>.<listcomp>��
r�.� z%s.%f�,)
�range�split�DEFAULT_FMT�CLOUD_INIT_JOURNALCTL_FMTrZstrptime�strZnowZyearZstrftime�CLOUD_INIT_ASCTIME_FMT�parse_timestamp_from_date�float)�timestampstrZmonthsZFMTZdt�	timestamprrr�parse_timestampsrcCsRd}tj�s,tjd�rd}ntd|�d���tj|dd|g�\}}|j�}t|�S)NZdateZgdatez-Unable to parse timestamp without GNU date: [�]z+%s.%3Nz-d)rZis_LinuxrZwhich�
ValueError�stripr)r�cmd�out�_rrrrr6s
rcCs�d}dd|g}d}x|D]}||krd}PqW|s6dS|j|�\}}|jd�rddj|j�dd��}d
|kr�|jd
�\}}|d|j�d7}d|kr�|j�d}	n@|j�d}	||kr�|j�}|jd	d�d	}n|j|	�dj�}d
|k�rNd}
d|k�r@|jd�d	j�}|jd�\}}
|jdd�jdd�}|dk�rDd}ndSt|}n(|j�dd�\}}
}|j|�d	j�}|jd�|t|�d|
jd�d�}|ddk�r�|jd�d}|j|�d	jd�j�}||d<|j�|d<|S) Nz cloud-init[z - z
 [CLOUDINIT] FT�:rrrrz,%s)�maxsplitz
Cloud-init v.�startZrunningz at �'��-rzinit-network��	cloudinit)�name�descriptionr�origin�
event_typer/Zfinish�resultr-���r1r1)	r�endswith�joinr �lstrip�replace�stage_to_description�rstripr)�lineZamazon_linux_2_sepZ
separators�found�sepZtimehostZeventstrrZextraZhostnamer/Zstage_and_timestampZ
event_namer#Zevent_descriptionZ_pymodloglvl�eventr0Zdescrrr�parse_ci_loglineDsZ






r<c
Cs�g}d}dddg}t||g�s&td��|r4|j�}n|j�}x^|D]V}xP|D]H}||krLyt|�}Wn tk
r�tjjd�YnX|rL|j|�qLWqBW||fS)Nzstart:zfinish:z
Cloud-init v.z2Either cisource or rawdata parameters are requiredzSkipping invalid entry
)	�anyr�
splitlines�	readlinesr<�sys�stderr�write�append)�cisourceZrawdataZeventsr;ZCI_EVENT_MATCHES�datar8�matchrrr�dump_events�s$



rGcCs2ttj�dkrttjd�}ntj}tjt|��S)Nr)�lenr@�argv�open�stdinrZ
json_dumpsrG)rDrrr�main�srL�__main__)NN)r	r@rr+rrrr6rrrrrr<rGrL�__name__�printrrrr�<module>s*V
	

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 7.19 KB 0644
__init__.cpython-36.pyc File 7.19 KB 0644
dump.cpython-36.opt-1.pyc File 3.52 KB 0644
dump.cpython-36.pyc File 3.52 KB 0644
show.cpython-36.opt-1.pyc File 8.5 KB 0644
show.cpython-36.pyc File 8.5 KB 0644