add rfkill unlocking

This commit is contained in:
Tux 2025-09-20 12:14:38 +02:00
parent eb0869f0fd
commit 330a1ae513
2 changed files with 8 additions and 1 deletions

6
mon
View File

@ -16,6 +16,7 @@ EOF
}
iface="wlan1"
channel="1"
# Check if script is run as root
if [[ $EUID -ne 0 ]]; then
@ -75,6 +76,9 @@ fi
fi
fi
# Unlock all interfaces
rfkill unblock all || exit 1
echo "[+] Preparing $iface for monitor mode..."
nmcli device set "$iface" managed no
ip link set "$iface" down
@ -95,7 +99,7 @@ fi
TIMESTAMP="$(date '+%Y-%m-%d_%H-%M-%S')"
# Start monitoring
if ! airodump-ng --channel $channel -w wpa-${TIMESTAMP} "$iface"; then
if ! airodump-ng --channel $channel -w wpa-"${TIMESTAMP}" "$iface"; then
echo "[!] Failed to start airodump-ng. Exiting."
exit 1
fi

3
wpe
View File

@ -75,6 +75,9 @@ fi
fi
fi
# Unlock all interfaces
rfkill unblock all || exit 1
echo "[+] Preparing $iface for hostapd-wpe..."
nmcli device set "$iface" managed no
ip link set "$iface" down