- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.145.168.68
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.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/cloudinit/cmd/devel/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/cloudinit/cmd/devel/__pycache__/net_convert.cpython-36.pyc
3

\�me$�@s�dZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZm
Z
mZmZmZmZddlmZddlmZddlmZdZdd	d
�Zdd�Zed
kr�e�j�Zeee�dS)z(Debug network config format conversions.�N)�distros�log�safeyaml)�eni�netplan�network_manager�
network_state�networkd�	sysconfig)�DataSourceAzure)�	openstack)�guestcust_utilznet-convertcCs�|stjttd�}|jddtdddd�|jdd	d
ddd
dgddd�|jdddddd�|jdddd�tjj�D�dd�|jdddddd�|jd d!d"d#�|jd$d%d
d&d'd(d)gdd*d�|S)+aBuild or extend and arg parser for net-convert utility.

    @param parser: Optional existing ArgumentParser instance representing the
        subcommand which will be extended to support the args of this utility.

    @returns: ArgumentParser with proper argument configuration.
    )�prog�descriptionz-pz--network-data�PATHTz!The network configuration to read)�type�metavar�required�helpz-kz--kindrznetwork_data.json�yamlz
azure-imdsz
vmware-imcz&The format of the given network config)�choicesrrz-dz--directoryzdirectory to place output in)rrrz-Dz--distrocSsg|]}|D]}|�qqS�r)�.0Zsublist�itemrr�!/usr/lib/python3.6/net_convert.py�
<listcomp>Gszget_parser.<locals>.<listcomp>)rrz-mz--maczname,mac�appendzinterface name to mac mapping)r�actionrz--debug�
store_truezenable debug logging to stderr.)rrz-Oz
--output-kindrr	r
znetwork-managerz!The network config format to emit)	�argparse�ArgumentParser�NAME�__doc__�add_argument�openrZ
OSFAMILIES�values)�parserrrr�
get_parsersZr'cCs�|jjd�s|jd7_tjj|j�s4tj|j�|jrJtjt	j
d�ntjt	jd�|jr�i}x,|jD]}|j
dd�\}}|||<qjWnd}|jj�}|jdkr�tj|�}n�|jdk�rtj|�}d|kr�|jd�}|j�rttjjdjd	tj|�d
g��nt|jdk�r"tjtj|�|d�}nR|jd
k�rHtj tj|�ddd�}n,|jdk�rtt!j"t!j#|jj$��}t!j%|d�}t&j'|j(�}	|	|j(id�}
|j)dk�r�tj*}|
j+jd�}n�|j)dk�r�t,j*}|
j+jdi�}d|d<|ddd�|d<ddg|d<nh|j)dk�rt-j*}|
j+jd�}nH|j)dk�r8t.j*}|
j+jd�}n(|j)dk�rXt/j*}|
j+jd�}nt0d��||d�}t1j2||d�}
|j�r�tjjdjd
dt3j4|
�d
g��tjjd
jd|j|jj$fd |j)|jfg�d�|j5|
|jd!�dS)"N�/)�level�,�rrZnetwork�
z
Input YAML�znetwork_data.json)�
known_macsz
azure-imdsT)Z&apply_network_config_for_secondary_ipsz
vmware-imcFrZpostcmdsZnetplan_pathzdhcp-use-domainszipv6-mtuZfeaturesr	r
znetwork-managerzInvalid output_kind)�config)ZrendererzInternal Statez"Read input format '%s' from '%s'.
z!Wrote output format '%s' to '%s'
)r�target)6Z	directory�endswith�os�path�isdir�makedirs�debugrZsetup_basic_logging�logging�DEBUGZWARNZmac�splitZnetwork_data�readZkindrZconvert_eni_datar�load�get�sys�stderr�write�join�dumpsrZconvert_net_json�json�loads�azureZ6generate_network_config_from_instance_network_metadatar
ZConfigZ
ConfigFile�nameZ%get_network_data_from_vmware_cust_cfgrZfetch�distroZoutput_kindZRendererZrenderer_configsrr	r
r�RuntimeErrorrZparse_net_config_datar�dumpZrender_network_state)rE�argsr.rZ
iface_nameZ	iface_macZnet_dataZpre_nsr/Z
distro_clsrFZr_cls�r�nsrrr�handle_args_s�





 rL�__main__)N)r"rrBr7r2r=rZ	cloudinitrrrZ
cloudinit.netrrrrr	r
Zcloudinit.sourcesrrDZcloudinit.sources.helpersrZ$cloudinit.sources.helpers.vmware.imcr
r!r'rL�__name__�
parse_argsrIrrrr�<module>s" 
B]


Youez - 2016 - github.com/yon3zu
LinuXploit