CLI Reference (havoc)
The CLI is implemented in src/metalware_sdk/cli.py using Typer.
Command Summary
| Command | Purpose |
|---|---|
havoc setup |
Interactive initial configuration |
havoc submit PATH [--mcu cortexm] [--workers N] [--timeout DURATION] [--tag TAG ...] |
Submit firmware and create analysis |
havoc status [ANALYSIS_ID] [--watch] [--all] [--tag TAG ...] |
Show one or multiple analyses |
havoc stop ANALYSIS_ID |
Stop a running analysis |
havoc timeout SECONDS |
Update global analysis timeout |
havoc setup
Interactive initial configuration.
What it does:
- Prompts for Havoc server URL
- Tries SSL verification first
- Offers to disable SSL verification if HTTPS cert validation fails
- Optionally prompts for API key
- Saves config to ~/.config/havoc/config.json
Environment overrides:
- HAVOC_URL
- HAVOC_API_KEY
havoc submit
Submit a firmware ELF and create an auto-mode analysis.
havoc submit firmware.elf
havoc submit firmware.elf --workers 4 --timeout 2h --tag release --tag stm32
Validation:
- File must exist
- File must be ELF (0x7fELF magic)
- For --mcu cortexm, ELF e_machine must be ARM (40)
- Tags:
max 16 tags, max 32 chars each, [A-Za-z0-9._-], no duplicates
Timeout format:
- 3600 seconds
- 10m minutes
- 24h hours
- 0 disables timeout
havoc status
Scope:
- One analysis (havoc status <analysis_id>)
- Multiple analyses (havoc status)
Default list behavior:
- Shows active + queued analyses
- Hides completed/failed unless --all
- Can filter by repeated --tag
- --watch refreshes every 5 seconds
havoc stop
Stops a running analysis:
havoc timeout
Updates server global analysis timeout:
Internally calls dashboard settings update with analysis_timeout_secs.
Notes and Current Limits
- CLI currently supports only
cortexmfor--mcu. - Raw binary submission with load address is not exposed by CLI.
- On first CLI run, if no config and no env vars exist,
setupruns automatically.