# xploitoverload/nethound architecture

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

- Interactive diagram: https://gitdiagram.com/xploitoverload/nethound
- Repository: https://github.com/xploitoverload/nethound

## Overview

NetHound is a CLI threat-intelligence tool for collecting, archiving, searching, and summarizing newly registered domains. A user can fetch registrations by date and TLD: the CLI parses the date, dispatches to the .IN or WhoisDS fetcher, and either streams/formats results or saves them in the local archive. Users can also search archived records, including by regex and TLD/date filters, and view archive statistics. The source excerpts show these core paths; other documented capabilities are represented where supported, but no unsampled implementation details are assumed.

Main entry points: [`nethound/cli.py`](https://github.com/xploitoverload/nethound/blob/main/nethound/cli.py) (Command router), [`nethound/fetchers/registry_in.py`](https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/registry_in.py) (.IN fetcher), [`nethound/fetchers/whoisds.py`](https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/whoisds.py) (WhoisDS fetcher), [`nethound/search.py`](https://github.com/xploitoverload/nethound/blob/main/nethound/search.py) (Domain search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_cli["Command router<br/>[cli.py]"]
  node_date["Date parsing<br/>[config.py]"]
  node_fetch_output["Fetch output<br/>[cli.py]"]
end

subgraph group_collection["Domain collection"]
  node_registry_fetch[".IN fetcher<br/>[registry_in.py]"]
  node_registry{{"Registry.in"}}
  node_whois_fetch["WhoisDS fetcher<br/>[whoisds.py]"]
  node_whois{{"WhoisDS service"}}
  node_zip_extract["Archive extraction<br/>[whoisds.py]"]
  node_pdf_extract["PDF extraction<br/>[registry_in.py]"]
end

subgraph group_archive["Local archive"]
  node_domain_archive[("Domain archive")]
end

subgraph group_analysis["Archive analysis"]
  node_search["Domain search<br/>[search.py]"]
  node_stats["Archive statistics<br/>[cli.py]"]
end

node_user(("Security user"))

node_user -->|"runs commands"| node_cli
node_cli -->|"parses dates"| node_date
node_cli -->|"dispatches .IN"| node_registry_fetch
node_cli -->|"dispatches WhoisDS"| node_whois_fetch
node_registry_fetch -->|"downloads PDF"| node_registry
node_registry_fetch -->|"extracts domains"| node_pdf_extract
node_pdf_extract -->|"writes records"| node_domain_archive
node_whois_fetch -->|"downloads archive"| node_whois
node_whois_fetch -->|"extracts domains"| node_zip_extract
node_zip_extract -->|"writes records"| node_domain_archive
node_cli -->|"formats results"| node_fetch_output
node_cli -->|"runs search"| node_search
node_search -->|"reads records"| node_domain_archive
node_cli -->|"runs stats"| node_stats
node_stats -->|"counts records"| node_domain_archive

click node_cli "https://github.com/xploitoverload/nethound/blob/main/nethound/cli.py"
click node_date "https://github.com/xploitoverload/nethound/blob/main/nethound/config.py"
click node_registry_fetch "https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/registry_in.py"
click node_whois_fetch "https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/whoisds.py"
click node_zip_extract "https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/whoisds.py"
click node_pdf_extract "https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/registry_in.py"
click node_fetch_output "https://github.com/xploitoverload/nethound/blob/main/nethound/cli.py"
click node_search "https://github.com/xploitoverload/nethound/blob/main/nethound/search.py"
click node_stats "https://github.com/xploitoverload/nethound/blob/main/nethound/cli.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_date,node_fetch_output,node_user toneBlue
class node_registry_fetch,node_registry,node_whois_fetch,node_whois,node_zip_extract,node_pdf_extract toneAmber
class node_domain_archive toneMint
class node_search,node_stats toneRose
```

## Components

### CLI workflows

- [Command router](https://github.com/xploitoverload/nethound/blob/main/nethound/cli.py): `nethound/cli.py`
- [Date parsing](https://github.com/xploitoverload/nethound/blob/main/nethound/config.py): `nethound/config.py`
- [Fetch output](https://github.com/xploitoverload/nethound/blob/main/nethound/cli.py): `nethound/cli.py`

### Domain collection

- [.IN fetcher](https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/registry_in.py): `nethound/fetchers/registry_in.py`
- **Registry.in**
- [WhoisDS fetcher](https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/whoisds.py): `nethound/fetchers/whoisds.py`
- **WhoisDS service**
- [Archive extraction](https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/whoisds.py): `nethound/fetchers/whoisds.py`
- [PDF extraction](https://github.com/xploitoverload/nethound/blob/main/nethound/fetchers/registry_in.py): `nethound/fetchers/registry_in.py`

### Local archive

- **Domain archive**

### Archive analysis

- [Domain search](https://github.com/xploitoverload/nethound/blob/main/nethound/search.py): `nethound/search.py`
- [Archive statistics](https://github.com/xploitoverload/nethound/blob/main/nethound/cli.py): `nethound/cli.py`

### Other components

- **Security user**

## Connections

- Security user → Command router: runs commands (evidence: `nethound/cli.py`)
- Command router → Date parsing: parses dates (evidence: `nethound/cli.py`)
- Command router → .IN fetcher: dispatches .IN (evidence: `nethound/cli.py`)
- Command router → WhoisDS fetcher: dispatches WhoisDS (evidence: `nethound/cli.py`)
- .IN fetcher → Registry.in: downloads PDF (evidence: `nethound/fetchers/registry_in.py`)
- .IN fetcher → PDF extraction: extracts domains (evidence: `nethound/fetchers/registry_in.py`)
- PDF extraction → Domain archive: writes records (evidence: `nethound/fetchers/registry_in.py`)
- WhoisDS fetcher → WhoisDS service: downloads archive (evidence: `nethound/fetchers/whoisds.py`)
- WhoisDS fetcher → Archive extraction: extracts domains (evidence: `nethound/fetchers/whoisds.py`)
- Archive extraction → Domain archive: writes records (evidence: `nethound/fetchers/whoisds.py`)
- Command router → Fetch output: formats results (evidence: `nethound/cli.py`)
- Command router → Domain search: runs search (evidence: `nethound/cli.py`)
- Domain search → Domain archive: reads records (evidence: `nethound/search.py`)
- Command router → Archive statistics: runs stats (evidence: `nethound/cli.py`)
- Archive statistics → Domain archive: counts records (evidence: `nethound/cli.py`)
