c2-utopia/linux-receiver/monitor_on.sh

22 lines
290 B
Bash
Executable File

#!/bin/bash
dev=${1:-wlp3s0}
chan=${2:-1}
rmmod ath10k_pci
rmmod ath10k_core
systemctl stop NetworkManager
sleep 1
modprobe ath10k_core awmode=1 cryptmode=1
sleep 1
modprobe ath10k_pci
sleep 1
ifconfig $dev down
iwconfig $dev mode monitor
ifconfig $dev up
iwconfig $dev channel $chan