This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ $(curl -sS https://chat.openai.com/ -I | grep "text/plain") != "" ]] | |
then | |
echo "IP被BAN" | |
else | |
iso2_code=$(curl -sS https://chat.openai.com/cdn-cgi/trace | grep "loc=" | awk -F= '{print $2}') | |
country=$(curl -sS https://raw.githubusercontent.com/lukes/ISO-3166-Countries-with-Regional-Codes/master/all/all.csv | grep ",$iso2_code," | awk -F, '{print $1}') | |
country=$(echo ${country/\"/}) | |
if [[ $(curl -sS "https://openaiapi-site.azureedge.net/public-assets/d/7f4419c385/static/js/main.3133adcb.js" | grep "\"${country}\"") != "" ]] | |
then | |
echo "可正常使用" |
OlderNewer