From a951a5eb6206f5048d0caecd87a7c2c40770e043 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Wed, 16 Apr 2025 11:35:50 -0500 Subject: [PATCH] Remove debug output of settings variables in runtest.sh for cleaner execution --- enrich.py | 9 --------- runtest.sh | 16 ---------------- 2 files changed, 25 deletions(-) diff --git a/enrich.py b/enrich.py index 58073e8..e13a733 100755 --- a/enrich.py +++ b/enrich.py @@ -337,7 +337,6 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel): mgt = packet.get_multiple_layers('wlan.mgt')[0] tags = mgt._all_fields.get('wlan.tagged.all', {}).get('wlan.tag', []) except Exception as e: - print(f"[DEBUG] Error accessing wlan.mgt tags: {e}") continue ssid = None @@ -351,7 +350,6 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel): ssid_bytes = bytes.fromhex(raw_ssid.replace(':', '')) ssid = ssid_bytes.decode('utf-8', errors='replace') except Exception as e: - print(f"[DEBUG] Error decoding SSID: {e}") ssid = None # Cisco Client Count @@ -363,14 +361,11 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel): pass if not ssid: - print("[DEBUG] No SSID found in tags.") continue bssid = getattr(wlan, 'bssid', '').lower() if not bssid or bssid == 'ff:ff:ff:ff:ff:ff': continue - - print(f"SSID: {ssid}, BSSID: {bssid}") bssid_to_ssid[bssid] = ssid ssid_to_bssids[ssid].add(bssid) @@ -380,12 +375,8 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel): ssid_signals[ssid].append(int(signal)) except Exception as e: - print(f"[DEBUG] General packet parse error: {e}") continue - print(f"[DEBUG] SSID to BSSIDs: {ssid_to_bssids}") - print(f"[DEBUG] BSSID to SSID: {bssid_to_ssid}") - clients_on_ap = get_clients_on_ap(filtered_packets, ap_bssid) clients_on_channel = get_clients_on_channel(filtered_packets, ap_channel, ap_bssid) aps_on_channel = get_aps_on_channel(filtered_packets, ap_channel) diff --git a/runtest.sh b/runtest.sh index ef6c562..5472c98 100755 --- a/runtest.sh +++ b/runtest.sh @@ -2,22 +2,6 @@ source settings.env -# For debugging purposes, echo all variables from settings.env -echo "Settings loaded from settings.env:" -echo "INTERFACE: $INTERFACE" -echo "NUM_TESTS: $NUM_TESTS" -echo "NUM_SAMPLES: $NUM_SAMPLES" -echo "TIME_BETWEEN: $TIME_BETWEEN" -echo "LEAD_TIME: $LEAD_TIME" -echo "PING_TARGET: $PING_TARGET" -echo "PING_COUNT: $PING_COUNT" -echo "TEST_FILE: $TEST_FILE" -echo "ENRICHED_FILE: $ENRICHED_FILE" -echo "SCRIPT_DIRECTORY: $SCRIPT_DIRECTORY" -echo "BOOT_ID: $BOOT_ID" -echo "RECIPIENT: $RECIPIENT" - - # Check if email recipient is set if [ -z "$RECIPIENT" ]; then echo "[!] Please set the RECIPIENT variable in settings.env."