Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #TCP Traceroute with graphical output
- import sys
- from scapy import *
- conf.verb=0
- if len(sys.argv) != 2:
- print "Usage: ./tcp_tracert_graphical.py <target>"
- print "Where <target> is a website"
- sys.exit(1)
- target=sys.argv[1]
- res,unans = traceroute(["target"],dport=[80,443],maxttl=20,retry=-2)
- res.graph() # piped to ImageMagick's display program. Image below.
- res.graph(type="ps",target="| lp") # piped to postscript printer
- res.graph(target="> /tmp/target_graph.svg") # saved to file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement