Linux boca.hozzt.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
LiteSpeed
: 159.253.39.62 | : 3.144.107.215
Cant Read [ /etc/named.conf ]
7.4.33
renovkoron
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
opt /
cloudlinux /
venv /
lib /
python3.11 /
site-packages /
clconfigure /
cli /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
cloudlinux-edition-watcher
1.47
KB
-rwxr-xr-x
cloudlinux-reconfigure.py
2.79
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cloudlinux-reconfigure.py
#!/opt/cloudlinux/venv/bin/python -bb # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # https://cloudlinux.com/docs/LICENCE.TXT # import argparse import enum import logging import sys from clcommon.lib import cledition from clconfigure import setup_logger from clconfigure.spec import admin, shared, shared_pro, solo from lve_utils.sentry import init_lve_utils_sentry_client LOGS_PATH = '/var/log/cloudlinux/clcustomizer.log' class TargetEdition(enum.Enum): ADMIN = 'admin' AUTO = 'auto' SHARED = 'shared' SHARED_PRO = 'shared_pro' SOLO = 'solo' def _resolve_auto_target(): """ Resolves edition for 'auto' target. """ if cledition.is_cl_solo_edition(): return TargetEdition.SOLO.value if cledition.is_cl_admin_edition(): return TargetEdition.ADMIN.value if cledition.is_cl_shared_edition(): return TargetEdition.SHARED.value if cledition.is_cl_shared_pro_edition(): return TargetEdition.SHARED_PRO.value raise NotImplementedError() def main(): """ Entry point for this program. Parses arguments and calls needed methods. """ setup_logger(None, LOGS_PATH) logging.debug('Executing "%s"', ' '.join(sys.argv)) parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(dest='action') reconfigure = subparsers.add_parser('reconfigure') reconfigure.add_argument('-t', '--target', choices=[e.value for e in TargetEdition], required=True) preconfigure = subparsers.add_parser('preconfigure') preconfigure.add_argument('-t', '--target', choices=[e.value for e in TargetEdition], required=True) args = parser.parse_args() if args.action is None: parser.print_help() return target = _resolve_auto_target() if args.target == 'auto' else args.target handlers = { TargetEdition.SOLO.value: solo, TargetEdition.ADMIN.value: admin, TargetEdition.SHARED.value: shared, TargetEdition.SHARED_PRO.value: shared_pro, } handler = handlers.get(target) if handler is None: raise ValueError(f'Unknown target {target}') actions = { 'reconfigure': 'provision', 'preconfigure': 'preprovision' } action = actions.get(args.action) if action is None: raise ValueError(f"Unknown action {args.action}") getattr(handler, action)(edition=target) if __name__ == '__main__': logging.basicConfig(level=logging.INFO) init_lve_utils_sentry_client('clconfigure') try: main() finally: logging.info('You can find complete logs of the operation here: %s', LOGS_PATH)
Close