diff --git a/app/controller/Api.php b/app/controller/Api.php index 2630588..0a6d88e 100644 --- a/app/controller/Api.php +++ b/app/controller/Api.php @@ -333,6 +333,10 @@ class Api extends BaseController public function return_error(){ return json(['status'=>false, 'msg'=>'不支持当前操作']); } + + public function return_error2(){ + return json(['success'=>false, 'res'=>'不支持当前操作']); + } public function return_empty(){ return ''; diff --git a/app/script/convert.sh b/app/script/convert.sh index c0e030f..a22d314 100644 --- a/app/script/convert.sh +++ b/app/script/convert.sh @@ -2,7 +2,7 @@ Linux_Version="8.0.1" Windows_Version="7.9.0" -Btm_Version="2.2.5" +Btm_Version="2.2.8" FILES=( public/install/src/panel6.zip diff --git a/install.sql b/install.sql index bfc252f..dd5eb7a 100644 --- a/install.sql +++ b/install.sql @@ -18,9 +18,9 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES ('new_version_win', '7.9.0'), ('update_msg_win', '暂无更新日志'), ('update_date_win', '2023-07-20'), -('new_version_btm', '2.2.5'), +('new_version_btm', '2.2.8'), ('update_msg_btm', '暂无更新日志'), -('update_date_btm', '2023-07-06'), +('update_date_btm', '2023-08-04'), ('updateall_type', '0'), ('syskey', 'UqP94LtI8eWAIgCP'); diff --git a/public/install/install_6.0.sh b/public/install/install_6.0.sh index 566783b..5af1d49 100644 --- a/public/install/install_6.0.sh +++ b/public/install/install_6.0.sh @@ -421,12 +421,34 @@ Install_Deb_Pack(){ Get_Versions(){ redhat_version_file="/etc/redhat-release" deb_version_file="/etc/issue" + + if [[ $(grep Anolis /etc/os-release) ]] && [[ $(grep VERSION /etc/os-release|grep 8.8) ]];then + if [ -f "/usr/bin/yum" ];then + os_type="anolis" + os_version="8" + return + fi + fi + if [ -f $redhat_version_file ];then os_type='el' is_aliyunos=$(cat $redhat_version_file|grep Aliyun) if [ "$is_aliyunos" != "" ];then return fi + + if [[ $(grep "Alibaba Cloud" /etc/redhat-release) ]] && [[ $(grep al8 /etc/os-release) ]];then + os_type="ali-linux-" + os_version="al8" + return + fi + + if [[ $(grep "TencentOS Server" /etc/redhat-release|grep 3.1) ]];then + os_type="TencentOS-" + os_version="3.1" + return + fi + os_version=$(cat $redhat_version_file|grep CentOS|grep -Eo '([0-9]+\.)+[0-9]+'|grep -Eo '^[0-9]') if [ "${os_version}" = "5" ];then os_version="" @@ -763,14 +785,16 @@ Set_Bt_Panel(){ auth_path=$(cat /dev/urandom | head -n 16 | md5sum | head -c 8) echo "/${auth_path}" > ${admin_auth} chmod -R 700 $pyenv_path/pyenv/bin + btpip install docxtpl==0.16.7 /www/server/panel/pyenv/bin/pip3 install pymongo /www/server/panel/pyenv/bin/pip3 install psycopg2-binary /www/server/panel/pyenv/bin/pip3 install flask -U /www/server/panel/pyenv/bin/pip3 install flask-sock + btpip install simple-websocket==0.10.0 auth_path=$(cat ${admin_auth}) cd ${setup_path}/server/panel/ if [ "$SET_SSL" == true ]; then - btpip install -I pyOpenSSl + btpip install -I pyOpenSSl 2>/dev/null btpython /www/server/panel/tools.py ssl fi /etc/init.d/bt start @@ -1003,18 +1027,20 @@ fi echo > /www/server/panel/data/bind.pl echo -e "==================================================================" echo -e "\033[32mCongratulations! Installed successfully!\033[0m" -echo -e "==================================================================" -echo "外网面板地址: ${HTTP_S}://${getIpAddress}:${panelPort}${auth_path}" -echo "内网面板地址: ${HTTP_S}://${LOCAL_IP}:${panelPort}${auth_path}" -echo -e "username: $username" -echo -e "password: $password" -echo -e "\033[33mIf you cannot access the panel,\033[0m" -echo -e "\033[33mrelease the following panel port [${panelPort}] in the security group\033[0m" -echo -e "\033[33m若无法访问面板,请检查防火墙/安全组是否有放行面板[${panelPort}]端口\033[0m" -if [ "${HTTP_S}" == "https" ];then - echo -e "\033[33m因已开启面板自签证书,访问面板会提示不匹配证书,请参考以下链接配置证书\033[0m" - echo -e "\033[33mhttps://www.bt.cn/bbs/thread-105443-1-1.html\033[0m" -fi +echo -e "========================面板账户登录信息==========================" +echo -e "" +echo -e " 外网面板地址: ${HTTP_S}://${getIpAddress}:${panelPort}${auth_path}" +echo -e " 内网面板地址: ${HTTP_S}://${LOCAL_IP}:${panelPort}${auth_path}" +echo -e " username: $username" +echo -e " password: $password" +echo -e " " +echo -e "=========================打开面板前请看===========================" +echo -e "" +echo -e " 【云服务器】请在安全组放行 $panelPort 端口" +echo -e " 因默认启用自签证书https加密访问,浏览器将提示不安全" +echo -e " 点击【高级】-【继续访问】或【接受风险并继续】访问" +echo -e " 教程:https://www.bt.cn/bbs/thread-117246-1-1.html" +echo -e "" echo -e "==================================================================" endTime=`date +%s` diff --git a/public/install/install_btmonitor.sh b/public/install/install_btmonitor.sh index 778c8a8..aeba392 100644 --- a/public/install/install_btmonitor.sh +++ b/public/install/install_btmonitor.sh @@ -215,6 +215,7 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install backports.lzma $pyenv_path/pyenv/bin/pip install pandas $pyenv_path/pyenv/bin/pip install msgpack + $pyenv_path/pyenv/bin/pip install simple-websocket==0.10.0 fi source $pyenv_path/pyenv/bin/activate chmod -R 700 $pyenv_path/pyenv/bin @@ -274,6 +275,7 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install backports.lzma $pyenv_path/pyenv/bin/pip install pandas $pyenv_path/pyenv/bin/pip install msgpack + $pyenv_path/pyenv/bin/pip install simple-websocket==0.10.0 if [ ! -f $pyenv_path/pyenv/bin/python ];then rm -f $pyenv_file Red_Error "ERROR: Install python env fielded." "ERROR: 下载堡塔云监控主控端运行环境失败,请尝试重新安装!" @@ -331,6 +333,7 @@ Install_Python_Lib(){ $pyenv_path/pyenv/bin/pip install backports.lzma $pyenv_path/pyenv/bin/pip install pandas $pyenv_path/pyenv/bin/pip install msgpack + $pyenv_path/pyenv/bin/pip install simple-websocket==0.10.0 source $pyenv_path/pyenv/bin/activate is_gevent=$($python_bin -m gevent 2>&1|grep -oE package) @@ -407,7 +410,13 @@ EOF chmod +x $monitor_path/BT-MONITOR chmod +x $monitor_path/tools.py wget -O /etc/init.d/btm ${download_Url}/init/btmonitor.init -t 5 -T 10 - # \cp -r $monitor_path/init.sh /etc/init.d/btm + tmp_size=$(du -b "/etc/init.d/btm"|awk '{print $1}') + if [ ${tmp_size} == 0 ]; then + \cp -r $monitor_path/init.sh /etc/init.d/btm + fi + if [ ! -f "/etc/init.d/btm" ];then + \cp -r $monitor_path/init.sh /etc/init.d/btm + fi chmod +x /etc/init.d/btm ln -sf /etc/init.d/btm /usr/bin/btm diff --git a/public/install/src/bt-monitor-2.2.5.zip b/public/install/src/bt-monitor-2.2.8.zip similarity index 73% rename from public/install/src/bt-monitor-2.2.5.zip rename to public/install/src/bt-monitor-2.2.8.zip index 81b7997..a8adb87 100644 Binary files a/public/install/src/bt-monitor-2.2.5.zip and b/public/install/src/bt-monitor-2.2.8.zip differ diff --git a/public/install/src/panel6.zip b/public/install/src/panel6.zip index 20a43e5..851220b 100644 Binary files a/public/install/src/panel6.zip and b/public/install/src/panel6.zip differ diff --git a/public/install/update/LinuxPanel-8.0.1.zip b/public/install/update/LinuxPanel-8.0.1.zip index 25e7895..b88f2ae 100644 Binary files a/public/install/update/LinuxPanel-8.0.1.zip and b/public/install/update/LinuxPanel-8.0.1.zip differ diff --git a/public/install/update6.sh b/public/install/update6.sh index fa488cd..d963061 100644 --- a/public/install/update6.sh +++ b/public/install/update6.sh @@ -42,7 +42,7 @@ download_Url=$NODE_URL setup_path=/www version=$(curl -Ss --connect-timeout 5 -m 2 $Btapi_Url/api/panel/get_version) if [ "$version" = '' ];then - version='7.9.9' + version='8.0.1' fi armCheck=$(uname -m|grep arm) if [ "${armCheck}" ];then diff --git a/public/install/update_panel.sh b/public/install/update_panel.sh index 8bc494b..a2dbacf 100644 --- a/public/install/update_panel.sh +++ b/public/install/update_panel.sh @@ -78,7 +78,7 @@ install_pack(){ if [ -f /usr/bin/yum ];then yum install libcurl-devel libffi-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y else - apt install libcurl4-openssl-dev net-tools swig build-essential libffi-dev zlib1g.dev libbz2-dev libssl-dev libncurses-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libdb++-dev libpcap-dev xz-utils -y + apt install libcurl4-openssl-dev net-tools swig build-essential libffi-dev zlib1g-dev libbz2-dev libssl-dev libncurses-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libdb++-dev libpcap-dev xz-utils -y fi } diff --git a/public/static/file/kaixin.zip b/public/static/file/kaixin.zip index 5e0f213..192df4d 100644 Binary files a/public/static/file/kaixin.zip and b/public/static/file/kaixin.zip differ diff --git a/public/win/panel/panel_7.9.0.zip b/public/win/panel/panel_7.9.0.zip index f63897e..6dfee10 100644 Binary files a/public/win/panel/panel_7.9.0.zip and b/public/win/panel/panel_7.9.0.zip differ diff --git a/route/app.php b/route/app.php index 23a2be7..e1e816c 100644 --- a/route/app.php +++ b/route/app.php @@ -21,6 +21,7 @@ Route::any('/bt_monitor/latest_version', 'api/btm_latest_version'); Route::group('authorization', function () { Route::post('/login', 'api/authorization_login'); Route::post('/info', 'api/authorization_info'); + Route::post('/info_v2', 'api/authorization_info'); Route::miss('api/return_error'); }); @@ -101,6 +102,8 @@ Route::group('api', function () { Route::get('/panel/get_beta_logs', 'api/get_beta_logs'); Route::get('/wpanel/get_beta_logs', 'api/get_beta_logs'); + Route::post('/v2/common_v1_authorization/get_pricing', 'api/return_error2'); + Route::any('/bt_waf/getSpiders', 'api/btwaf_getspiders'); Route::miss('api/return_error'); diff --git a/wiki/btmonitor.md b/wiki/btmonitor.md index d930f2a..12147e8 100644 --- a/wiki/btmonitor.md +++ b/wiki/btmonitor.md @@ -10,9 +10,9 @@ 极少数文件解密失败是正常现象可无视 -- 全局搜索替换 https://api.bt.cn => http://www.example.com(需排除/bt_monitor/latest_agent_version) +- 全局搜索替换 https://api.bt.cn => http://www.example.com(需排除/bt_monitor/latest_agent_version、/bt_monitor/ip_info) -- 全局搜索替换 https://www.bt.cn/api/ => http://www.example.com/api/(需排除/panel/get_ip_info) +- 全局搜索替换 https://www.bt.cn/api/ => http://www.example.com/api/ - core/include/public.py 在