# cybercrafting-partners/domain-inventory architecture

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

- Interactive diagram: https://gitdiagram.com/cybercrafting-partners/domain-inventory
- Repository: https://github.com/cybercrafting-partners/domain-inventory

## Overview

Domain Inventory is a Python CLI for passive domain reconnaissance: users supply domains, it gathers public registration and subdomain data, resolves names and enriches results, then writes historical and consolidated inventory outputs. Optional branches add SE Ranking and Subfinder discovery, VirusTotal reputation, and bounded Nmap scanning. A separate report generator turns existing outputs into HTML. Workflow links follow explicit README statements and sampled imports/calls; detailed internal orchestration and some unsampled features are represented only where documentation supports them.

Main entry points: [`domain_inventory.py`](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py) (Inventory CLI), [`domain_inventory_en.py`](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory_en.py) (English CLI), [`seranking_integration.py`](https://github.com/cybercrafting-partners/domain-inventory/blob/main/seranking_integration.py) (SE Ranking), [`subfinder_integration.py`](https://github.com/cybercrafting-partners/domain-inventory/blob/main/subfinder_integration.py) (Subfinder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_cli["Inventory CLI"]
  node_cli_en["English CLI"]
  node_domain_rdap["Domain RDAP"]
  node_ct["CT discovery"]
  node_seranking["SE Ranking"]
  node_subfinder["Subfinder"]
  node_dns["DNS resolution"]
end

subgraph group_enrichment["Enrichment"]
  node_ip_attribution["IP attribution"]
  node_ipquota[("IP quota guard<br/>[ipwhois_quota.py]")]
  node_nmap["TCP scanning"]
  node_vt[("VirusTotal")]
end

subgraph group_outputs["Inventory outputs"]
  node_csv_outputs["Inventory CSVs"]
  node_history[("Historical merge<br/>[output_merge.py]")]
  node_global["Global inventory<br/>[global_output.py]"]
end

subgraph group_reporting["Reporting"]
  node_html["HTML report<br/>[generate_report.py]"]
end

node_user(("Operator"))
node_external_sources{{"Public data services"}}
node_subfinder_bin{{"Subfinder executable"}}
node_nmap_bin{{"Nmap executable"}}

node_user -->|"provides domains"| node_cli
node_user -->|"provides domains"| node_cli_en
node_cli -->|"collects RDAP"| node_domain_rdap
node_cli -->|"discovers names"| node_ct
node_cli -->|"requests discovery"| node_seranking
node_cli_en -->|"requests discovery"| node_seranking
node_cli -->|"requests discovery"| node_subfinder
node_cli_en -->|"requests discovery"| node_subfinder
node_cli -->|"resolves names"| node_dns
node_cli -->|"attributes IPs"| node_ip_attribution
node_cli_en -->|"attributes IPs"| node_ip_attribution
node_cli -->|"optionally scans"| node_nmap
node_cli_en -->|"optionally scans"| node_nmap
node_ip_attribution -->|"reserves attempts"| node_ipquota
node_domain_rdap -->|"queries RDAP"| node_external_sources
node_ct -->|"queries crt.sh"| node_external_sources
node_dns -->|"queries DNS"| node_external_sources
node_ip_attribution -->|"queries attribution"| node_external_sources
node_seranking -->|"queries API"| node_external_sources
node_subfinder -->|"runs executable"| node_subfinder_bin
node_nmap -->|"runs executable"| node_nmap_bin
node_cli -->|"uses enrichment"| node_vt
node_cli_en -->|"uses enrichment"| node_vt
node_cli -->|"writes datasets"| node_csv_outputs
node_cli_en -->|"writes datasets"| node_csv_outputs
node_cli -->|"merges history"| node_history
node_cli_en -->|"merges history"| node_history
node_cli -->|"builds inventory"| node_global
node_cli_en -->|"builds inventory"| node_global
node_global -->|"writes CSV"| node_csv_outputs
node_user -->|"generates report"| node_html
node_csv_outputs -->|"reads datasets"| node_html

click node_cli "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_cli_en "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory_en.py"
click node_domain_rdap "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_ct "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_seranking "https://github.com/cybercrafting-partners/domain-inventory/blob/main/seranking_integration.py"
click node_subfinder "https://github.com/cybercrafting-partners/domain-inventory/blob/main/subfinder_integration.py"
click node_dns "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_ip_attribution "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_ipquota "https://github.com/cybercrafting-partners/domain-inventory/blob/main/ipwhois_quota.py"
click node_nmap "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_vt "https://github.com/cybercrafting-partners/domain-inventory/blob/main/virustotal_enrichment.py"
click node_csv_outputs "https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py"
click node_history "https://github.com/cybercrafting-partners/domain-inventory/blob/main/output_merge.py"
click node_global "https://github.com/cybercrafting-partners/domain-inventory/blob/main/global_output.py"
click node_html "https://github.com/cybercrafting-partners/domain-inventory/blob/main/generate_report.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_cli_en,node_domain_rdap,node_ct,node_seranking,node_subfinder,node_dns toneBlue
class node_ip_attribution,node_ipquota,node_nmap,node_vt toneAmber
class node_csv_outputs,node_history,node_global toneMint
class node_html toneRose
class node_user,node_external_sources,node_subfinder_bin,node_nmap_bin toneIndigo
```

## Components

### Collection

- [Inventory CLI](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`
- [English CLI](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory_en.py): `domain_inventory_en.py`
- [Domain RDAP](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`
- [CT discovery](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`
- [SE Ranking](https://github.com/cybercrafting-partners/domain-inventory/blob/main/seranking_integration.py): `seranking_integration.py`
- [Subfinder](https://github.com/cybercrafting-partners/domain-inventory/blob/main/subfinder_integration.py): `subfinder_integration.py`
- [DNS resolution](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`

### Enrichment

- [IP attribution](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`
- [IP quota guard](https://github.com/cybercrafting-partners/domain-inventory/blob/main/ipwhois_quota.py): `ipwhois_quota.py`
- [TCP scanning](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`
- [VirusTotal](https://github.com/cybercrafting-partners/domain-inventory/blob/main/virustotal_enrichment.py): `virustotal_enrichment.py`

### Inventory outputs

- [Inventory CSVs](https://github.com/cybercrafting-partners/domain-inventory/blob/main/domain_inventory.py): `domain_inventory.py`
- [Historical merge](https://github.com/cybercrafting-partners/domain-inventory/blob/main/output_merge.py): `output_merge.py`
- [Global inventory](https://github.com/cybercrafting-partners/domain-inventory/blob/main/global_output.py): `global_output.py`

### Reporting

- [HTML report](https://github.com/cybercrafting-partners/domain-inventory/blob/main/generate_report.py): `generate_report.py`

### Other components

- **Operator**
- **Public data services**
- **Subfinder executable**
- **Nmap executable**

## Connections

- Operator → Inventory CLI: provides domains (evidence: `README.md`)
- Operator → English CLI: provides domains (evidence: `README.md`)
- Inventory CLI → Domain RDAP: collects RDAP (evidence: `domain_inventory.py`)
- Inventory CLI → CT discovery: discovers names (evidence: `domain_inventory.py`)
- Inventory CLI → SE Ranking: requests discovery (evidence: `domain_inventory.py`)
- English CLI → SE Ranking: requests discovery (evidence: `domain_inventory_en.py`)
- Inventory CLI → Subfinder: requests discovery (evidence: `domain_inventory.py`)
- English CLI → Subfinder: requests discovery (evidence: `domain_inventory_en.py`)
- Inventory CLI → DNS resolution: resolves names (evidence: `README.md`)
- Inventory CLI → IP attribution: attributes IPs (evidence: `README.md`)
- English CLI → IP attribution: attributes IPs (evidence: `README.md`)
- Inventory CLI → TCP scanning: optionally scans (evidence: `README.md`)
- English CLI → TCP scanning: optionally scans (evidence: `README.md`)
- IP attribution → IP quota guard: reserves attempts (evidence: `domain_inventory.py`)
- Domain RDAP → Public data services: queries RDAP (evidence: `README.md`)
- CT discovery → Public data services: queries crt.sh (evidence: `README.md`)
- DNS resolution → Public data services: queries DNS (evidence: `README.md`)
- IP attribution → Public data services: queries attribution (evidence: `README.md`)
- SE Ranking → Public data services: queries API (evidence: `README.md`)
- Subfinder → Subfinder executable: runs executable (evidence: `subfinder_integration.py`)
- TCP scanning → Nmap executable: runs executable (evidence: `README.md`)
- Inventory CLI → VirusTotal: uses enrichment (evidence: `domain_inventory.py`)
- English CLI → VirusTotal: uses enrichment (evidence: `domain_inventory_en.py`)
- Inventory CLI → Inventory CSVs: writes datasets (evidence: `README.md`)
- English CLI → Inventory CSVs: writes datasets (evidence: `README.md`)
- Inventory CLI → Historical merge: merges history (evidence: `README.md`)
- English CLI → Historical merge: merges history (evidence: `README.md`)
- Inventory CLI → Global inventory: builds inventory (evidence: `README.md`)
- English CLI → Global inventory: builds inventory (evidence: `README.md`)
- Global inventory → Inventory CSVs: writes CSV (evidence: `global_output.py`)
- Operator → HTML report: generates report (evidence: `generate_report.py`)
- Inventory CSVs → HTML report: reads datasets (evidence: `generate_report.py`)
