404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@13.58.169.1: ~ $
3

\�me|&�
@sddlZddlZddlZddlmZmZmZddlmZm	Z	m
Z
eje�Z
dZdZdZdZeegZdgZd	Zd
Zddd
dddddddddd�Zeeej��dd�d�ZGdd�dejd�Zdd�Zdd �Zd!d"�Zd#d$�Z d%d&�Z!d'd(�Z"d)d*�Z#d+d,�Z$e
fd-d.�Z%d1d/d0�Z&dS)2�N)�importer�
type_utils�util)�FREQUENCIES�
PER_ALWAYS�PER_INSTANCEztext/x-not-multipartzapplication/octet-streamZ__end__Z	__begin__ztext/part-handlerzpart-handler-%03dz	part-%03dztext/x-include-urlztext/x-include-once-urlztext/x-shellscriptztext/cloud-configztext/cloud-boothookztext/cloud-config-archiveztext/cloud-config-jsonpztext/jinja2ztext/x-shellscript-per-bootztext/x-shellscript-per-instanceztext/x-shellscript-per-once)z#includez
#include-oncez#!z
#cloud-configz
#part-handlerz#cloud-boothookz#cloud-config-archivez#cloud-config-jsonpz## template: jinjaztext/x-shellscript-per-bootztext/x-shellscript-per-instanceztext/x-shellscript-per-oncecCsdt|�S)Nr)�len)�e�r
�/usr/lib/python3.6/__init__.py�<lambda>>sr)�keyc@s4eZdZddd�Zdd�Zdd�Zejdd	��Zd
S)�Handler�cCs||_||_dS)N)�handler_version�	frequency)�selfr�versionr
r
r�__init__CszHandler.__init__cCsdtj|�|j�fS)Nz%s: [%s])rZobj_name�
list_types)rr
r
r�__repr__GszHandler.__repr__cCs,t|d�std��ndd�t|d�D�SdS)N�prefixesz#Missing prefixes subclass attributecSsg|]}t|�qSr
)�INCLUSION_TYPES_MAP)�.0�prefixr
r
r�
<listcomp>Psz&Handler.list_types.<locals>.<listcomp>)�hasattr�NotImplementedError�getattr)rr
r
rrJs

zHandler.list_typescOs
t��dS)N)r)r�args�kwargsr
r
r�handle_partTszHandler.handle_partN)r)	�__name__�
__module__�__qualname__rrr�abc�abstractmethodr!r
r
r
rrBs

r)�	metaclassc	Cs|j}|tkp|tko|tks"dSy|j}t|�}Wntttfk
rRd}YnX|d}yxtj	d|||||�|dkr�|j
||||||�nB|dkr�|j
|||||�n&|dkr�|j
||||�ntd|��Wn,tk
�rtj
td|||||�YnXdS)N�zContent-Typez1Calling handler %s (%s, %s, %s) with frequency %s�rzUnknown module version %sz8Failed calling handler %s (%s, %s, %s) with frequency %s)rrrr�int�	TypeError�
ValueError�AttributeError�LOG�debugr!�	Exceptionr�logexc)	�mod�data�filename�payloadr�headersZmod_freqZmod_ver�content_typer
r
r�run_partYsF
r8cCsdti}t||dd||�dS)NzContent-Type)�
CONTENT_STARTr8)r2r3rr6r
r
r�
call_begin�sr:cCsdti}t||dd||�dS)NzContent-Type)�CONTENT_ENDr8)r2r3rr6r
r
r�call_end�sr<c
Cs�|d}t|}|d}tjj|dd|�}|jd�s@d|}tj||d�|d}y<ttj	|��}	t
|	|d	|�|j|	d
d�|d|d<Wn$tk
r�tj
td
||�YnXdS)NZhandlercountrZ
handlerdirz%sz.pyz%s.pyi��handlersr3T)Zinitializedr(z7Failed at registering python file: %s (part handler %s))�PART_HANDLER_FN_TMPL�os�path�join�endswithrZ
write_file�
fixup_handlerr�
import_moduler:�registerr0r1r.)
ZpdataZ_ctypeZ	_filenamer5Zcurcount�modnamerZmodfnamer=r2r
r
r�walker_handle_handler�s&
rGcCs�y\t|t�r|jdd�d}n$|dd|�jdd�jdd�d}t|�|krZ|d|�}Wn tk
r||d|�}YnX|S)N�
r(r��ignore)�errors)�
isinstance�str�split�decoder�UnicodeDecodeError)Zblob�size�startr
r
r�_extract_first_or_bytes�s
$rScCsZy
|jd�Sttfk
rBy
|jd�Stk
r<YnXYntk
rTYnX|S)NZ
string_escapeZunicode_escape)�encode�LookupErrorr+r-)�textr
r
r�_escape_string�s


rWcCs�|d}||jd�kr&tjd|�dS|tkr@t||||�dS|d}||krpt|||d|||d|�nN|r�t|d�}dt|�}|tkr�tj	d	||�q�tj	d
||�ntjd|�dS)NzContent-TypeZexcludedzcontent_type "%s" is excludedr=r3r�z'%s...'z)Unhandled non-multipart (%s) userdata: %sz0Unhandled unknown content-type (%s) userdata: %szEmpty payload of type %s)
�getr.r/�PART_CONTENT_TYPESrGr8rSrW�NOT_MULTIPART_TYPE�warning)r3r4r5r6r7r=rRZdetailsr
r
r�walker_callback�s:
r]c	Cs�d}x�|j�D]t}|j�dkr q|j�}|dkr4t}|j�}|sHt|}t|�}tj|�||d<t	j
|�}|||||�|d}qWdS)NrZ	multipartzContent-Typer()�walkZget_content_maintypeZget_content_type�
OCTET_TYPE�get_filename�PART_FN_TPL�dictr.r/rZfully_decoded_payload)	�msg�callbackr3Zpartnum�partZctyper4r6r5r
r
rr^s 

r^cCsRt|d�st|dd�t|d�s.t|d|�n |j}|rN|tkrNtjd||�|S)Nrr(rz&Handler %s has an unknown frequency %s)r�setattrrrr.r\)r2Zdef_freqZfreqr
r
rrCs

rCcCsTytj|�j�}Wntk
r&|SX|j�}xtD]}|j|�r6t|Sq6W|S)N)rZ
decode_binary�lowerrP�lstrip�INCLUSION_SRCH�
startswithr)r5�defaultZ
payload_lcrVr
r
r�type_from_starts_with#s

rl)N)'r%Zloggingr?Z	cloudinitrrrZcloudinit.settingsrrrZ	getLoggerr"r.r[r_r;r9ZCONTENT_SIGNALSrZr>rar�sorted�list�keysri�ABCMetarr8r:r<rGrSrWr]r^rCrlr
r
r
r�<module>sL
0)

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 6.43 KB 0644
__init__.cpython-36.pyc File 6.43 KB 0644
boot_hook.cpython-36.opt-1.pyc File 1.74 KB 0644
boot_hook.cpython-36.pyc File 1.74 KB 0644
cloud_config.cpython-36.opt-1.pyc File 3.73 KB 0644
cloud_config.cpython-36.pyc File 3.73 KB 0644
jinja_template.cpython-36.opt-1.pyc File 6.19 KB 0644
jinja_template.cpython-36.pyc File 6.19 KB 0644
shell_script.cpython-36.opt-1.pyc File 1.03 KB 0644
shell_script.cpython-36.pyc File 1.03 KB 0644
shell_script_by_frequency.cpython-36.opt-1.pyc File 2.13 KB 0644
shell_script_by_frequency.cpython-36.pyc File 2.13 KB 0644