- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.133.136.117
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/cloudinit/sources/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/cloudinit/sources/__pycache__/DataSourceUpCloud.cpython-36.opt-1.pyc
3

\�me��@s�ddlZddlmZddlmZmZddlmZddlm	Z	ddl
mZej
e�ZddiZd	Zd
Zd
ZGdd�dej�ZGd
d�de�ZeejffeejejffgZdd�ZdS)�N)�net)�sources�util)�NoDHCPLeaseError)�EphemeralDHCPv4)�upcloud�metadata_urlz'http://169.254.169.254/metadata/v1.json��c@sHeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	e
d
d��ZdS)�DataSourceUpCloud�UpCloudFcCs�tjj||||�||_t�|_tjtj|ddgi�t	g�|_
|j
d|_|j
jdt
�|_|j
jdt�|_|j
jdt�|_d|_dS)NZ
datasourcerr�retries�timeout�
wait_retry)r�
DataSource�__init__�distro�dict�metadatarZ
mergemanydictZget_cfg_by_path�BUILTIN_DS_CONFIGZds_cfg�metadata_address�get�
MD_RETRIESr
�
MD_TIMEOUTr�
MD_WAIT_RETRYr�_network_config)�self�sys_cfgr�paths�r�'/usr/lib/python3.6/DataSourceUpCloud.pyr"s
zDataSourceUpCloud.__init__cCstj�S)N)�	uc_helperZread_sysinfo)rrrr �_get_sysinfo2szDataSourceUpCloud._get_sysinfocCstj|j|j|j|jd�S)N)rZsec_betweenr
)r!Z
read_metadatarrrr
)rrrr �_read_metadata5s
z DataSourceUpCloud._read_metadatacCs�|j�\}}|sdStjd|�|jr�yNtjd�tj�}tjd|�t|j|��t	j
tjd|jd�}WdQRXWn6tt
jfk
r�}zt	jtt|��dSd}~XnXndy"tjd�t	j
tjd|jd�}Wn@t
jk
�r}z t	jtt|��tjd|�dSd}~XnX||_|jd	|�|jd
<|jd�|jd<|jd
�|jd
<|jd�|jd<|jdd�|jd<|jdd�|_|jdd�|_dS)NFz"Running on UpCloud. server_uuid=%szFinding a fallback NICz*Discovering metadata via DHCP interface %szReading from metadata service)Zlogfunc�msg�funcz7Discovering metadata without DHCP-configured networkingzENo DHCP-enabled interfaces available, unable to fetch metadata for %sZinstance_idzinstance-idZhostnamezlocal-hostname�networkZpublic_keyszpublic-keysZregion�defaultZavailability_zoneZvendor_dataZ	user_dataT)r"�LOG�info�perform_dhcp_setup�debug�cloudnetZfind_fallback_nicrrrZlog_timer#rrZInvalidMetaDataExceptionZlogexc�strZ
metadata_fullrrZvendordata_rawZuserdata_raw)rZ
is_upcloudZserver_uuidZnicZmd�errr �	_get_data=sN
zDataSourceUpCloud._get_datacCstj|j��S)N)rZinstance_id_matches_system_uuidZget_instance_id)rrrrr �check_instance_idrsz#DataSourceUpCloud.check_instance_idcCs6|jr|jS|jjd�}|s$td��tj|�|_|jS)z�
        Configure the networking. This needs to be done each boot,
        since the IP and interface information might have changed
        due to reconfiguration.
        r&z/Unable to get network meta-data from server....)rrr�RuntimeErrorr!Zconvert_network_config)rZraw_network_configrrr �network_configusz DataSourceUpCloud.network_configN)�__name__�
__module__�__qualname__Zdsnamer*rr"r#r/r0�propertyr2rrrr rs5rc@seZdZdZdZdS)�DataSourceUpCloudLocalaz
    Run in init-local using a DHCP discovery prior to metadata crawl.

    In init-local, no network is available. This subclass sets up minimal
    networking with dhclient on a viable nic so that it can talk to the
    metadata service. If the metadata service provides network configuration
    then render the network configuration for that instance based on metadata.
    TN)r3r4r5�__doc__r*rrrr r7�sr7cCstj|t�S)N)rZlist_from_depends�datasources)Zdependsrrr �get_datasource_list�sr:)ZloggingZ	cloudinitrr,rrZcloudinit.net.dhcprZcloudinit.net.ephemeralrZcloudinit.sources.helpersrr!Z	getLoggerr3r(rrrrrrr7ZDEP_FILESYSTEMZDEP_NETWORKr9r:rrrr �<module>s
r


Youez - 2016 - github.com/yon3zu
LinuXploit