# oldteamhost/nesca4 architecture

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

- Interactive diagram: https://gitdiagram.com/oldteamhost/nesca4
- Repository: https://github.com/oldteamhost/nesca4

## Overview

Nesca4 is a command-line network discovery and scanning tool. Its visible workflow loads configuration and targets, then processes target batches through ping, DNS resolution, port scanning, service checks, and database-pattern matching before reporting results. The engine, target/options model, and reporting code are central internal layers; brute-force authentication is a separate capability in the source, though its invocation is not visible in the sampled main workflow. The README provides no feature overview, so this map follows the workflow shown in source excerpts; unsampled wiring is omitted.

Main entry points: [`nesca4.cc`](https://github.com/oldteamhost/nesca4/blob/main/nesca4.cc) (CLI workflow), [`nescadata.cc`](https://github.com/oldteamhost/nesca4/blob/main/nescadata.cc) (Target records), [`nescaservices.cc`](https://github.com/oldteamhost/nesca4/blob/main/nescaservices.cc) (Service checks), [`nescafind.cc`](https://github.com/oldteamhost/nesca4/blob/main/nescafind.cc) (Database matching)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and workflow"]
  node_main["CLI workflow<br/>[nesca4.cc]"]
  node_config["Options and targets<br/>[nescadata.cc]"]
end

subgraph group_scan["Discovery and scanning"]
  node_engine["Probe engine<br/>[nescaengine.cc]"]
  node_targetdata["Target records<br/>[nescadata.cc]"]
end

subgraph group_enrich["Service enrichment"]
  node_services["Service checks<br/>[nescaservices.cc]"]
  node_find["Database matching<br/>[nescafind.cc]"]
  node_brute["Credential checks<br/>[nescabrute.cc]"]
end

subgraph group_results["Results and reporting"]
  node_report["Console reporting<br/>[nescaprint.cc]"]
  node_html["HTML reporting<br/>[nescaprint.cc]"]
end

node_operator(("Operator"))
node_targetnet(("Network targets"))

node_operator -->|"runs"| node_main
node_main -->|"loads config"| node_config
node_main -->|"runs ping and scan"| node_engine
node_main -->|"checks services"| node_services
node_main -->|"matches database"| node_find
node_main -->|"finishes report"| node_report
node_targetnet -.->|"responds to probes"| node_engine
node_services -->|"adds service info"| node_targetdata
node_find -.->|"reads target data"| node_targetdata
node_brute -->|"adds credentials"| node_targetdata
node_main -.->|"runs authentication"| node_brute
node_report -.->|"formats targets"| node_targetdata
node_main -.->|"writes HTML"| node_html

click node_main "https://github.com/oldteamhost/nesca4/blob/main/nesca4.cc"
click node_config "https://github.com/oldteamhost/nesca4/blob/main/nescadata.cc"
click node_engine "https://github.com/oldteamhost/nesca4/blob/main/nescaengine.cc"
click node_targetdata "https://github.com/oldteamhost/nesca4/blob/main/nescadata.cc"
click node_services "https://github.com/oldteamhost/nesca4/blob/main/nescaservices.cc"
click node_find "https://github.com/oldteamhost/nesca4/blob/main/nescafind.cc"
click node_brute "https://github.com/oldteamhost/nesca4/blob/main/nescabrute.cc"
click node_report "https://github.com/oldteamhost/nesca4/blob/main/nescaprint.cc"
click node_html "https://github.com/oldteamhost/nesca4/blob/main/nescaprint.cc"

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_config toneBlue
class node_engine,node_targetdata toneAmber
class node_services,node_find,node_brute toneMint
class node_report,node_html toneRose
class node_operator,node_targetnet toneIndigo
```

## Components

### CLI and workflow

- [CLI workflow](https://github.com/oldteamhost/nesca4/blob/main/nesca4.cc): `nesca4.cc`
- [Options and targets](https://github.com/oldteamhost/nesca4/blob/main/nescadata.cc): `nescadata.cc`

### Discovery and scanning

- [Probe engine](https://github.com/oldteamhost/nesca4/blob/main/nescaengine.cc): `nescaengine.cc`
- [Target records](https://github.com/oldteamhost/nesca4/blob/main/nescadata.cc): `nescadata.cc`

### Service enrichment

- [Service checks](https://github.com/oldteamhost/nesca4/blob/main/nescaservices.cc): `nescaservices.cc`
- [Database matching](https://github.com/oldteamhost/nesca4/blob/main/nescafind.cc): `nescafind.cc`
- [Credential checks](https://github.com/oldteamhost/nesca4/blob/main/nescabrute.cc): `nescabrute.cc`

### Results and reporting

- [Console reporting](https://github.com/oldteamhost/nesca4/blob/main/nescaprint.cc): `nescaprint.cc`
- [HTML reporting](https://github.com/oldteamhost/nesca4/blob/main/nescaprint.cc): `nescaprint.cc`

### Other components

- **Operator**
- **Network targets**

## Connections

- Operator → CLI workflow: runs (evidence: `nesca4.cc`)
- CLI workflow → Options and targets: loads config (evidence: `nesca4.cc`)
- CLI workflow → Probe engine: runs ping and scan (evidence: `nesca4.cc`)
- CLI workflow → Service checks: checks services (evidence: `nesca4.cc`)
- CLI workflow → Database matching: matches database (evidence: `nesca4.cc`)
- CLI workflow → Console reporting: finishes report (evidence: `nesca4.cc`)
- Network targets → Probe engine: responds to probes
- Service checks → Target records: adds service info (evidence: `nescaservices.cc`)
- Database matching → Target records: reads target data
- Credential checks → Target records: adds credentials (evidence: `nescabrute.cc`)
- CLI workflow → Credential checks: runs authentication
- Console reporting → Target records: formats targets
- CLI workflow → HTML reporting: writes HTML
