A modern, fast, and feature-rich traceroute tool written in Python. It supports both IPv4 and IPv6, provides real-time jitter statistics, and includes IP geolocation.
- Interactive UI: A sleek
curses-based interface that respects your terminal theme (transparent background). - Dual Stack: Smart A/AAAA record resolution with a priority for IPv4 (configurable via
-6). - Jitter Statistics: Displays real-time average RTT and standard deviation (
avg ms ± sd) for every hop. - Smart Path Discovery: Automatically hides redundant trailing hops once the target is reached.
- Multi-IP Support: Handles multiple IP addresses per TTL hop with a clean multi-line display.
- Geolocation: Integrated IP geolocation using the IPIP (17mon) database.
- Streaming Mode: Use the
-cflag to print every individual ICMP response in real-time.
The tool requires raw socket access to send/receive ICMP packets.
Grant raw socket capabilities to the Python interpreter:
sudo setcap cap_net_raw+ep $(which python3)Run with sudo or an equivalent privilege escalator:
sudo python cli.py google.comTo enable location lookups, ensure 17monipdb.dat is present in the project directory.
# Interactive mode (Continuous updates)
python cli.py google.com
# Force IPv6 trace
python cli.py -6 google.com
# Streaming/Batch mode (Send N pings per TTL and exit)
python cli.py -c 5 jd.comtarget: The host or IP to trace.-c,--count: (Optional) Number of samples per TTL. If specified, the tool prints every ICMP and exits when done.-6: (Optional) Force IPv6 resolution and traceroute.
cli.py: The user interface, handling both Curses and streaming output.core.py: The high-performance traceroute engine (ICMP packet construction, IPv4/v6 parsing, and path management).ipip.py: IPIP database lookup utility.
Created as a lightweight, Pythonic alternative to MTR.