autoBestTrace.sh 901 B

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