Compare commits

..

4 Commits
3.2 ... 3.3

Author SHA1 Message Date
flucout
9438c64796 update 2025-05-26 21:49:50 +08:00
Flucont
acb842a883 Merge pull request #264 from Illustar0/main
feat: support get_malicious_ip for bt_waf
2025-04-17 20:11:53 +08:00
Illustar0
6785d259f6 feat: support get_malicious_ip for bt_waf 2025-04-14 11:18:16 +08:00
flucout
04560cd70c update 2025-04-04 20:05:14 +08:00
6 changed files with 47 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
Linux_Version="9.5.0"
Linux_Version="9.6.0"
Windows_Version="8.2.2"
Aapanel_Version="7.0.16"
Btm_Version="2.3.0"

View File

@@ -1232,7 +1232,40 @@ Set_Firewall(){
}
Get_Ip_Address(){
getIpAddress=""
getIpAddress=$(curl -sS --connect-timeout 10 -m 60 https://www.bt.cn/Api/getIpAddress)
#getIpAddress=$(curl -sS --connect-timeout 10 -m 60 https://www.bt.cn/Api/getIpAddress)
ipv4_address=""
ipv6_address=""
ipv4_address=$(curl -4 -sS --connect-timeout 4 -m 5 https://api.bt.cn/Api/getIpAddress 2>&1)
if [ -z "${ipv4_address}" ];then
ipv4_address=$(curl -4 -sS --connect-timeout 4 -m 5 https://www.bt.cn/Api/getIpAddress 2>&1)
if [ -z "${ipv4_address}" ];then
ipv4_address=$(curl -4 -sS --connect-timeout 4 -m 5 https://www.aapanel.com/api/common/getClientIP 2>&1)
fi
fi
IPV4_REGEX="^([0-9]{1,3}\.){3}[0-9]{1,3}$"
if ! [[ $ipv4_address =~ $IPV4_REGEX ]]; then
ipv4_address=""
fi
ipv6_address=$(curl -6 -sS --connect-timeout 4 -m 5 https://www.bt.cn/Api/getIpAddress 2>&1)
IPV6_REGEX="^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$"
if ! [[ $ipv6_address =~ $IPV6_REGEX ]]; then
ipv6_address=""
else
if [[ ! $ipv6_address =~ ^\[ ]]; then
ipv6_address="[$ipv6_address]"
fi
fi
if [ "${ipv4_address}" ];then
getIpAddress=$ipv4_address
elif [ "${ipv6_address}" ];then
getIpAddress=$ipv6_address
fi
if [ -z "${getIpAddress}" ] || [ "${getIpAddress}" = "0.0.0.0" ]; then
isHosts=$(cat /etc/hosts|grep 'www.bt.cn')
if [ -z "${isHosts}" ];then
@@ -1411,8 +1444,16 @@ echo -e "\033[32mCongratulations! Installed successfully!\033[0m"
echo -e "========================面板账户登录信息=========================="
echo -e ""
echo -e " 【云服务器】请在安全组放行 $panelPort 端口"
echo -e " 外网面板地址: ${HTTP_S}://${getIpAddress}:${panelPort}${auth_path}"
echo -e " 网面板地址: ${HTTP_S}://${LOCAL_IP}:${panelPort}${auth_path}"
if [ -z "${ipv4_address}" ] && [ -z "${ipv6_address}" ];then
echo -e " 网面板地址: ${HTTP_S}://SERVER_IP:${panelPort}${auth_path}"
fi
if [ "${ipv4_address}" ];then
echo -e " 外网ipv4面板地址: ${HTTP_S}://${ipv4_address}:${panelPort}${auth_path}"
fi
if [ "${ipv6_address}" ];then
echo -e " 外网ipv6面板地址: ${HTTP_S}://${ipv6_address}:${panelPort}${auth_path}"
fi
echo -e " 内网面板地址: ${HTTP_S}://${LOCAL_IP}:${panelPort}${auth_path}"
echo -e " username: $username"
echo -e " password: $password"
echo -e ""

Binary file not shown.

View File

@@ -0,0 +1 @@
{"hash": "c097e387cb3f2baf34a222191de7130bd878215ffa4ba8cef2d337e3466e6963", "update_time": "1747723203"}

View File

@@ -0,0 +1 @@
{"hash": "d869ee4b8bdcfae324c4fdef9ec647db4a1529e7f6890b8cb4693f40b8a24626", "update_time": "1748242787"}