Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
netplan /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-06-23 20:32
__init__.py
2.82
KB
-rw-r--r--
2023-12-13 01:56
_netplan_cffi.cpython-310-x86_64-linux-gnu.so
79.37
KB
-rw-r--r--
2026-04-23 22:17
_utils.py
7.4
KB
-rw-r--r--
2023-12-13 01:56
netdef.py
11.49
KB
-rw-r--r--
2026-04-23 22:17
parser.py
2.06
KB
-rw-r--r--
2023-12-13 01:56
state.py
4.95
KB
-rw-r--r--
2023-12-13 01:56
Save
Rename
# Copyright (C) 2023 Canonical, Ltd. # Author: Lukas Märdian <slyon@ubuntu.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 3. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from typing import Union, IO from ._netplan_cffi import ffi, lib from ._utils import _checked_lib_call class Parser(): def __init__(self): self._ptr = lib.netplan_parser_new() def __del__(self): ref = ffi.new('NetplanParser **', self._ptr) lib.netplan_parser_clear(ref) def load_yaml(self, input_file: Union[str, IO]): if isinstance(input_file, str): return _checked_lib_call(lib.netplan_parser_load_yaml, self._ptr, input_file.encode('utf-8')) else: return _checked_lib_call(lib.netplan_parser_load_yaml_from_fd, self._ptr, input_file.fileno()) def load_yaml_hierarchy(self, rootdir: str = None): root = rootdir.encode('utf-8') if rootdir else ffi.NULL return _checked_lib_call(lib.netplan_parser_load_yaml_hierarchy, self._ptr, root) def load_keyfile(self, input_file: str): # TODO: load from File/fd (i.e. input_file: Union[str, IO]) return _checked_lib_call(lib.netplan_parser_load_keyfile, self._ptr, input_file.encode('utf-8')) def load_nullable_fields(self, input_file: IO): return _checked_lib_call(lib.netplan_parser_load_nullable_fields, self._ptr, input_file.fileno()) def _load_nullable_overrides(self, input_file: IO, constraint: str): return _checked_lib_call(lib.netplan_parser_load_nullable_overrides, self._ptr, input_file.fileno(), constraint.encode('utf-8'))