Created
June 29, 2023 14:03
-
-
Save therokh/1f69a05723cc69f56c8036330063d265 to your computer and use it in GitHub Desktop.
Put all WLAN interfaces into monitor mode
This file contains hidden or 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 | |
for interface in $(iw dev | grep wlan | grep -v mon | awk '{ print $2 }') | |
do | |
mon_interface="${interface}mon" | |
echo "Interface: $interface" | |
echo "Monitor interface: $mon_interface" | |
ip link set ${interface} down | |
iw dev ${interface} set type monitor | |
ip link set ${interface} name "${mon_interface}" | |
ip link set "${mon_interface}" up | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment