#!/usr/bin/env python
import pcap
p = pcap.pcapObject()
dev = "eth0"
dsp = open("/dev/dsp", "wb")
def dump_packet(pktlen, data, timestamp):
if not data:
print "Huh? no data?"
print "Length %d" % pktlen
print "timestamp:", timestamp
print
else:
dsp.write(data)
print "muahahahaha"
p.open_live(dev, 1600, 0, 100)
while 1:
p.dispatch(1, dump_packet)
Fun stuff
