A small nifty tool I quickly threw together using Claude AI to trace a visual path to a given IP/Domain
- Traces network paths to any IP or domain
- Provides geolocation data for each hop (city, country, ISP)
- Generates interactive maps showing the packet's journey
- Supports both IPv4 and IPv6
A shell.nix
is provided for Nix users. Simply run:
nix-shell
pip install -r requirements.txt
Basic usage:
python tracemap.py google.com
Options:
python tracemap.py [destination] [options]
Options:
--no-map Disable map visualization
--output/-o FILE Save results to a file
Traceroute Results:
==================
Hop 1: 192.168.1.1
Location: Boston, Massachusetts, United States
ISP: Comcast Cable Communications
Coordinates: 42.3601, -71.0589
Hop 2: 96.120.67.249
Location: Boston, Massachusetts, United States
ISP: Comcast Cable Communications
Coordinates: 42.3601, -71.0589
...
An interactive HTML map is automatically generated and opened in your default browser.
- Python 3.7+
- folium (map visualization)
- requests (IP geolocation)
- traceroute/tracert (system utility)
The geolocation data and visualized paths are approximations:
- IP geolocation databases may not always reflect the true physical location of routers
- Some hops may be hidden or not respond to traceroute
- The actual physical cable paths often differ from the straight lines shown on the map
- Submarine cables and internet exchange points may not be visible in the trace
- IP geolocation provided by ip-api.com
- Map visualization powered by Folium
- Initially developed with assistance from Anthropic's Claude