Skip to content

Instantly share code, notes, and snippets.

@mwatts272
Last active December 20, 2015 20:49

Revisions

  1. mwatts272 revised this gist Aug 9, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion scapy-traceroute.py
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    from scapy.all import *

    if __name__ == "__main__":
    hosts = raw_input('Hostnames you would like to traceroute sepearated by a comma: ')
    hosts = raw_input('Hostnames you would like to traceroute sepearated by a comma: ')
    ttl = raw_input("Time To Live: ")
    if not ttl: ttl = 20
    traceroute([x.strip() for x in hosts.split(',')],maxttl=ttl)
  2. mwatts272 created this gist Aug 9, 2013.
    13 changes: 13 additions & 0 deletions scapy-traceroute.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #! /usr/bin/env python

    # Set log level to benefit from Scapy warnings
    import logging
    logging.getLogger("scapy").setLevel(1)

    from scapy.all import *

    if __name__ == "__main__":
    hosts = raw_input('Hostnames you would like to traceroute sepearated by a comma: ')
    ttl = raw_input("Time To Live: ")
    if not ttl: ttl = 20
    traceroute([x.strip() for x in hosts.split(',')],maxttl=ttl)