# lanmaster53/recon-ng architecture

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

- Interactive diagram: https://gitdiagram.com/lanmaster53/recon-ng
- Repository: https://github.com/lanmaster53/recon-ng

## Overview

Recon-ng is a modular framework for web-based open-source reconnaissance. A user initiates work through the framework’s command interface or web UI/API; the framework manages workspaces and modules, which perform reconnaissance and record results for later querying, reporting, and export. The web application also exposes task execution and status. The sampled sources show framework persistence and web-task storage; the README describes the product’s modular purpose, while unsampled module implementations limit detail about individual reconnaissance workflows.

Main entry points: [`recon/core/web/api.py`](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/api.py) (REST API), [`recon/core/base.py`](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/base.py) (Framework and workspaces), [`recon/core/module.py`](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/module.py) (Module execution), [`recon/core/tasks.py`](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/tasks.py) (Background task runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["Command interface<br/>[framework.py]"]
  node_webapp["Web application<br/>[__init__.py]"]
end

subgraph group_runtime["Framework runtime"]
  node_framework["Framework and workspaces<br/>[base.py]"]
  node_module["Module execution<br/>[module.py]"]
  node_validation["Input validation<br/>[validators.py]"]
  node_workspace_db[("Workspace data store<br/>[framework.py]")]
  node_task_runner["Background task runner<br/>[tasks.py]"]
end

subgraph group_recon["Reconnaissance capabilities"]
  node_mixins["Recon helpers"]
  node_search["Search providers"]
end

subgraph group_web["Web API and reporting"]
  node_task_db[("Task records<br/>[db.py]")]
  node_api["REST API<br/>[api.py]"]
  node_web_utils["Web data helpers<br/>[utils.py]"]
  node_reports["Workspace reports<br/>[reports.py]"]
  node_exports["Data exporters<br/>[exports.py]"]
end

node_user(("Recon operator"))
node_browser(("Browser"))
node_redis["Redis job queue"]

node_user -->|"issues commands"| node_cli
node_user -->|"uses interface"| node_webapp
node_webapp -->|"registers routes"| node_api
node_cli -.->|"operates framework"| node_framework
node_framework -.->|"loads modules"| node_module
node_module -->|"uses validators"| node_validation
node_framework -->|"queries and writes"| node_workspace_db
node_module -.->|"records findings"| node_workspace_db
node_module -.->|"uses helpers"| node_mixins
node_mixins -->|"queries providers"| node_search
node_api -->|"reads runtime state"| node_framework
node_api -->|"reads task records"| node_task_db
node_task_runner -->|"starts workspace"| node_framework
node_task_runner -->|"runs module"| node_module
node_task_runner -->|"updates status"| node_task_db
node_task_runner -->|"reads current job"| node_redis
node_api -->|"fetches live job"| node_redis
node_api -->|"dispatches report"| node_reports
node_reports -->|"queries workspace"| node_framework
node_reports -->|"formats worksheet"| node_web_utils
node_api -->|"queries export rows"| node_framework
node_api -->|"dispatches export"| node_exports
node_exports -->|"uses formatting helpers"| node_web_utils
node_reports -.->|"renders map view"| node_browser

click node_cli "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/framework.py"
click node_webapp "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/__init__.py"
click node_framework "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/base.py"
click node_module "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/module.py"
click node_validation "https://github.com/lanmaster53/recon-ng/blob/master/recon/utils/validators.py"
click node_workspace_db "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/framework.py"
click node_mixins "https://github.com/lanmaster53/recon-ng/tree/master/recon/mixins"
click node_task_runner "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/tasks.py"
click node_task_db "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/db.py"
click node_api "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/api.py"
click node_web_utils "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/utils.py"
click node_reports "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/reports.py"
click node_exports "https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/exports.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_cli,node_webapp,node_browser toneBlue
class node_framework,node_module,node_validation,node_workspace_db,node_task_runner,node_redis toneAmber
class node_mixins,node_search toneMint
class node_task_db,node_api,node_web_utils,node_reports,node_exports toneRose
class node_user toneIndigo
```

## Components

### User interfaces

- [Command interface](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/framework.py): `recon/core/framework.py`
- [Web application](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/__init__.py): `recon/core/web/__init__.py`

### Framework runtime

- [Framework and workspaces](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/base.py): `recon/core/base.py`
- [Module execution](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/module.py): `recon/core/module.py`
- [Input validation](https://github.com/lanmaster53/recon-ng/blob/master/recon/utils/validators.py): `recon/utils/validators.py`
- [Workspace data store](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/framework.py): `recon/core/framework.py`
- [Background task runner](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/tasks.py): `recon/core/tasks.py`

### Reconnaissance capabilities

- [Recon helpers](https://github.com/lanmaster53/recon-ng/tree/master/recon/mixins): `recon/mixins`
- **Search providers**

### Web API and reporting

- [Task records](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/db.py): `recon/core/web/db.py`
- [REST API](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/api.py): `recon/core/web/api.py`
- [Web data helpers](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/utils.py): `recon/core/web/utils.py`
- [Workspace reports](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/reports.py): `recon/core/web/reports.py`
- [Data exporters](https://github.com/lanmaster53/recon-ng/blob/master/recon/core/web/exports.py): `recon/core/web/exports.py`

### Other components

- **Recon operator**
- **Browser**
- **Redis job queue**

## Connections

- Recon operator → Command interface: issues commands (evidence: `README.md`)
- Recon operator → Web application: uses interface (evidence: `README.md`)
- Web application → REST API: registers routes (evidence: `recon/core/web/__init__.py`)
- Command interface → Framework and workspaces: operates framework (evidence: `recon/core/base.py`)
- Framework and workspaces → Module execution: loads modules
- Module execution → Input validation: uses validators (evidence: `recon/core/module.py`)
- Framework and workspaces → Workspace data store: queries and writes (evidence: `recon/core/framework.py`)
- Module execution → Workspace data store: records findings (evidence: `recon/core/module.py`)
- Module execution → Recon helpers: uses helpers
- Recon helpers → Search providers: queries providers (evidence: `recon/mixins/search.py`)
- REST API → Framework and workspaces: reads runtime state (evidence: `recon/core/web/api.py`)
- REST API → Task records: reads task records (evidence: `recon/core/web/api.py`)
- Background task runner → Framework and workspaces: starts workspace (evidence: `recon/core/tasks.py`)
- Background task runner → Module execution: runs module (evidence: `recon/core/tasks.py`)
- Background task runner → Task records: updates status (evidence: `recon/core/tasks.py`)
- Background task runner → Redis job queue: reads current job (evidence: `recon/core/tasks.py`)
- REST API → Redis job queue: fetches live job (evidence: `recon/core/web/api.py`)
- REST API → Workspace reports: dispatches report (evidence: `recon/core/web/api.py`)
- Workspace reports → Framework and workspaces: queries workspace (evidence: `recon/core/web/reports.py`)
- Workspace reports → Web data helpers: formats worksheet (evidence: `recon/core/web/reports.py`)
- REST API → Framework and workspaces: queries export rows (evidence: `recon/core/web/api.py`)
- REST API → Data exporters: dispatches export (evidence: `recon/core/web/api.py`)
- Data exporters → Web data helpers: uses formatting helpers (evidence: `recon/core/web/exports.py`)
- Workspace reports → Browser: renders map view
