首先看到了
serv00一键使用xray搭建trojan协议 - 软件分享 - LINUX DO
然后就想看看serv00的IP以及解锁情况
使用 一个测试ChatGPT客户端IP解锁的脚本 - 软件分享 - LINUX DO发现报错
于是让Claude3.5帮忙改了一下
#!/bin/sh
# 颜色定义
red='\033[0;31m'
bblue='\033[0;34m'
yellow='\033[0;33m'
green='\033[0;32m'
plain='\033[0m'
# 颜色函数
red() { printf "${red}%s${plain}\n" "$1"; }
green() { printf "${green}%s${plain}\n" "$1"; }
yellow() { printf "${yellow}%s${plain}\n" "$1"; }
blue() { printf "\033[36m%s${plain}\n" "$1"; }
white() { printf "\033[37m%s${plain}\n" "$1"; }
bblue() { printf "${bblue}%s${plain}\n" "$1"; }
rred() { printf "\033[35m%s${plain}\n" "$1"; }
chatgpt4() {
gpt1=$(curl -s4 https://chat.openai.com 2>&1)
gpt2=$(curl -s4 https://android.chat.openai.com 2>&1)
}
chatgpt6() {
gpt1=$(curl -s6 https://chat.openai.com 2>&1)
gpt2=$(curl -s6 https://android.chat.openai.com 2>&1)
}
checkgpt() {
case "$gpt1" in
*location*)
case "$gpt2" in
*VPN*) chat='遗憾,当前IP仅解锁ChatGPT网页,未解锁客户端' ;;
*Request*) chat='恭喜,当前IP完整解锁ChatGPT (网页+客户端)' ;;
*) chat='杯具,当前IP无法解锁ChatGPT服务' ;;
esac
;;
*) chat='杯具,当前IP无法解锁ChatGPT服务' ;;
esac
}
nf4() {
UA_Browser="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
result=$(curl -4fsL --user-agent "${UA_Browser}" --write-out %{http_code} --output /dev/null --max-time 10 "https://www.netflix.com/title/70143836" 2>&1)
case "$result" in
404) NF="遗憾,当前IP仅解锁Netflix自制剧" ;;
403) NF="杯具,当前IP不能看Netflix" ;;
200) NF="恭喜,当前IP完整解锁Netflix非自制剧" ;;
*) NF="死心吧,Netflix不服务当前IP地区" ;;
esac
}
nf6() {
UA_Browser="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
result=$(curl -6fsL --user-agent "${UA_Browser}" --write-out %{http_code} --output /dev/null --max-time 10 "https://www.netflix.com/title/70143836" 2>&1)
case "$result" in
404) NF="遗憾,当前IP仅解锁Netflix自制剧" ;;
403) NF="杯具,当前IP不能看Netflix" ;;
200) NF="恭喜,当前IP完整解锁Netflix非自制剧" ;;
*) NF="死心吧,Netflix不服务当前IP地区" ;;
esac
}
v4v6() {
v4=$(curl -s4m5 icanhazip.com -k)
v6=$(curl -s6m5 icanhazip.com -k)
}
v4v6
UA_Browser="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
if [ -n "$v6" ]; then
nonf=$(curl -s6 --user-agent "${UA_Browser}" "http://ip-api.com/json/$v6?lang=zh-CN" -k | sed -n 's/.*"country":"\([^"]*\).*/\1/p')
nf6
chatgpt6
checkgpt
v6Status=$(printf "IPV6地址:%s %s\n Netflix: %s\n ChatGPT: %s" "$(blue "$v6")" "$(blue "$nonf")" "$(blue "$NF")" "$(blue "$chat")")
else
v6Status=$(printf "IPV6地址:%s" "$(red "不存在IPV6地址")")
fi
if [ -n "$v4" ]; then
nonf=$(curl -s4 --user-agent "${UA_Browser}" "http://ip-api.com/json/$v4?lang=zh-CN" -k | sed -n 's/.*"country":"\([^"]*\).*/\1/p')
nf4
chatgpt4
checkgpt
v4Status=$(printf "IPV4地址:%s %s\n Netflix: %s\n ChatGPT: %s" "$(blue "$v4")" "$(blue "$nonf")" "$(blue "$NF")" "$(blue "$chat")")
else
v4Status=$(printf "IPV4地址:%s" "$(red "不存在IPV4地址")")
fi
echo "$v4Status"
echo "$v6Status"
效果如下:
