Guest User

DotA 2 Ping Tester

a guest
Dec 23rd, 2013
7,236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.45 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #Dota 2 Ping Tester edited by FranzMeister (original code from PlanetSide 2 Ping Tester by Sh4rkill3rSG)
  4. #IPs copied from http://thebinaryrealm.blogspot.in/2013/10/list-of-ip-addresses-of-all-dota2.html
  5. #Bash version by Regimardyl (http://reddit.com/u/Regimardyl)
  6.  
  7. #Increasing this number improves accuracy, but makes the script take more time aswell
  8. PINGNUMBER=3
  9.  
  10. echo DOTA 2 PING TESTER by FranzMeister 0.1 December 2013
  11. echo Ported to bash by Regimardyl
  12.  
  13. avgping () {
  14.     echo $( ping -c ${PINGNUMBER} $1 | tail -1 | awk '{print $4}' | cut -d '/' -f 2 ) "ms"
  15. }
  16.  
  17. hline () {
  18.     echo ==================================
  19. }
  20.  
  21. echo " (SEA) Singapore\t" $( avgping "103.28.54.1" ) &
  22. echo " (SEA) Singapore\t" $( avgping "103.10.124.1" ) &
  23. echo " (EU West) Luxembourg\t" $( avgping "146.66.152.1" ) &
  24. echo " (EU East) Vienna\t" $( avgping "146.66.155.1" ) &
  25. echo " (US West) Washington\t" $( avgping "192.69.96.1" ) &
  26. echo " (US East) Sterling\t" $( avgping "208.78.164.1" ) &
  27. echo " (AUS) Sydney\t\t" $( avgping "103.10.125.1" ) &
  28. echo " (SE) Stockholm\t\t" $( avgping "146.66.156.1" ) &
  29. echo " (BR) ??\t\t" $( avgping "209.197.29.1" ) &
  30. echo " (BR) ??\t\t" $( avgping "209.197.25.1" ) &
  31. echo " (SA) Cape Town\t\t" $( avgping "197.80.200.1" ) &
  32. echo " (SA) Cape Town\t\t" $( avgping "196.38.180.1" ) &
  33. wait
  34. echo "\n\n\nThe listed IPs are of one among the servers used in a cluster for all regions, which is enough to approximately determine the ping."
Advertisement
Add Comment
Please, Sign In to add comment