CasperSecurity

Current Path : /lib/python3/dist-packages/cloudinit/sources/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/cloudinit/sources/__pycache__/DataSourceVultr.cpython-310.pyc

o

쑛h�	@sddlZddlmZddlmmmZddlmZmZm	Z	m
Z
e�e�Z
ddddde
��e	��d	e	��d
fd�ZGdd
�d
ej�ZeejffgZdd�Zedkr�ddlZe��sged�e�d�ejdd�jZe�eededededed�ZedZe��Z dSdS)�N)�Tuple)�sources�stages�util�versionzhttp://169.254.169.254��
�z"Cloud-Init/%s - OS: %s Variant: %s�system�variant)�url�retries�timeout�wait�
user-agentcs�eZdZUdZejjdZeedfe	d<�fdd�Z
edd��Zd	d
�Z
dd�Zd
d�Zdd�Zedd��Zedd��Z�ZS)�DataSourceVultr�Vultr)zstartup-script.�sensitive_metadata_keyscs<tt|��|||�t�t�|ddgi�tg�|_d|_dS)N�
datasourcer)	�superr�__init__r�
mergemanydict�get_cfg_by_path�BUILTIN_DS_CONFIG�ds_cfg�netcfg)�self�sys_cfg�distro�paths��	__class__��C/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVultr.pyr%s��
zDataSourceVultr.__init__cCst��S�N)�vultr�is_vultrr"r"r"r#�	ds_detect/szDataSourceVultr.ds_detectcCsTt�d�|��|_|jd|_|�|j�t�d|jd�t�d|jd�dS)NzMachine is a Vultr instance�	user-dataz	SUBID: %szinstance-idzHostname: %s�local-hostnameT)�LOG�debug�get_metadata�metadata�userdata_raw�get_datasource_data�rr"r"r#�	_get_data4s

zDataSourceVultr._get_datacCsvd|vrt�|d�|d|_nt�|d�|_|d|_|jddkr*d|jd<|d|_|jdkr9d|_dSdS)N�cloud_interfaces�
interfaces�vendor-datar)��guestr()r%�add_interface_namesr�generate_network_config�vendordata_rawr-r.)r�mdr"r"r#r/Fs




�z#DataSourceVultr.get_datasource_datac	Cs>tj|j|jd|jd|jd|jd|jd|j��d�S)Nrrr
rr)�tmp_dir)r%r,rr�get_tmp_exec_pathr0r"r"r#r,[s�zDataSourceVultr.get_metadatacCs.t��sdSt��rdSt��d}t�|�S)NF�subid)r%r&�is_baremetal�get_sysinfor�instance_id_matches_system_uuid)rrr=r"r"r#�check_instance_idgs
z!DataSourceVultr.check_instance_idcCsdSr$r"r0r"r"r#�launch_indexsszDataSourceVultr.launch_indexcCs|jSr$)rr0r"r"r#�network_configwszDataSourceVultr.network_config)�__name__�
__module__�__qualname__�dsnamer�
DataSourcerr�str�__annotations__r�staticmethodr'r1r/r,rA�propertyrBrC�
__classcell__r"r"r r#rs

�


rcCst�|t�Sr$)r�list_from_depends�datasources)�dependsr"r"r#�get_datasource_list�srQ�__main__zMachine is not a Vultr instance�T)�reporterrrr
rrr4)!�logging�typingr�cloudinit.sources.helpers.vultrr�helpersr%�	cloudinitrrr�	getLoggerrDr*�version_string�system_inforrHr�DEP_FILESYSTEMrOrQ�sysr&�print�exit�Initrr,r:�configr?�sysinfor"r"r"r#�<module>sJ


���
a�
��
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY