Rename INTERFACE to LISTEN_INTERFACE for consistency and update settings.env.default
This commit is contained in:
parent
ae55141efe
commit
2ff5a192ca
2 changed files with 4 additions and 3 deletions
|
@ -8,7 +8,7 @@ from dotenv import load_dotenv
|
||||||
|
|
||||||
# === Load ENV ===
|
# === Load ENV ===
|
||||||
load_dotenv(dotenv_path=os.path.expanduser("~/wifi_test/settings.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 ===
|
# === Globals ===
|
||||||
clients_per_channel = defaultdict(set)
|
clients_per_channel = defaultdict(set)
|
||||||
|
@ -64,13 +64,13 @@ def stop_sniff(signum, frame):
|
||||||
# === Main ===
|
# === Main ===
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
signal.signal(signal.SIGINT, stop_sniff)
|
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
|
# Start sniffing in a background thread
|
||||||
try:
|
try:
|
||||||
while running:
|
while running:
|
||||||
sniff(
|
sniff(
|
||||||
iface=INTERFACE,
|
iface=LISTEN_INTERFACE,
|
||||||
prn=handle_packet,
|
prn=handle_packet,
|
||||||
store=False,
|
store=False,
|
||||||
monitor=True,
|
monitor=True,
|
||||||
|
|
|
@ -6,6 +6,7 @@ NUM_SAMPLES=5
|
||||||
TIME_BETWEEN=15m
|
TIME_BETWEEN=15m
|
||||||
LEAD_TIME=90s
|
LEAD_TIME=90s
|
||||||
INTERFACE=wlan0
|
INTERFACE=wlan0
|
||||||
|
LISTEN_INTERFACE=wlan1
|
||||||
PING_COUNT=25
|
PING_COUNT=25
|
||||||
PING_TARGET=1.1.1.1
|
PING_TARGET=1.1.1.1
|
||||||
BANDWIDTH=
|
BANDWIDTH=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue