Last active
May 21, 2024 10:46
-
-
Save philipperemy/c12b85cb291e6323c678b7b1348de10c to your computer and use it in GitHub Desktop.
Mac OS - extract handshakes from CAP files of airport command
This file contains 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
# 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