diff --git a/app/script/convert.sh b/app/script/convert.sh index 5bef393..92f1a1d 100644 --- a/app/script/convert.sh +++ b/app/script/convert.sh @@ -1,8 +1,8 @@ #!/bin/bash -Linux_Version="7.9.9" +Linux_Version="7.9.10" Windows_Version="7.8.0" -Btm_Version="2.1.1" +Btm_Version="2.1.7" FILES=( public/install/src/panel6.zip diff --git a/install.sql b/install.sql index e500ca7..65d7893 100644 --- a/install.sql +++ b/install.sql @@ -12,15 +12,15 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES ('bt_key', ''), ('whitelist', '0'), ('download_page', '1'), -('new_version', '7.9.9'), +('new_version', '7.9.10'), ('update_msg', '暂无更新日志'), -('update_date', '2023-04-07'), +('update_date', '2023-05-09'), ('new_version_win', '7.8.0'), ('update_msg_win', '暂无更新日志'), ('update_date_win', '2022-12-08'), -('new_version_btm', '2.1.1'), +('new_version_btm', '2.1.7'), ('update_msg_btm', '暂无更新日志'), -('update_date_btm', '2023-03-31'), +('update_date_btm', '2023-05-18'), ('updateall_type', '0'), ('syskey', 'UqP94LtI8eWAIgCP'); diff --git a/public/install/install_6.0.sh b/public/install/install_6.0.sh index e164923..566783b 100644 --- a/public/install/install_6.0.sh +++ b/public/install/install_6.0.sh @@ -307,6 +307,15 @@ Install_RPM_Pack(){ echo "exclude=httpd nginx php mysql mairadb python-psutil python2-psutil" >> $yumPath fi + if [ -f "/etc/redhat-release" ] && [ $(cat /etc/os-release|grep PLATFORM_ID|grep -oE "el8") ];then + yum config-manager --set-enabled powertools + yum config-manager --set-enabled PowerTools + fi + + if [ -f "/etc/redhat-release" ] && [ $(cat /etc/os-release|grep PLATFORM_ID|grep -oE "el9") ];then + dnf config-manager --set-enabled crb -y + fi + #SYS_TYPE=$(uname -a|grep x86_64) #yumBaseUrl=$(cat /etc/yum.repos.d/CentOS-Base.repo|grep baseurl=http|cut -d '=' -f 2|cut -d '$' -f 1|head -n 1) #[ "${yumBaseUrl}" ] && checkYumRepo=$(curl --connect-timeout 5 --head -s -o /dev/null -w %{http_code} ${yumBaseUrl}) @@ -524,7 +533,7 @@ Install_Python_Lib(){ return fi - py_version="3.7.8" + py_version="3.7.16" mkdir -p $pyenv_path echo "True" > /www/disk.pl if [ ! -w /www/disk.pl ];then @@ -601,7 +610,7 @@ Install_Python_Lib(){ cd ~ rm -rf $python_src_path wget -O $pyenv_path/pyenv/bin/activate $download_Url/install/pyenv/activate.panel -T 5 - wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip-3.7.8.txt -T 5 + wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip-3.7.16.txt -T 5 ln -sf $pyenv_path/pyenv/bin/pip3.7 $pyenv_path/pyenv/bin/pip ln -sf $pyenv_path/pyenv/bin/python3.7 $pyenv_path/pyenv/bin/python ln -sf $pyenv_path/pyenv/bin/pip3.7 /usr/bin/btpip @@ -611,8 +620,24 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install -U setuptools==65.5.0 $pyenv_path/pyenv/bin/pip install -U wheel==0.34.2 $pyenv_path/pyenv/bin/pip install -r $pyenv_path/pyenv/pip.txt + + wget -O pip-packs.txt $download_Url/install/pyenv/pip-packs.txt + PIP_PACKS=$(cat pip-packs.txt) + for P_PACK in ${PIP_PACKS}; + do + btpip show ${P_PACK} > /dev/null 2>&1 + if [ "$?" == "1" ];then + btpip install ${P_PACK} + fi + done + + rm -f pip-packs.txt + source $pyenv_path/pyenv/bin/activate + btpip install psutil + btpip install gevent + is_gevent=$($python_bin -m gevent 2>&1|grep -oE package) is_psutil=$($python_bin -m psutil 2>&1|grep -oE package) if [ "${is_gevent}" != "${is_psutil}" ];then diff --git a/public/install/install_btmonitor.sh b/public/install/install_btmonitor.sh index 8233d5a..778c8a8 100644 --- a/public/install/install_btmonitor.sh +++ b/public/install/install_btmonitor.sh @@ -213,6 +213,8 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install cachelib $pyenv_path/pyenv/bin/pip install py7zr $pyenv_path/pyenv/bin/pip install backports.lzma + $pyenv_path/pyenv/bin/pip install pandas + $pyenv_path/pyenv/bin/pip install msgpack fi source $pyenv_path/pyenv/bin/activate chmod -R 700 $pyenv_path/pyenv/bin @@ -270,6 +272,8 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install cachelib $pyenv_path/pyenv/bin/pip install py7zr $pyenv_path/pyenv/bin/pip install backports.lzma + $pyenv_path/pyenv/bin/pip install pandas + $pyenv_path/pyenv/bin/pip install msgpack if [ ! -f $pyenv_path/pyenv/bin/python ];then rm -f $pyenv_file Red_Error "ERROR: Install python env fielded." "ERROR: 下载堡塔云监控主控端运行环境失败,请尝试重新安装!" @@ -325,6 +329,8 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install cachelib $pyenv_path/pyenv/bin/pip install py7zr $pyenv_path/pyenv/bin/pip install backports.lzma + $pyenv_path/pyenv/bin/pip install pandas + $pyenv_path/pyenv/bin/pip install msgpack source $pyenv_path/pyenv/bin/activate is_gevent=$($python_bin -m gevent 2>&1|grep -oE package) @@ -360,7 +366,7 @@ EOF sleep 1 fi - version="2.0.8" + version="2.1.7" file_name="bt-monitor" agent_src="bt-monitor.zip" diff --git a/public/install/src/bt-monitor-2.1.1.zip b/public/install/src/bt-monitor-2.1.7.zip similarity index 69% rename from public/install/src/bt-monitor-2.1.1.zip rename to public/install/src/bt-monitor-2.1.7.zip index 7eafcdc..1e5b4a1 100644 Binary files a/public/install/src/bt-monitor-2.1.1.zip and b/public/install/src/bt-monitor-2.1.7.zip differ diff --git a/public/install/src/panel6.zip b/public/install/src/panel6.zip index 1cc61a1..d052965 100644 Binary files a/public/install/src/panel6.zip and b/public/install/src/panel6.zip differ diff --git a/public/install/update/LinuxPanel-7.9.9.zip b/public/install/update/LinuxPanel-7.9.10.zip similarity index 88% rename from public/install/update/LinuxPanel-7.9.9.zip rename to public/install/update/LinuxPanel-7.9.10.zip index f8e3484..0fd018f 100644 Binary files a/public/install/update/LinuxPanel-7.9.9.zip and b/public/install/update/LinuxPanel-7.9.10.zip differ diff --git a/public/install/update6.sh b/public/install/update6.sh index 3c01428..fa488cd 100644 --- a/public/install/update6.sh +++ b/public/install/update6.sh @@ -48,6 +48,10 @@ armCheck=$(uname -m|grep arm) if [ "${armCheck}" ];then version='7.7.0' fi + +if [ "$1" ];then + version=$1 +fi wget -T 5 -O /tmp/panel.zip $Btapi_Url/install/update/LinuxPanel-${version}.zip dsize=$(du -b /tmp/panel.zip|awk '{print $1}') if [ $dsize -lt 10240 ];then @@ -69,10 +73,11 @@ rm -f /www/server/panel/class/*.pyc #pip install itsdangerous==0.24 pip_list=$($mypip list) -request_v=$(echo "$pip_list"|grep requests) -if [ "$request_v" = "" ];then - $mypip install requests +request_v=$(btpip list 2>/dev/null|grep "requests "|awk '{print $2}'|cut -d '.' -f 2) +if [ "$request_v" = "" ] || [ "${request_v}" -gt "28" ];then + $mypip install requests==2.27.1 fi + openssl_v=$(echo "$pip_list"|grep pyOpenSSL) if [ "$openssl_v" = "" ];then $mypip install pyOpenSSL diff --git a/wiki/btmonitor.md b/wiki/btmonitor.md index e821b53..841164d 100644 --- a/wiki/btmonitor.md +++ b/wiki/btmonitor.md @@ -4,7 +4,7 @@ 安装包下载链接:http://download.bt.cn/install/src/bt-monitor-版本号.zip -- 删除core/include/c_loader/PluginLoader.so,将btmonitor/PluginLoader.py复制到这个文件夹 +- 删除core/include/c_loader/PluginLoader.so,sqlite_server/PluginLoader.so,将btmonitor/PluginLoader.py复制到这个文件夹 - 批量解密源码:执行 php think decrypt all <源码根目录> @@ -28,7 +28,7 @@ def write_request_log(reques = None): 这一行下面加上 return -- core/basic_monitor.py +- core/include/basic_monitor.py 在 def report_module_logs(self, force=False): 这一行下面加上 return @@ -40,5 +40,14 @@ - init.sh https://download.bt.cn => http://www.example.com -- BT-MONITOR 取消第一个CreateSSL方法定义的注释,删除第二个CreateSSL方法定义 +- BT-MONITOR 在 + ```python + def CreateSSL(): + ``` + + 这一行下面加上 + + ```python + return CreateSSL_offline() + ``` diff --git a/wiki/files/linux/PluginLoader.py b/wiki/files/linux/PluginLoader.py index dddf911..f8fb2e1 100644 --- a/wiki/files/linux/PluginLoader.py +++ b/wiki/files/linux/PluginLoader.py @@ -3,7 +3,7 @@ import public,os,sys,json #获取插件列表(0/1) def get_plugin_list(force = 0): - api_root_url = 'https://api.bt.cn' + api_root_url = 'http://www.example.com' api_url = api_root_url+ '/panel/get_plugin_list' cache_file = 'data/plugin_list.json' @@ -120,3 +120,17 @@ def path_check(path): if i in list: return False return True + +#数据加密 +def db_encrypt(data): + result = {} + result['status'] = True + result['msg'] = data + return result + +#数据解密 +def db_decrypt(data): + result = {} + result['status'] = True + result['msg'] = data + return result diff --git a/wiki/update.md b/wiki/update.md index 4f5c9b0..5b05cbe 100644 --- a/wiki/update.md +++ b/wiki/update.md @@ -71,12 +71,8 @@ - 去除无用的定时任务:task.py 文件 删除以下几行 - "update_software_list": update_software_list, - "check_panel_msg": check_panel_msg, - PluginLoader.daemon_panel() - - 去除WebRTC连接:BTPanel/static/js/public.js 删除stun.start();这一行 - 去除首页广告:BTPanel/static/js/index.js 文件删除最下面index.recommend_paid_version()这一行 @@ -105,6 +101,8 @@ - [可选]关闭自动生成访问日志:在 BTPanel/\_\_init\_\_.py 删除public.write_request_log()这一行 +- [可选]删除小图标广告:在BTPanel/static/js/site.js,删除“WAF防火墙,保护网站安全”对应的html标签,files.js,删除“开启保护,文件无法编辑”对应的html标签 + 解压安装包panel6.zip,将更新包改好的文件覆盖到里面,然后重新打包,即可更新安装包。(