Skip to content

Instantly share code, notes, and snippets.

@philipperemy
Last active June 22, 2018 02:37
Show Gist options
  • Save philipperemy/c12b85cb291e6323c678b7b1348de10c to your computer and use it in GitHub Desktop.
Save philipperemy/c12b85cb291e6323c678b7b1348de10c to your computer and use it in GitHub Desktop.
Mac OS - extract handshakes from CAP files of airport command
# On Mac OSX
# Will run AIRODUMP scan of all BSSIDs
# sudo airport -s
# Will run AIRODUMP sniff on channel 11
# sudo airport en0 sniff 11
# Atm, I can't find how to sniff on all channels at the same time.
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit
fi
echo "input cap file is $1"
rm *.cap
rm small_cap*
tcpdump -r $1 -w small_cap -C 2
for f in small_cap*; do
echo "Processing ... File -> $f"
../aircrack-ng/src/wpaclean $f.cap $f > /dev/null
done
mergecap -a -w output_file *.cap -F pcap
rm *.cap
rm small_cap*
mv output_file output_file.cap
aircrack-ng output_file.cap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment