-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscout
More file actions
executable file
·72 lines (65 loc) · 2.4 KB
/
scout
File metadata and controls
executable file
·72 lines (65 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHONPATH_VALUE="${ROOT_DIR}/src"
if [[ -n "${PYTHONPATH:-}" ]]; then
PYTHONPATH_VALUE="${PYTHONPATH_VALUE}:${PYTHONPATH}"
fi
if [[ "${1:-}" == "" ]]; then
cat <<'EOF'
Usage: ./scout <command> [options]
Commands
analyze <firmware> Full firmware analysis pipeline
analyze-8mb <firmware> Truncated 8MB canonical track
stages <run_dir> Rerun specific stages on existing run
serve <run_dir> Launch web report viewer
mcp --project-id <id> Start MCP server for AI agents
tui <run_dir> Terminal UI dashboard
aeg-e2e-gate Evaluate a completed run against the AEG gate
aeg-readiness Audit AEG platform readiness evidence
aeg-real-pair-gate Preflight a known-vulnerable/patched AEG pair
aeg-real-pair Run/reuse known-vulnerable/patched AEG pair
Examples
./scout analyze firmware.bin # full analysis
./scout analyze firmware.bin --no-llm # deterministic only
./scout analyze firmware.bin --rootfs /path/to # pre-extracted rootfs
./scout serve aiedge-runs/<run_id> --port 8080 # web viewer
./scout tui aiedge-runs/<run_id> -w -t 2 # TUI watch mode
./scout aeg-e2e-gate aiedge-runs/<run_id> --out aiedge-runs/<run_id>/aeg_e2e_gate.json
./scout aeg-readiness --out docs/pov/aeg_platform_readiness.json
./scout aeg-real-pair-gate --pair-id netgear-r7000-cve-2017-5521
./scout aeg-real-pair --pair-id netgear-r7000-cve-2017-5521 --fetch --no-llm
./scout ti # TUI interactive (latest)
./scout tw # TUI watch (latest)
./scout t # TUI (latest)
EOF
exit 0
fi
case "${1:-}" in
ti)
shift
set -- tui -i "$@"
;;
tw)
shift
set -- tui -w "$@"
;;
to)
shift
set -- tui -m once "$@"
;;
t)
shift
set -- tui "$@"
;;
esac
# Auto-detect Ghidra if not explicitly set
if [[ -z "${AIEDGE_GHIDRA_HOME:-}" ]]; then
for candidate in /opt/ghidra_* /usr/local/ghidra* /usr/share/ghidra*; do
if [[ -d "$candidate" && -f "$candidate/support/analyzeHeadless" ]]; then
export AIEDGE_GHIDRA_HOME="$candidate"
break
fi
done
fi
exec env PYTHONPATH="${PYTHONPATH_VALUE}" python3 -m aiedge "$@"