Last active
December 15, 2015 15:58
-
-
Save luuhq/5285292 to your computer and use it in GitHub Desktop.
A two-line Wi-Fi SSID Sniffer in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from original import CallMe | |
CallMe() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.all import * | |
ap_list = [] | |
def PacketHandler(pkt): | |
if pkt.haslayer(Dot11) and 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) | |
def CallMe(): | |
sniff(iface="mon0", prn=PacketHandler) | |
# Original post: http://hackoftheday.securitytube.net/2013/03/wi-fi-sniffer-in-10-lines-of-python.html | |
# I can add more comments | |
# and | |
# random lines here | |
# because apparently this file doesn't count! | |
# Happy April 1st! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment