Skip to content

Instantly share code, notes, and snippets.

@protoEvangelion
Created March 16, 2023 21:56
Show Gist options
  • Save protoEvangelion/9741218178646bcd4d641a0f9714660a to your computer and use it in GitHub Desktop.
Save protoEvangelion/9741218178646bcd4d641a0f9714660a to your computer and use it in GitHub Desktop.
Traceroute geolite2
traceroute npmjs.com | awk '{print $3}' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | while read p; do u=$(mmdblookup --file ./GeoLite2-City.mmdb --ip "$p" country names en | awk -F'"' '{print $2}'); echo "$p, $u"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment