Rename INTERFACE to LISTEN_INTERFACE for consistency and update settings.env.default

This commit is contained in:
Yaro Kasear 2025-04-30 14:09:26 -05:00
parent ae55141efe
commit 2ff5a192ca
2 changed files with 4 additions and 3 deletions

View file

@ -8,7 +8,7 @@ from dotenv import load_dotenv
# === Load ENV ===
load_dotenv(dotenv_path=os.path.expanduser("~/wifi_test/settings.env"))
INTERFACE = os.getenv("INTERFACE", "wlan0")
LISTEN_INTERFACE = os.getenv("LISTEN_INTERFACE", "wlan0")
# === Globals ===
clients_per_channel = defaultdict(set)
@ -64,13 +64,13 @@ def stop_sniff(signum, frame):
# === Main ===
if __name__ == "__main__":
signal.signal(signal.SIGINT, stop_sniff)
print(f"[+] Listening on interface {INTERFACE} (press Ctrl+C to stop)")
print(f"[+] Listening on interface {LISTEN_INTERFACE} (press Ctrl+C to stop)")
# Start sniffing in a background thread
try:
while running:
sniff(
iface=INTERFACE,
iface=LISTEN_INTERFACE,
prn=handle_packet,
store=False,
monitor=True,

View file

@ -6,6 +6,7 @@ NUM_SAMPLES=5
TIME_BETWEEN=15m
LEAD_TIME=90s
INTERFACE=wlan0
LISTEN_INTERFACE=wlan1
PING_COUNT=25
PING_TARGET=1.1.1.1
BANDWIDTH=