Skip to content

Instantly share code, notes, and snippets.

@meeuw
Created February 17, 2015 20:27
Show Gist options
  • Save meeuw/935a4b961bc2fac1fef5 to your computer and use it in GitHub Desktop.
Save meeuw/935a4b961bc2fac1fef5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import radiotap as r, pcap
pc = pcap.pcap(name='/tmp/monitor.pcap')
while 1:
tstamp, pkt = pc.next()
off, radiotap = r.radiotap_parse(pkt)
off, pkt = r.ieee80211_parse(pkt, off)
if 'type' in pkt and pkt['type'] == 0 and 'subtype' in pkt and pkt['subtype'] == 4:
if pkt['data'][0] != '\x01':
print radiotap
print `pkt['data'].split('\x01')[0]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment