// Documentation

CLI Reference

// Installation
# Clone
$git clone https://github.com/rounakneema/Revealr.git && cd Revealr
# Build
$go build -o revealr ./cmd/revealr
# Run
$./revealr -target 192.168.1.1 -p 1-1024

⚠️ Note: Raw socket access requires elevated privileges on Linux. Run with sudo or grant capabilities: sudo setcap cap_net_raw+ep ./revealr

// Flags
FlagTypeDescription
-target, -tstringTarget IP, CIDR range, or hostname. (e.g. 192.168.1.0/24)
-ports, -pstringPort range to scan. Default: 1-65535. (e.g. 22,80,443 or 1-1024)
--rateintPackets per minute dispatch rate. Default: 10000.
--profilestringScan profile: paranoid | stealthy | polite | aggressive. Default: polite.
--resumeboolResume the last interrupted scan session for this target.
--diffboolShow diff against the last scan. Outputs new/changed/removed services.
--pluginsstringPath to Python plugin directory. Plugins are auto-discovered.
--output, -ostringOutput format: json | stdout | file. Default: stdout.
--timeoutintPer-port connection timeout in milliseconds. Default: 1000.
--dbstringPath to SQLite database file. Default: ~/.revealr/state.db.
--verbose, -vboolEnable verbose logging.
--versionboolPrint Revealr version and exit.
// Example Workflows

Full subnet scan with drift detection

$./revealr -target 192.168.1.0/24 --rate 50000 --diff --output json > report.json

Scans a full /24 subnet at maximum rate and compares results against the last stored scan, outputting the diff in JSON format.

Stealthy top-1000 port scan

$./revealr -target 10.10.11.15 -p 1-1000 --profile stealthy

Scans the 1000 most common ports using the Stealthy profile, which randomizes port order and injects timing jitter to minimize IDS triggering.

Resume an interrupted scan

$./revealr -target 192.168.1.0/24 --resume

Revealr reads the last incomplete scan session from the SQLite state database and continues from where it left off.

Scan with Python vulnerability plugins

$./revealr -target 10.0.0.1 --plugins ./plugins/ --output json

Runs the scan and passes each discovered service through all Python plugins in the ./plugins/ directory, enriching the output with custom vulnerability data.

// Python Plugin API

Plugins are Python scripts placed in the plugin directory. Each plugin receives a JSON payload on stdin and must write a JSON response to stdout.

// Input Payload (stdin)
{
  "host": "192.168.1.15",
  "port": 8080,
  "protocol": "tcp",
  "service": "http",
  "banner": "HTTP/1.1 200 OK\nServer: nginx/1.18.0",
  "version": "nginx/1.18.0"
}
// Expected Output (stdout)
{
  "plugin": "nginx-vuln-check",
  "findings": [
    {
      "cve": "CVE-2021-XXXX",
      "severity": "medium",
      "description": "..."
    }
  ],
  "metadata": {
    "checked_at": "2024-01-01T00:00:00Z"
  }
}