diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2013-05-29 14:23:09 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2013-05-29 14:23:30 +0200 |
commit | 43e90ddb1115ca296ba2b79dad056e36d728ed89 (patch) | |
tree | baab36ba2240b6255a0a10e2df8b17adfa0f80ab /scapy | |
parent | 24b941f1fadce69def98c46ea03248f6d0bcee32 (diff) | |
download | scripts-43e90ddb1115ca296ba2b79dad056e36d728ed89.tar.gz scripts-43e90ddb1115ca296ba2b79dad056e36d728ed89.zip |
dumper
Diffstat (limited to 'scapy')
-rw-r--r-- | scapy/dumper.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scapy/dumper.py b/scapy/dumper.py new file mode 100644 index 0000000..bfd7c3a --- /dev/null +++ b/scapy/dumper.py @@ -0,0 +1,23 @@ +#!/usr/bin/python +# coding: utf-8 + +# $ sudo iw dev wlan0 interface add mon0 type monitor +# $ sudo ip link set dev mon0 up + +interface = "mon0" + +####################################################### +from scapy.all import * +import time + +t_prev = None + +def prn(p): + global t_prev + p.show() + if p.haslayer(Dot11Beacon): + if t_prev: + print time.time() - t_prev[0], p.timestamp - t_prev[1] + t_prev = [time.time(), p.timestamp] + +sniff(iface=interface,prn=prn) |