autoBestTrace.sh 963 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # IPv4 免费地址库 & 客户端工具
  3. # 包括IPv4 免费数据库及相关、IP库解析代码第三方版、BestTrace 软件下载、浏览器扩展
  4. # https://www.ipip.net/download.html#ip_trace
  5. # https://cdn.ipip.net/17mon/besttrace4linux.zip
  6. # install besttrace
  7. if [ ! -f "besttrace" ]; then
  8. apt -y install unzip
  9. wget https://cdn.ipip.net/17mon/besttrace4linux.zip
  10. unzip besttrace4linux.zip
  11. chmod +x besttrace
  12. mv besttrace /usr/bin/besttrace
  13. rm besttrace* -rf
  14. fi
  15. ## start to use besttrace
  16. next() {
  17. printf "%-70s\n" "-" | sed 's/\s/-/g'
  18. }
  19. clear
  20. next
  21. ip_list=(14.215.116.1 101.95.120.109 117.28.254.129 113.207.32.65 119.6.6.6 183.192.160.3 183.221.253.100 202.112.14.151)
  22. ip_addr=(广州电信 上海电信 厦门电信 重庆联通 四川联通 上海移动 成都移动 成都教育网)
  23. # ip_len=${#ip_list[@]}
  24. for i in {0..7}
  25. do
  26. echo ${ip_addr[$i]}
  27. besttrace -q 1 ${ip_list[$i]}
  28. next
  29. done