mirror of
https://github.com/flucont/btcloud.git
synced 2025-10-21 11:18:10 +00:00
update
This commit is contained in:
@@ -74,17 +74,23 @@
|
||||
|
||||
"update_software_list": update_software_list,
|
||||
|
||||
"malicious_file_scanning": malicious_file_scanning,
|
||||
|
||||
"check_panel_msg": check_panel_msg,
|
||||
|
||||
"check_panel_auth": check_panel_auth,
|
||||
|
||||
"count_ssh_logs": count_ssh_logs,
|
||||
|
||||
"update_vulnerabilities": update_vulnerabilities,
|
||||
|
||||
"refresh_dockerapps": refresh_dockerapps,
|
||||
|
||||
"submit_email_statistics": submit_email_statistics,
|
||||
|
||||
"submit_module_call_statistics": submit_module_call_statistics,
|
||||
|
||||
"mailsys_domain_restrictions": mailsys_domain_restrictions,
|
||||
"mailsys_domain_blecklisted_alarm": mailsys_domain_blecklisted_alarm,
|
||||
|
||||
- [可选]去除各种计算题:将bt.js里面的内容复制到 BTPanel/static/vite/oldjs/public_backup.js 末尾
|
||||
|
||||
|
@@ -148,6 +148,27 @@ def module_run(module_name,def_name,args):
|
||||
result = run_object(args)
|
||||
return result
|
||||
|
||||
def get_module(filename: str):
|
||||
'''
|
||||
@name 获取模块对象
|
||||
@param filename<string> 模块文件名
|
||||
@return object
|
||||
'''
|
||||
if not filename: return None
|
||||
|
||||
if filename[0:2] == './':
|
||||
return public.returnMsg(False,'不能是相对路径')
|
||||
|
||||
if not public.path_safe_check(filename):
|
||||
return public.returnMsg(False,'模块路径不合法')
|
||||
|
||||
if not os.path.exists(filename):
|
||||
return public.returnMsg(False,'模块文件不存在' % filename)
|
||||
|
||||
def_object = public.get_script_object(filename)
|
||||
if not def_object: return public.returnMsg(False,'模块[%s]不存在' % filename)
|
||||
|
||||
return def_object.main()
|
||||
|
||||
def get_plugin_list(upgrade_force = False):
|
||||
'''
|
||||
|
Reference in New Issue
Block a user