Linux evo.fastest-server.com 5.14.0-284.1101.el9.tuxcare.11.els11.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 14 13:30:35 UTC 2026 x86_64
LiteSpeed
Server IP : 103.249.112.113 & Your IP : 216.73.217.135
Domains : 988 Domain
User : tanishks
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
lve /
dbgovernor /
scripts /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-09-04 11:34
chek_mysql_rpms_local
1.79
KB
-rwxr-xr-x
2026-08-06 17:01
cpanel-common-lve
2.16
KB
-rwxr-xr-x
2026-08-06 17:01
cpanel-delete-hooks
1.98
KB
-rwxr-xr-x
2026-08-06 17:01
cpanel-install-hooks
3.48
KB
-rwxr-xr-x
2026-08-06 17:01
cpanel-mysql-url-detect.pm
1.6
KB
-rwxr-xr-x
2026-08-06 17:01
cpanel_map_rebuilder
1.5
KB
-rwxr-xr-x
2026-08-06 17:01
dbgovernor_map
4.15
KB
-rwxr-xr-x
2026-08-06 17:01
dbgovernor_map.py
3.16
KB
-rwxr-xr-x
2026-08-06 17:01
dbgovernor_map_plesk.py
4.21
KB
-rwxr-xr-x
2026-08-06 17:01
dbgovernor_version.py
28
B
-rw-r--r--
2026-08-06 17:01
dbgovernor_watchdog.py
7.03
KB
-rwxr-xr-x
2026-08-06 17:01
detect-cpanel-mysql-version.pm
4.83
KB
-rwxr-xr-x
2026-08-06 17:01
map_hook
664
B
-rwxr-xr-x
2026-08-06 17:01
merge_logs.py
984
B
-rwxr-xr-x
2026-08-06 17:01
mysql_backup.sh
24.38
KB
-rwxr-xr-x
2026-08-06 17:01
mysql_hook
42
B
-rwxr-xr-x
2026-08-06 17:01
sentry_cleaner.sh
1.21
KB
-rwxr-xr-x
2026-08-06 17:01
sentry_daemon.py
19.72
KB
-rwxr-xr-x
2026-08-06 17:01
sentry_sdk_wrapper.py
7.14
KB
-rwxr-xr-x
2026-08-06 17:01
set_cpanel_mysql_version.pm
381
B
-rwxr-xr-x
2026-08-06 17:01
sync_hook
501
B
-rwxr-xr-x
2026-08-06 17:01
Save
Rename
#!/opt/cloudlinux/venv/bin/python3 # -*- 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 # import glob import os import pwd from clcommon import mysql_lib def get_dauser(path): """ Get list of users :param path: :return: """ users = {} os.chdir(path) dirList = glob.glob('./*') for userDir in dirList: if os.path.isdir(userDir): fileDomains = path + '/' + userDir + '/domains.list' try: f = open(fileDomains) if len(f.readline()) > 0: userName = userDir[2:] try: p = pwd.getpwnam(userName) users[userName] = p.pw_uid except KeyError: print("Warning: user '%s' has no uid!" % userName) f.close() except IOError: print("No file " + fileDomains) return users def get_account_list(conf_name='/usr/local/directadmin/conf/mysql.conf'): """ Get list of accounts :return: """ accountList = [] params = {} userList = get_dauser('/usr/local/directadmin/data/users') try: f = open(conf_name) for line in f.readlines(): p = line.split('=', 1) if len(p) > 1: params[p[0].strip()] = p[1].strip() f.close() except IOError: print("No file " + conf_name) user_ = params['user'] passwd_ = params['passwd'] for ul in userList: accountList.append((ul, ul, userList[ul])) mysql_args = { 'user': user_, 'passwd': passwd_, 'db': 'mysql', # utf8mb4 is supported even on MySQL 5.5, though leads to warning only on MySQL 8.0 # So we can use utf8mb4 charset regardless of clMySQL/clMariaDB version 'charset': 'utf8mb4', } if 'socket' in params: mysql_args['unix_socket'] = params['socket'] else: mysql_args['host'] = params.get('host', 'localhost') try: connector = mysql_lib.MySQLConnector(**mysql_args) with connector.connect() as db: query = 'select `user` from db group by `user` order by `user`' result = db.execute_query(query) except mysql_lib.pymysql.Error as e: print(e) result = [] for row in result: try: username = row[0].split('_')[0].strip() accountList.append((row[0], username, userList[username])) except KeyError: # db_user has no real user pass return accountList def writeFileMap(fileName): """ Write file with user-account accordance :param fileName: :return: """ accountList = get_account_list() f = open(fileName + '.tmp', 'w') for db_user, account_name, account_id in set(accountList): line = "%s %s %s\n" % (db_user, account_name, account_id) f.writelines(line) f.close() os.rename(fileName + '.tmp', fileName) if __name__ == '__main__': writeFileMap('/etc/container/dbuser-map')