Linux ams-business-8.hostwindsdns.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
LiteSpeed
Server IP : 192.236.177.161 & Your IP : 216.73.216.50
Domains :
Cant Read [ /etc/named.conf ]
User : ajzdfbpz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
authselect /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-02-12 23:56
snippets
[ DIR ]
drwxr-xr-x
2024-02-12 23:56
authcompat.py
21.54
KB
-rwxr-xr-x
2023-10-14 18:06
authcompat_ConfigSnippet.py
2.75
KB
-rw-r--r--
2022-12-01 13:02
authcompat_EnvironmentFile.py
6.57
KB
-rw-r--r--
2022-12-01 13:02
authcompat_Options.py
13.67
KB
-rw-r--r--
2023-10-14 18:05
Save
Rename
# -*- coding: utf-8 -*- # # Authors: # Pavel Březina <pbrezina@redhat.com> # # Copyright (C) 2018 Red Hat # # 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; either version 3 of the License, or # (at your option) any later version. # # 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/>. # import errno import os import re class ConfigSnippet: TEST = False AllKeysRE = re.compile(r'\${\??(?P<key>[\w-]*)}') DummyKeysRE = re.compile(r'\${\?[\w-]*}') def __init__(self, template, destination): with open(template, "r") as f: self.template = f.read() self.destination = destination def generate(self, values): # First remove lines containing key that is not set lines = self.template.split('\n') remove = [] for idx, line in enumerate(lines): for match in self.AllKeysRE.finditer(line): key = match.group("key") if key not in values or values[key] is None: remove.append(idx) break for idx in sorted(remove, reverse=True): del lines[idx] # Build output string output = '\n'.join(lines) # Remove all dummy keys ${?key} output = self.DummyKeysRE.sub("", output) # Replace values for key, value in values.items(): if value is None: continue if type(value) is bool: value = "true" if value else "false" output = output.replace("${%s}" % key, value) return output def write(self, values, to_stdout=False): output = self.generate(values) if self.TEST: print("========== BEGIN Content of [%s] ==========" % self.destination) print(output) print("========== END Content of [%s] ==========\n" % self.destination) return dirname = os.path.dirname(self.destination) if not os.path.exists(dirname): try: os.makedirs(dirname) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(dirname): pass else: raise with open(self.destination, "w") as f: f.write(output)