- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.221.188.241
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__/DataSourceCloudSigma.cpython-36.pyc
3

\�met�@s�ddlZddlZddlmZddlmZmZddlmZddl	m
Z
mZeje
�ZGdd�dej�ZeZeejffgZdd	�ZdS)
�N)�	b64decode)�dmi�sources)�DataSourceHostname)�SERIAL_PORT�Cepkoc@sReZdZdZdZdd�Zedd��Zdd�Zd	d
�Z	ddd
�Z
dd�Zdd�ZdS)�DataSourceCloudSigmaz�
    Uses cepko in order to gather the server context from the VM.

    For more information about CloudSigma's Server Context:
    http://cloudsigma-docs.readthedocs.org/en/latest/server_context.html
    Z
CloudSigmacCs$t�|_d|_tjj||||�dS)N�)r�cepko�ssh_public_keyr�
DataSource�__init__)�selfZsys_cfgZdistro�paths�r�*/usr/lib/python3.6/DataSourceCloudSigma.pyr
szDataSourceCloudSigma.__init__cCs>tjd�tjd�}|s&tjd�dStjd|�d|j�kS)z
        Uses dmi data to detect if this instance of cloud-init is running
        in the CloudSigma's infrastructure.
        z0determining hypervisor product name via dmi datazsystem-product-namez-system-product-name not available in dmi dataFzdetected hypervisor as %sZ
cloudsigma)�LOG�debugrZ
read_dmi_data�lower)Zsys_product_namerrr�	ds_detect!s


zDataSourceCloudSigma.ds_detectcCs�d}y|jj�j}|d}Wntk
r:tjd�dSX|j|jd�g�|_|t	j
kr^dS|jdd�jd�}|jd	d�|_d	|kr�t
|j�|_d
|jdi�kr�|dd
|_||_|d|_d
S)zj
        Metadata is the whole server context and /meta/cloud-config is used
        as userdata.
        N�metaz+CloudSigma: Unable to read from serial portFzcloudinit-dsmode�
base64_fieldsr	�,zcloudinit-user-data�	cloudinitZvendor_datarT)r
�all�result�	ExceptionrrZ_determine_dsmode�get�dsmoderZDSMODE_DISABLED�splitZuserdata_rawrZvendordata_raw�metadatar)rrZserver_contextZserver_metarrrr�	_get_data0s(


zDataSourceCloudSigma._get_datacCsdtS)z/Return the subplatform metadata source details.z
cepko (%s))r)rrrr�_get_subplatformRsz%DataSourceCloudSigma._get_subplatformFcCsDtjd|jd�r&|jddd�}n|jdjd�d}t|d�S)	z�
        Cleans up and uses the server's name if the latter is set. Otherwise
        the first part from uuid is being used.
        z^[A-Za-z0-9 -_\.]+$�nameN�=�uuid�-rF)�re�matchr rr)rZfqdnZ
resolve_ipZ
metadata_only�retrrr�get_hostnameVsz!DataSourceCloudSigma.get_hostnamecCs|jgS)N)r)rrrr�get_public_ssh_keysasz(DataSourceCloudSigma.get_public_ssh_keyscCs
|jdS)Nr%)r )rrrr�get_instance_iddsz$DataSourceCloudSigma.get_instance_idN)FFF)
�__name__�
__module__�__qualname__�__doc__Zdsnamer
�staticmethodrr!r"r*r+r,rrrrrs"
rcCstj|t�S)zK
    Return a list of data sources that match this set of dependencies
    )rZlist_from_depends�datasources)Zdependsrrr�get_datasource_listrsr3)Zloggingr'�base64rrrrZcloudinit.sourcesrZ$cloudinit.sources.helpers.cloudsigmarrZ	getLoggerr-rrrZDataSourceCloudSigmaNetZDEP_FILESYSTEMr2r3rrrr�<module>s
W

Youez - 2016 - github.com/yon3zu
LinuXploit