Created
June 15, 2020 12:57
-
-
Save c4mx/15afaa6644e60619d089506799bacce2 to your computer and use it in GitHub Desktop.
Enable monitor mode for RTL8814AU
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
#!/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