Skip to content

Instantly share code, notes, and snippets.

@3isenHeiM
Last active December 9, 2020 10:02
Show Gist options
  • Save 3isenHeiM/c502667f7234e06146f560e1526aa469 to your computer and use it in GitHub Desktop.
Save 3isenHeiM/c502667f7234e06146f560e1526aa469 to your computer and use it in GitHub Desktop.
Enable monitor mode on a wireless interface
#!/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