Granted Wish: Traceroute pickling in scapy
A friend of mine sent in a script that worked for him.
import scapy, pickle
tr, un = scapy.traceroute(["www.harvard.edu"])
f = open("/tmp/pickle-out", "w")
p = pickle.Pickler(f)
f = open("/tmp/pickle-out", "r")
u = pickle.Unpickler(f)
tr = u.load()
print " Original tr:----------------------------"
I still couldn’t get this to work on my Ubuntu box. However in a later chat with my colleague Elphine I found out that Ubuntu had it’s own package for scapy. So I used apt-get to install scapy and this time it DID work. This is great since now I can start sticking objects into a database and move on to the next task of combining arbitrary traceroutes for the purposes of making graphs. I’m still curious why this didn’t work when I simply downloaded the scapy.py code and executed it. Once I get some working code I’ll post it here.
The Granted Wish: Traceroute pickling in scapy by Zeroday 01100100011010010, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 License.