Skip to content

Instantly share code, notes, and snippets.

@c4mx
Created June 15, 2020 12:57
Show Gist options
  • Save c4mx/15afaa6644e60619d089506799bacce2 to your computer and use it in GitHub Desktop.
Save c4mx/15afaa6644e60619d089506799bacce2 to your computer and use it in GitHub Desktop.
Enable monitor mode for RTL8814AU
#!/usr/bin/env sh
# Enable monitor mode for RTL8814AU
if [ $# -lt 1 ]
then
echo "Usage: enable_monitor interface [channel]"
return
elif [ $# -eq 2 ]
then
ch=$2
fi
iface=$1
airmon-ng check kill
echo "[+] Setting $iface down..."
ip link set $iface down
sleep 1
echo "[+] Starting monitor mode on $iface..."
iw dev $iface set type monitor
sleep 3
[ ! -z "$ch" ] && echo "[+] Setting channel to $ch..." && iw dev $iface set channel $ch
sleep 1
echo "[+] Setting $iface up..."
ip link set $iface up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment