Last active
December 9, 2020 10:02
-
-
Save 3isenHeiM/c502667f7234e06146f560e1526aa469 to your computer and use it in GitHub Desktop.
Enable monitor mode on a wireless interface
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
#!/bin/bash | |
# Turn an interface in monitor mode (without airmon-ng). | |
# argument : wireless interface name | |
# | |
# Example : | |
# ./monitor.sh wlan1 | |
IFACE=$1 | |
if [[ $IFACE != wlan* ]] | |
then | |
echo "Wrong interface name : $IFACE" | |
exit 1 | |
fi | |
ip link set $IFACE down | |
iw $IFACE set monitor none | |
ip link set $IFACE up | |
iwconfig $IFACE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment