# camilocod3/activerecon architecture

> Architecture diagram of the GitHub repository camilocod3/activerecon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/camilocod3/activerecon
- Repository: https://github.com/camilocod3/activerecon

## Overview

ActiveRecon is an authorized-reconnaissance CLI. Its primary workflow parses and scope-checks a target, runs a configured Nmap scan, analyzes discovered web services and DNS, derives follow-up signals, and writes Markdown/JSON reports. Separate CLI branches manage target inventories and passive subdomain discovery without scanning. The runner and inventory/discovery command excerpts establish the main orchestration; some README-documented capabilities are represented at their documented module paths where implementation excerpts were not provided.

Main entry points: [`activerecon/runner.py`](https://github.com/camilocod3/activerecon/blob/main/activerecon/runner.py) (Recon runner), [`activerecon/cli.py`](https://github.com/camilocod3/activerecon/blob/main/activerecon/cli.py) (CLI router), [`activerecon/commands/discover_command.py`](https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/discover_command.py) (Discovery command), [`activerecon/commands/targets_command.py`](https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/targets_command.py) (Inventory command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_main["Module entry<br/>[main.py]"]
  node_cli["CLI router<br/>[cli.py]"]
  node_scope_cmd["Scope command<br/>[scope_command.py]"]
  node_targets_cmd["Inventory command<br/>[targets_command.py]"]
  node_discover_cmd["Discovery command"]
end

subgraph group_recon["Recon workflow"]
  node_runner["Recon runner<br/>[runner.py]"]
  node_target_parser["Target parser<br/>[parser.py]"]
  node_scope_policy["Scope policy<br/>[scope_policy.py]"]
  node_workflow_rules["Workflow rules<br/>[workflows.py]"]
  node_nmap["Port scanning<br/>[nmap_scan.py]"]
  node_http["HTTP analysis<br/>[http_enum.py]"]
  node_tls["TLS analysis<br/>[tls_analysis.py]"]
  node_endpoints["Endpoint discovery"]
  node_dns["DNS analysis<br/>[dns_analysis.py]"]
  node_signals["Signal analysis<br/>[risk_analysis.py]"]
  node_config["Scan configuration<br/>[config_loader.py]"]
end

subgraph group_inventory["Target management"]
  node_inventory_io["Inventory operations"]
  node_target_loader["Target importer<br/>[target_loader.py]"]
  node_target_diff["Inventory diff<br/>[target_diff.py]"]
end

subgraph group_discovery["Passive discovery"]
  node_subfinder_provider["Subfinder provider"]
end

subgraph group_outputs["Results and reports"]
  node_report_md["Markdown report"]
  node_report_json["JSON report<br/>[json_report.py]"]
  node_output_paths["Output paths<br/>[output_paths.py]"]
end

node_user(("Operator"))
node_target_host(("Assessed host"))
node_nmap_service["Nmap executable"]
node_subfinder["subfinder"]

node_user -->|"runs command"| node_main
node_main -->|"starts CLI"| node_cli
node_cli -->|"starts recon"| node_runner
node_cli -->|"dispatches"| node_scope_cmd
node_cli -->|"dispatches"| node_targets_cmd
node_cli -->|"dispatches"| node_discover_cmd
node_runner -->|"loads settings"| node_config
node_runner -->|"parses target"| node_target_parser
node_runner -->|"checks scope"| node_scope_policy
node_runner -->|"plans reports"| node_output_paths
node_runner -->|"selects web work"| node_workflow_rules
node_runner -->|"runs scan"| node_nmap
node_nmap -->|"invokes"| node_nmap_service
node_nmap -->|"scans"| node_target_host
node_runner -->|"analyzes ports"| node_http
node_http -->|"requests services"| node_target_host
node_runner -->|"analyzes HTTP results"| node_tls
node_tls -->|"checks certificates"| node_target_host
node_runner -->|"discovers endpoints"| node_endpoints
node_endpoints -->|"probes web paths"| node_target_host
node_runner -->|"looks up records"| node_dns
node_dns -->|"queries DNS"| node_target_host
node_runner -->|"derives signals"| node_signals
node_runner -->|"writes results"| node_report_md
node_runner -->|"writes results"| node_report_json
node_targets_cmd -->|"loads targets"| node_target_loader
node_targets_cmd -->|"builds or exports"| node_inventory_io
node_targets_cmd -->|"compares inventories"| node_target_diff
node_target_loader -->|"normalizes via"| node_target_parser
node_inventory_io -->|"normalizes targets"| node_target_parser
node_discover_cmd -->|"loads settings"| node_config
node_discover_cmd -->|"requests discovery"| node_subfinder_provider
node_subfinder_provider -.->|"invokes"| node_subfinder
node_discover_cmd -->|"checks discovered hosts"| node_scope_policy
node_discover_cmd -->|"saves inventory"| node_inventory_io
node_scope_cmd -->|"evaluates target"| node_scope_policy

click node_main "https://github.com/camilocod3/activerecon/blob/main/activerecon/main.py"
click node_cli "https://github.com/camilocod3/activerecon/blob/main/activerecon/cli.py"
click node_scope_cmd "https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/scope_command.py"
click node_targets_cmd "https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/targets_command.py"
click node_discover_cmd "https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/discover_command.py"
click node_runner "https://github.com/camilocod3/activerecon/blob/main/activerecon/runner.py"
click node_target_parser "https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/parser.py"
click node_scope_policy "https://github.com/camilocod3/activerecon/blob/main/activerecon/policies/scope_policy.py"
click node_workflow_rules "https://github.com/camilocod3/activerecon/blob/main/activerecon/workflows.py"
click node_nmap "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/nmap_scan.py"
click node_http "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/http_enum.py"
click node_tls "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/tls_analysis.py"
click node_endpoints "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/endpoint_discovery.py"
click node_dns "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/dns_analysis.py"
click node_signals "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/risk_analysis.py"
click node_config "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/config_loader.py"
click node_report_md "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/report_generator.py"
click node_report_json "https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/json_report.py"
click node_output_paths "https://github.com/camilocod3/activerecon/blob/main/activerecon/output_paths.py"
click node_inventory_io "https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/target_inventory.py"
click node_target_loader "https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/target_loader.py"
click node_target_diff "https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/target_diff.py"
click node_subfinder_provider "https://github.com/camilocod3/activerecon/blob/main/activerecon/discovery/subfinder_provider.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_cli,node_scope_cmd,node_targets_cmd,node_discover_cmd toneBlue
class node_runner,node_target_parser,node_scope_policy,node_workflow_rules,node_nmap,node_http,node_tls,node_endpoints,node_dns,node_signals,node_config toneAmber
class node_inventory_io,node_target_loader,node_target_diff toneMint
class node_subfinder_provider toneRose
class node_report_md,node_report_json,node_output_paths,node_user,node_target_host,node_nmap_service,node_subfinder toneIndigo
```

## Components

### CLI entry

- [Module entry](https://github.com/camilocod3/activerecon/blob/main/activerecon/main.py): `activerecon/main.py`
- [CLI router](https://github.com/camilocod3/activerecon/blob/main/activerecon/cli.py): `activerecon/cli.py`
- [Scope command](https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/scope_command.py): `activerecon/commands/scope_command.py`
- [Inventory command](https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/targets_command.py): `activerecon/commands/targets_command.py`
- [Discovery command](https://github.com/camilocod3/activerecon/blob/main/activerecon/commands/discover_command.py): `activerecon/commands/discover_command.py`

### Recon workflow

- [Recon runner](https://github.com/camilocod3/activerecon/blob/main/activerecon/runner.py): `activerecon/runner.py`
- [Target parser](https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/parser.py): `activerecon/targets/parser.py`
- [Scope policy](https://github.com/camilocod3/activerecon/blob/main/activerecon/policies/scope_policy.py): `activerecon/policies/scope_policy.py`
- [Workflow rules](https://github.com/camilocod3/activerecon/blob/main/activerecon/workflows.py): `activerecon/workflows.py`
- [Port scanning](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/nmap_scan.py): `activerecon/modules/nmap_scan.py`
- [HTTP analysis](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/http_enum.py): `activerecon/modules/http_enum.py`
- [TLS analysis](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/tls_analysis.py): `activerecon/modules/tls_analysis.py`
- [Endpoint discovery](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/endpoint_discovery.py): `activerecon/modules/endpoint_discovery.py`
- [DNS analysis](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/dns_analysis.py): `activerecon/modules/dns_analysis.py`
- [Signal analysis](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/risk_analysis.py): `activerecon/modules/risk_analysis.py`
- [Scan configuration](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/config_loader.py): `activerecon/modules/config_loader.py`

### Target management

- [Inventory operations](https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/target_inventory.py): `activerecon/targets/target_inventory.py`
- [Target importer](https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/target_loader.py): `activerecon/targets/target_loader.py`
- [Inventory diff](https://github.com/camilocod3/activerecon/blob/main/activerecon/targets/target_diff.py): `activerecon/targets/target_diff.py`

### Passive discovery

- [Subfinder provider](https://github.com/camilocod3/activerecon/blob/main/activerecon/discovery/subfinder_provider.py): `activerecon/discovery/subfinder_provider.py`

### Results and reports

- [Markdown report](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/report_generator.py): `activerecon/modules/report_generator.py`
- [JSON report](https://github.com/camilocod3/activerecon/blob/main/activerecon/modules/json_report.py): `activerecon/modules/json_report.py`
- [Output paths](https://github.com/camilocod3/activerecon/blob/main/activerecon/output_paths.py): `activerecon/output_paths.py`

### Other components

- **Operator**
- **Assessed host**
- **Nmap executable**
- **subfinder**

## Connections

- Operator → Module entry: runs command
- Module entry → CLI router: starts CLI
- CLI router → Recon runner: starts recon
- CLI router → Scope command: dispatches
- CLI router → Inventory command: dispatches
- CLI router → Discovery command: dispatches
- Recon runner → Scan configuration: loads settings
- Recon runner → Target parser: parses target
- Recon runner → Scope policy: checks scope
- Recon runner → Output paths: plans reports
- Recon runner → Workflow rules: selects web work
- Recon runner → Port scanning: runs scan
- Port scanning → Nmap executable: invokes
- Port scanning → Assessed host: scans
- Recon runner → HTTP analysis: analyzes ports
- HTTP analysis → Assessed host: requests services
- Recon runner → TLS analysis: analyzes HTTP results
- TLS analysis → Assessed host: checks certificates
- Recon runner → Endpoint discovery: discovers endpoints
- Endpoint discovery → Assessed host: probes web paths
- Recon runner → DNS analysis: looks up records
- DNS analysis → Assessed host: queries DNS
- Recon runner → Signal analysis: derives signals
- Recon runner → Markdown report: writes results
- Recon runner → JSON report: writes results
- Inventory command → Target importer: loads targets
- Inventory command → Inventory operations: builds or exports
- Inventory command → Inventory diff: compares inventories
- Target importer → Target parser: normalizes via
- Inventory operations → Target parser: normalizes targets
- Discovery command → Scan configuration: loads settings
- Discovery command → Subfinder provider: requests discovery
- Subfinder provider → subfinder: invokes
- Discovery command → Scope policy: checks discovered hosts
- Discovery command → Inventory operations: saves inventory
- Scope command → Scope policy: evaluates target
