Compare commits

..

2 commits

4 changed files with 11 additions and 7 deletions

View file

@ -32,7 +32,8 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
cap = pyshark.FileCapture( cap = pyshark.FileCapture(
pcapng_path, pcapng_path,
use_json=True, use_json=True,
include_raw=False include_raw=False,
keep_packets=False
) )
ap_channel = int(ap_channel) ap_channel = int(ap_channel)

View file

@ -27,7 +27,7 @@ def write_ssid_sidecar(enriched_path, ssid_summary):
write a sidecar CSV file next to it. write a sidecar CSV file next to it.
""" """
enriched = Path(enriched_path) enriched = Path(enriched_path)
ssid_outfile = enriched.with_name(enriched.stem + '-ssid-metrics.csv') ssid_outfile = Path(enriched_path).with_name(Path(enriched_path).stem + '-ssid-metrics.csv')
with ssid_outfile.open('w', newline='', encoding='utf-8') as f: with ssid_outfile.open('w', newline='', encoding='utf-8') as f:
fieldnames = [ fieldnames = [

View file

@ -9,6 +9,10 @@ source settings.env
EMAIL_BODY=${EMAIL_BODY:-"Test $BOOT_ID completed successfully. Please find the attached files and collect the probe."} EMAIL_BODY=${EMAIL_BODY:-"Test $BOOT_ID completed successfully. Please find the attached files and collect the probe."}
BOOT_ID=$(cat /proc/sys/kernel/random/boot_id)
TEST_FILE="${HOME}/${BOOT_ID}-speedtest.csv"
ENRICHED_FILE="${TEST_FILE%.csv}+rf.csv"
SSID_METRICS_FILE="${ENRICHED_FILE%.csv}-ssid-metrics.csv"
FAILURE_LOG="${TEST_FILE%.csv}-failures.log" FAILURE_LOG="${TEST_FILE%.csv}-failures.log"
SCRIPT_START=$(date +%s) SCRIPT_START=$(date +%s)
@ -27,6 +31,10 @@ die() {
[ -z "$RECIPIENT" ] && die "Please set the RECIPIENT variable in settings.env." [ -z "$RECIPIENT" ] && die "Please set the RECIPIENT variable in settings.env."
log "Test file: $TEST_FILE"
log "Enriched file: $ENRICHED_FILE"
log "SSID metrics file: $SSID_METRICS_FILE"
sudo -v sudo -v
while true; do sudo -n true; sleep 60; done 2>/dev/null & while true; do sudo -n true; sleep 60; done 2>/dev/null &
SUDO_KEEPALIVE_PID=$! SUDO_KEEPALIVE_PID=$!

View file

@ -1,10 +1,5 @@
BOOT_ID=$(cat /proc/sys/kernel/random/boot_id)
SCRIPT_DIRECTORY="${HOME}/wifi_test" SCRIPT_DIRECTORY="${HOME}/wifi_test"
KISMET_LOG_DIR="${HOME}/kismet_logs" KISMET_LOG_DIR="${HOME}/kismet_logs"
TEST_FILE="${HOME}/${BOOT_ID}-speedtest.csv"
ENRICHED_FILE="${TEST_FILE%}+rf.csv"
SSID_METRICS_FILE="${ENRICHED_FILE%.csv}-ssid-metrics.csv"
NUM_TESTS=1 NUM_TESTS=1
NUM_SAMPLES=5 NUM_SAMPLES=5