Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 13.58.219.150
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 /
cloudinit /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
analyze
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
cmd
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
config
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
distros
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
filters
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
handlers
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
mergers
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
net
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
reporting
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
sources
[ DIR ]
drwxr-xr-x
2024-09-18 19:49
__init__.py
0
B
-rw-r--r--
2024-07-03 01:59
apport.py
9.97
KB
-rw-r--r--
2024-07-03 01:59
atomic_helper.py
2.51
KB
-rw-r--r--
2024-07-03 01:59
cloud.py
3.22
KB
-rw-r--r--
2024-07-11 21:27
dmi.py
7.78
KB
-rw-r--r--
2024-07-03 01:59
event.py
2
KB
-rw-r--r--
2024-07-03 01:59
features.py
4.61
KB
-rw-r--r--
2024-07-11 21:27
gpg.py
7.99
KB
-rw-r--r--
2024-07-03 01:59
helpers.py
16.11
KB
-rw-r--r--
2024-07-03 01:59
importer.py
2.43
KB
-rw-r--r--
2024-07-03 01:59
log.py
6
KB
-rw-r--r--
2024-07-03 01:59
netinfo.py
23.93
KB
-rw-r--r--
2024-07-03 01:59
persistence.py
2.52
KB
-rw-r--r--
2024-07-03 01:59
registry.py
1022
B
-rw-r--r--
2024-07-03 01:59
safeyaml.py
9.93
KB
-rw-r--r--
2024-07-03 01:59
settings.py
2.1
KB
-rw-r--r--
2024-07-03 01:59
signal_handler.py
1.74
KB
-rw-r--r--
2024-07-03 01:59
simpletable.py
1.93
KB
-rw-r--r--
2024-07-03 01:59
ssh_util.py
22.2
KB
-rw-r--r--
2024-07-03 01:59
stages.py
40.75
KB
-rw-r--r--
2024-07-03 01:59
subp.py
12.44
KB
-rw-r--r--
2024-07-03 01:59
temp_utils.py
2.94
KB
-rw-r--r--
2024-07-03 01:59
templater.py
7.64
KB
-rw-r--r--
2024-07-03 01:59
type_utils.py
703
B
-rw-r--r--
2024-07-03 01:59
url_helper.py
34.17
KB
-rw-r--r--
2024-07-03 01:59
user_data.py
14.44
KB
-rw-r--r--
2024-07-03 01:59
util.py
97.75
KB
-rw-r--r--
2024-07-11 21:27
version.py
564
B
-rw-r--r--
2024-07-11 21:27
warnings.py
3.76
KB
-rw-r--r--
2024-07-03 01:59
Save
Rename
# This file is part of cloud-init. See LICENSE file for license information. import json import logging import os import stat import tempfile from base64 import b64decode, b64encode from cloudinit import util _DEF_PERMS = 0o644 LOG = logging.getLogger(__name__) def b64d(source): # Base64 decode some data, accepting bytes or unicode/str, and returning # str/unicode if the result is utf-8 compatible, otherwise returning bytes. decoded = b64decode(source) try: return decoded.decode("utf-8") except UnicodeDecodeError: return decoded def b64e(source): # Base64 encode some data, accepting bytes or unicode/str, and returning # str/unicode if the result is utf-8 compatible, otherwise returning bytes. if not isinstance(source, bytes): source = source.encode("utf-8") return b64encode(source).decode("utf-8") def write_file( filename, content, mode=_DEF_PERMS, omode="wb", preserve_mode=False ): # open filename in mode 'omode', write content, set permissions to 'mode' if preserve_mode: try: file_stat = os.stat(filename) mode = stat.S_IMODE(file_stat.st_mode) except OSError: pass tf = None try: dirname = os.path.dirname(filename) util.ensure_dir(dirname) tf = tempfile.NamedTemporaryFile(dir=dirname, delete=False, mode=omode) LOG.debug( "Atomically writing to file %s (via temporary file %s) - %s: [%o]" " %d bytes/chars", filename, tf.name, omode, mode, len(content), ) tf.write(content) tf.close() os.chmod(tf.name, mode) os.rename(tf.name, filename) except Exception as e: if tf is not None: os.unlink(tf.name) raise e def json_serialize_default(_obj): """Handler for types which aren't json serializable.""" try: return "ci-b64:{0}".format(b64e(_obj)) except AttributeError: return "Warning: redacted unserializable type {0}".format(type(_obj)) def json_dumps(data): """Return data in nicely formatted json.""" return json.dumps( data, indent=1, sort_keys=True, separators=(",", ": "), default=json_serialize_default, ) def write_json(filename, data, mode=_DEF_PERMS): # dump json representation of data to file filename. return write_file( filename, json_dumps(data) + "\n", omode="w", mode=mode, )