Backend
All server-side logic lives inetherreaper.py. It is a standard FastAPI application launched via uvicorn through run.sh. The entry point registers a lifespan context manager that runs four startup routines before accepting requests:
http://localhost:8000 by default.
Static files and templates
The frontend is three files mounted directly by FastAPI:| Path | Role |
|---|---|
templates/index.html | All HTML markup, modals, and page structure |
static/js/app.js | All frontend JavaScript — routing, API calls, UI logic |
static/css/style.css | Styles |
GET /) reads templates/index.html and returns it as an HTMLResponse. Static assets are served from the /static mount.
Directory structure
recon/, data/, and wordlists/ directories are created by setup.sh. The subdirectories recon/screenshots/, recon/ccache/, and recon/loads/ are created at runtime if they do not already exist.
Database
All persistent state is stored indata/reaper.db. The schema is created and migrated by init_db() on every startup. New columns are added with ALTER TABLE ... ADD COLUMN guarded by try/except to handle existing databases without errors.
Tables
network_info
network_info
Stores the operator’s local environment configuration. There is always exactly one row (
id = 1).scans
scans
Every tool execution is logged here regardless of outcome.
hosts
hosts
Discovered network hosts, populated by Nmap and netexec scans.
credentials
credentials
All captured credentials from every source.
domain_users and domain_groups
domain_users and domain_groups
Domain accounts and groups collected via RID brute, Users Export, and netexec.
scope
scope
Target IP addresses, CIDRs, and ranges added by the operator.
adcs_vulns
adcs_vulns
Certificate Services vulnerabilities discovered by Certipy.
sccm_info and related tables
sccm_info and related tables
Other tables
Other tables
domain_info— DC enumeration results: DC host/IP, MAQ, domain SIDdomain_trusts— Trust relationships between domainsdelegation— Kerberos delegation findings (unconstrained, constrained, RBCD)password_policy— Domain password policy attributesscan_results— Per-port scan results linked to scope entriesshell_history— Audit log of all commands run in the built-in shellsnippets— Built-in and user command library seeded fromdata/commands.json
Background process tracking
Three tools run as long-lived background processes with start/stop controls. Each is tracked in a module-level Python dictionary keyed by an identifier (typically a scan ID or interface name):SECRETSDUMP_SCANS), live PTY shell sessions (SHELL_SESSIONS), and file server tools (HTTP_SERVER_PROC, SMB_SERVER_PROC, LISTENER_PROC).
When the app restarts, any process registered in these dicts is gone. The cleanup_orphaned_scans() startup function handles this by setting all status = 'running' scan rows to status = 'orphaned'.
The actual status set on restart is
'orphaned', not 'failed'. This distinguishes app-restart interruptions from tool execution failures.Output file naming
All tool output is written to therecon/ directory with a timestamp embedded in the filename:
%Y%m%d_%H%M%S, generated at the moment the scan is launched. The full path is stored in the scans.output_file column so the Scan History page can link directly to each file.
CORS configuration
The app registersCORSMiddleware with open origins to allow the browser frontend to call the API without cross-origin restrictions: