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 :  /proc/thread-self/root/usr/share/netplan/netplan/cli/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/thread-self/root/usr/share/netplan/netplan/cli/commands/__pycache__/set.cpython-310.pyc
o

|hEc��@sTdZddlZddlZddlZddlmZddlmZdZddgZ	Gdd�de�Z
dS)	znetplan set command line�N)�NetplanCommandz70-netplan-set.yaml�renderer�versioncs,eZdZ�fdd�Zdd�Zdd�Z�ZS)�
NetplanSetcst�jdddd�dS)N�setzTAdd new setting by specifying a dotted key=value pair like ethernets.eth0.dhcp4=trueT)�
command_id�description�leaf)�super�__init__��self��	__class__��./usr/share/netplan/netplan/cli/commands/set.pyr!s
�zNetplanSet.__init__cCsR|jjdtdd�|jjdtdd�|jjdddd	�|j|_|��|��dS)
N�	key_valuezNThe nested key=value pair in dotted format. Value can be NULL to delete a key.)�type�helpz
--origin-hintz�Can be used to help choose a name for the overwrite YAML file.                                        A .yaml suffix will be appended automatically.z
--root-dir�/zAOverwrite configuration files in this root directory instead of /)�defaultr)�parser�add_argument�str�command_set�func�
parse_args�run_commandrrrr�run&s
�
�
�zNetplanSet.runc	CsR|jdurt|j�dkrtd��|jrd�|jdf�}nd}|j�dd�}t|�dkr/td��|\}}|�d	�s?d�d	|f�}d
d�t�d|�D�}t�	�}t
���1}t�|||�|�
�|�dtj�|�|�|�|j�|�dtj�|�|�Wd�n1s�wYt��}|�|�|jr�|�||j�dS|�t|j�dS)
NrzInvalid/empty origin-hint�.�yaml�=��zInvalid value specified�networkcSsg|]}|�dd��qS)z\.r)�replace)�.0�srrr�
<listcomp>Dsz*NetplanSet.command_set.<locals>.<listcomp>z	(?<!\\)\.)�origin_hint�len�	Exception�joinr�split�
startswith�re�
libnetplan�Parser�tempfile�
TemporaryFile�create_yaml_patch�flush�seek�io�SEEK_SET�load_nullable_fields�load_yaml_hierarchy�root_dir�	load_yaml�State�import_parser_results�write_yaml_file�update_yaml_hierarchy�FALLBACK_FILENAME)	r
�filenamer-�key�value�	yaml_pathr�tmp�staterrrr4s6


�	
zNetplanSet.command_set)�__name__�
__module__�__qualname__rrr�
__classcell__rrrrrsr)�__doc__r2r/r7�netplan.cli.utilsr�netplan.libnetplanr0rA�GLOBAL_KEYSrrrrr�<module>s

Anon7 - 2022
AnonSec Team