Skip to content

Instantly share code, notes, and snippets.

@nmarley
Created July 18, 2013 01:43
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nmarley/6026085 to your computer and use it in GitHub Desktop.
Save nmarley/6026085 to your computer and use it in GitHub Desktop.
OSX can capture WiFi packets using only tcpdump (and without needing a clunky interface such as KisMAC). Used for testing security strength of home WiFi setup.
#! /bin/bash
# This is for Mac OSX only.
# =============================================
# explanation of arguments used with 'tcpdump':
# =============================================
# -y IEEE802_11_RADIO => makes it capture __WIFI__ packets, turns resultant file
# into a dump which can be read by aircrack-ng, etc.
#
# -I => puts interface into monitor mode (required to capture packets)
#
# -i en1 => sets Airport card as the wireless device (pretty much required for
# OSX unless you have a different wireless card)
#
# -w datadump.pcap => can be any filename. will write packets to a .pcap file
# (instead of STDOUT)
# =============================================
tcpdump -y 'IEEE802_11_RADIO' -I -i en1 -w datadump.pcap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment