From 330a1ae513be19b0e6a3480310828053b6687dd7 Mon Sep 17 00:00:00 2001 From: Tux Date: Sat, 20 Sep 2025 12:14:38 +0200 Subject: [PATCH] add rfkill unlocking --- mon | 6 +++++- wpe | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mon b/mon index 28c05d8..ce6d650 100755 --- a/mon +++ b/mon @@ -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 diff --git a/wpe b/wpe index 3ff2d1c..86c3576 100755 --- a/wpe +++ b/wpe @@ -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