Last active
July 29, 2016 09:03
-
-
Save tjdett/368ad9397e74034dc38a1d2928ea98e3 to your computer and use it in GitHub Desktop.
Find the server with lowest latency over HTTPS using nmap & xmlstarlet
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
#!/bin/sh | |
nmap -oX - -n -sn "$@" | xmlstarlet sel -t -m '//host' -v 'concat(times/@srtt, " ", hostnames/hostname/@name, " | |
")' | sort -n |
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
$ ./latency.sh www.google.com www.curtin.edu.au www.uq.edu.au mirror.aarnet.edu.au www.unud.ac.id www.oxford.ac.uk | |
884 www.uq.edu.au | |
1644 mirror.aarnet.edu.au | |
1756 www.google.com | |
64961 www.curtin.edu.au | |
221518 www.unud.ac.id | |
342378 www.oxford.ac.uk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment