Traceroute in 15 lines of code using Scapy
jvns.ca
jvns.ca
see also:
http://cluepon.net/ras/traceroute.pdf and http://blog.cachefly.com/2012/02/15/understanding-traceroute...
pkt = IP(dst=target, ttl=(4,25),id=RandShort())/TCP(flags=0x2)
This single pkt object describes 22 IP packets, each with a TTL from 4 to 24 inclusive. Each IP packet encapsulates a TCP packet with the SYN flag set.http://www.secdev.org/projects/scapy/doc/usage.html#tcp-trac...