Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brettalton/2a28cf6f9a4ef82a0ca094ab2900f3bd to your computer and use it in GitHub Desktop.
Save brettalton/2a28cf6f9a4ef82a0ca094ab2900f3bd to your computer and use it in GitHub Desktop.
WLAN SSID Sniffer in Python using Scapy
#!/usr/bin/env python
from __future__ import print_function
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment