AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/cloudinit/handlers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/cloudinit/handlers/__pycache__/__init__.cpython-310.pyc
o

x[h}&�
@sddlZddlZddlZddlmZmZmZddlmZm	Z	m
Z
e�e�Z
dZdZdZdZeegZdgZd	Zd
Zddd
dddddddddd�Zeee���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-stream�__end__�	__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/jinja2�text/x-shellscript-per-boot�text/x-shellscript-per-instance�text/x-shellscript-per-once)z#includez
#include-oncez#!z
#cloud-configz
#part-handlerz#cloud-boothookz#cloud-config-archivez#cloud-config-jsonpz## template: jinjar
rrcCsdt|�S)Nr)�len)�e�r�=/usr/lib/python3/dist-packages/cloudinit/handlers/__init__.py�<lambda>>sr)�keyc@s4eZdZddd�Zdd�Zdd�Zejdd	��Zd
S)�Handler�cCs||_||_dS�N)�handler_version�	frequency)�selfr�versionrrr�__init__Cs
zHandler.__init__cCsdt�|�|��fS)Nz%s: [%s])r�obj_name�
list_types�rrrr�__repr__GszHandler.__repr__cCs&t|d�s	td��dd�t|d�D�S)N�prefixesz#Missing prefixes subclass attributecSsg|]}t|�qSr)�INCLUSION_TYPES_MAP)�.0�prefixrrr�
<listcomp>Os��z&Handler.list_types.<locals>.<listcomp>)�hasattr�NotImplementedError�getattrrrrrrJs

�zHandler.list_typescOst��r)r%)r�args�kwargsrrr�handle_partTszHandler.handle_partN)r)	�__name__�
__module__�__qualname__rrr�abc�abstractmethodr)rrrrrBs

r)�	metaclassc	Cs|j}|tks|tkr|tksdSz	|j}t|�}Wntttfy(d}Ynw|d}z@t�	d|||||�|dkrI|�
||||||�WdS|dkrY|�
|||||�WdS|dkrh|�
||||�WdStd|��ty�t�
td|||||�YdSw)N��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�headers�mod_freq�mod_ver�content_typerrr�run_partYsP��
�
��rCcC�dti}t||dd||�dS�Nr1)�
CONTENT_STARTrC�r;r<rr?rrr�
call_begin���rHcCrDrE)�CONTENT_ENDrCrGrrr�call_end�rIrKc
	Cs�|d}t|}|d}tj�|dd|�}|�d�s d|}t�||d�|d}ztt�	|��}	t
|	|d	|�|j|	d
d�|d|d<WdSty\t�
td
||�YdSw)N�handlercountr�
handlerdirz%sz.pyz%s.pyi��handlersr<T)�initializedr0z7Failed at registering python file: %s (part handler %s))�PART_HANDLER_FN_TMPL�os�path�join�endswithr�
write_file�
fixup_handlerr�
import_modulerH�registerr9r:r7)
�pdata�_ctype�	_filenamer>�curcount�modnamer�modfnamerNr;rrr�walker_handle_handler�s*

��r_cCs�z2t|t�r|�dd�d}n|dd|�jdd��dd�d}t|�|kr0|d|�}W|SW|StyB|d|�}Y|Sw)N�
r0r��ignore)�errors)�
isinstance�str�split�decoder
�UnicodeDecodeError)�blob�size�startrrr�_extract_first_or_bytes�s
$���rlcCsZz|�d�WSttfy#z|�d�WYSty"YY|Swty,Y|Sw)N�
string_escape�unicode_escape)�encode�LookupErrorr4r6)�textrrr�_escape_string�s��rrcCs�|d}||�d�vrt�d|�dS|tvr t||||�dS|d}||vr9t|||d|||d|�dS|r\t|d�}dt|�}|tkrSt�	d	||�dSt�	d
||�dSt�d|�dS)Nr1�excludedzcontent_type "%s" is excludedrNr<r�z'%s...'z)Unhandled non-multipart (%s) userdata: %sz0Unhandled unknown content-type (%s) userdata: %szEmpty payload of type %s)
�getr7r8�PART_CONTENT_TYPESr_rCrlrr�NOT_MULTIPART_TYPE�warning)r<r=r>r?rBrNrk�detailsrrr�walker_callback�s@�
��rzc	Cs�d}|��D]:}|��dkrq|��}|durt}|��}|s#t|}t|�}t�|�||d<t	�
|�}|||||�|d}qdS)Nr�	multipartr1r0)�walk�get_content_maintype�get_content_type�
OCTET_TYPE�get_filename�PART_FN_TPL�dictr7r8r�fully_decoded_payload)	�msg�callbackr<�partnum�part�ctyper=r?r>rrrr|s"


�r|cCsTt|d�st|dd�t|d�st|d|�|S|j}|r(|tvr(t�d||�|S)Nrr0rz&Handler %s has an unknown frequency %s)r$�setattrrrr7rx)r;�def_freq�freqrrrrVs

�rVcCsVz	t�|���}Wnty|YSw|��}tD]
}|�|�r(t|Sq|Sr)r�
decode_binary�lowerrh�lstrip�INCLUSION_SRCH�
startswithr )r>�default�
payload_lcrqrrr�type_from_starts_with#s�
�r�r)'r-�loggingrQ�	cloudinitrrr�cloudinit.settingsrrr�	getLoggerr*r7rwrrJrF�CONTENT_SIGNALSrvrPr�r �sorted�list�keysr��ABCMetarrCrHrKr_rlrrrzr|rVr�rrrr�<module>sR

��0)

Anon7 - 2022
AnonSec Team