# mohapilimpho23-afk/net-guard-toolkit architecture

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

- Interactive diagram: https://gitdiagram.com/mohapilimpho23-afk/net-guard-toolkit
- Repository: https://github.com/mohapilimpho23-afk/net-guard-toolkit
- Video tour (about a minute): https://gitdiagram.com/mohapilimpho23-afk/net-guard-toolkit/video

## Overview

NetGuard is a command-line network defense toolkit. Its principal workflow starts at the CLI, which routes requests to independent discovery, monitoring, detection, integrity, and reporting capabilities. The graph includes the sampled implementations and the README-documented report outputs. The scanner and host discovery print findings rather than returning collected results; the CLI’s report calls pass minimal metadata, not those findings. Evidence is limited to the supplied tree, README, and sampled source.

Main entry points: [`main.py`](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/main.py) (CLI routing), [`Modules/integrity.py`](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py) (Integrity checks), [`Modules/scanner.py`](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/scanner.py) (Threaded port scan), [`Modules/monitor.py`](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/monitor.py) (Host discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI orchestration"]
  node_cli["CLI routing<br/>[main.py]"]
end

subgraph group_network["Network visibility"]
  node_scanner["Threaded port scan<br/>[scanner.py]"]
  node_host_discovery["Host discovery<br/>[monitor.py]"]
end

subgraph group_detection["Detection and integrity"]
  node_integrity["Integrity checks<br/>[integrity.py]"]
  node_hashing["SHA-256 hashing<br/>[integrity.py]"]
  node_log_analysis["Pattern analysis<br/>[log_analyzer.py]"]
  node_brute_force["Brute-force detection<br/>[log_analyzer.py]"]
end

subgraph group_output["Reporting and state"]
  node_baseline[("Baseline file<br/>[integrity.py]")]
  node_reporter["Report generation<br/>[reporter.py]"]
  node_report_files["JSON and HTML reports<br/>[reporter.py]"]
end

node_analyst(("Security analyst"))
node_ping["System ping"]

node_analyst -->|"selects command"| node_cli
node_cli -->|"starts scan"| node_scanner
node_cli -->|"starts discovery"| node_host_discovery
node_cli -->|"runs check"| node_integrity
node_cli -->|"analyzes log"| node_log_analysis
node_cli -->|"checks failures"| node_brute_force
node_cli -->|"requests reports"| node_reporter
node_scanner -.-> node_ping
node_host_discovery -->|"dispatches probes"| node_ping
node_integrity -->|"hashes files"| node_hashing
node_integrity -->|"reads or writes"| node_baseline
node_log_analysis -.-> node_brute_force
node_reporter -->|"writes reports"| node_report_files

click node_cli "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/main.py"
click node_scanner "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/scanner.py"
click node_host_discovery "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/monitor.py"
click node_integrity "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py"
click node_hashing "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py"
click node_baseline "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py"
click node_log_analysis "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/log_analyzer.py"
click node_brute_force "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/log_analyzer.py"
click node_reporter "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/reporter.py"
click node_report_files "https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/reporter.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 toneBlue
class node_scanner,node_host_discovery toneAmber
class node_integrity,node_hashing,node_log_analysis,node_brute_force toneMint
class node_baseline,node_reporter,node_report_files toneRose
class node_analyst,node_ping toneIndigo
```

## Components

### CLI orchestration

- [CLI routing](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/main.py): `main.py`

### Network visibility

- [Threaded port scan](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/scanner.py): `Modules/scanner.py`
- [Host discovery](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/monitor.py): `Modules/monitor.py`

### Detection and integrity

- [Integrity checks](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py): `Modules/integrity.py`
- [SHA-256 hashing](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py): `Modules/integrity.py`
- [Pattern analysis](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/log_analyzer.py): `Modules/log_analyzer.py`
- [Brute-force detection](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/log_analyzer.py): `Modules/log_analyzer.py`

### Reporting and state

- [Baseline file](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/integrity.py): `Modules/integrity.py`
- [Report generation](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/reporter.py): `Modules/reporter.py`
- [JSON and HTML reports](https://github.com/mohapilimpho23-afk/net-guard-toolkit/blob/main/Modules/reporter.py): `Modules/reporter.py`

### Other components

- **Security analyst**
- **System ping**

## Connections

- Security analyst → CLI routing: selects command
- CLI routing → Threaded port scan: starts scan
- CLI routing → Host discovery: starts discovery
- CLI routing → Integrity checks: runs check
- CLI routing → Pattern analysis: analyzes log
- CLI routing → Brute-force detection: checks failures
- CLI routing → Report generation: requests reports
- Threaded port scan → System ping
- Host discovery → System ping: dispatches probes
- Integrity checks → SHA-256 hashing: hashes files
- Integrity checks → Baseline file: reads or writes
- Pattern analysis → Brute-force detection
- Report generation → JSON and HTML reports: writes reports
