fix: propagate nmap errors to UI + sudo scan script

- scanner.py: re-raise nmap exceptions so they reach ScanRun.error
  (previously silently returned [] hiding the root cause)
- Sidebar: after triggering scan, auto-switch to History tab
- ScanHistoryPanel: auto-refresh every 3s while any run is 'running';
  show error toast when a run transitions running→error; show spinner
  on running runs; error message fully visible (no truncation)
- scripts/run_scan.py: standalone scan script to run with sudo for
  nmap OS detection / SYN scans on macOS
This commit is contained in:
Pouzor
2026-03-07 01:28:21 +01:00
parent 8a18ded2bc
commit fb85468cef
3 changed files with 84 additions and 8 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ def _nmap_scan(target: str) -> list[dict]:
nm.scan(hosts=target, arguments="-sV --open -T4 --host-timeout 30s")
except Exception as exc:
logger.error("nmap scan failed: %s", exc)
return []
raise RuntimeError(str(exc)) from exc
hosts = []
for host in nm.all_hosts():