Skip to content

Instantly share code, notes, and snippets.

@pfcoperez
Last active May 17, 2018 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfcoperez/6c58017d63808afa59a1c80071115076 to your computer and use it in GitHub Desktop.
Save pfcoperez/6c58017d63808afa59a1c80071115076 to your computer and use it in GitHub Desktop.
# http://xmodulo.com/geographic-location-ip-address-command-line.html
for ip in $(traceroute -n 9.9.9.9 | awk '{print $2}' | tail -n +2); do echo "$ip -> $(geoiplookup $ip)"; done
for ip in $(traceroute -n www.google.es | awk '{print $2}' | tail -n +2); do curl ipinfo.io/$ip | jq .; echo ""; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment