This file contains hidden or 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 "可正常使用" |
This file contains hidden or 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
| #!/bin/bash | |
| # 下载并写入 ~/.geek_prompt.sh | |
| cat > ~/.geek_prompt.sh <<"EOF" | |
| #!/bin/bash | |
| # 定义颜色(增强对比度) | |
| RESET="\[\033[0m\]" | |
| FG_WHITE="\[\033[1;97m\]" # 亮白色(用户名@主机) | |
| FG_BLUE="\[\033[1;94m\]" # 亮蓝色(路径) |
OlderNewer