Skip to content

Instantly share code, notes, and snippets.

@securitytube
Created April 2, 2013 12:49

Revisions

  1. securitytube created this gist Apr 2, 2013.
    16 changes: 16 additions & 0 deletions ssid-sniffer-scapy-python.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/usr/bin/env python

    from scapy.all import *

    ap_list = []

    def PacketHandler(pkt) :

    if pkt.haslayer(Dot11) :
    if pkt.type == 0 and pkt.subtype == 8 :
    if pkt.addr2 not in ap_list :
    ap_list.append(pkt.addr2)
    print "AP MAC: %s with SSID: %s " %(pkt.addr2, pkt.info)


    sniff(iface="mon0", prn = PacketHandler)