# barlajashwanth/network-scanner-v1 architecture

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

- Interactive diagram: https://gitdiagram.com/barlajashwanth/network-scanner-v1
- Repository: https://github.com/barlajashwanth/network-scanner-v1

## Overview

This is a command-line TCP/IPv4 port scanner. Users choose a single-port scan, a port-range scan, or saved-result history; the scanner validates input, probes targets, reports results, and the final version can save and reload scan history. The main implementation is monolithic, so the nodes describe responsibilities within that script rather than separate packages. README-documented capabilities supplement the excerpts; earlier versions are shown as standalone implementations, not as runtime dependencies.

Main entry points: [`network_scanner.py`](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py) (Scanner Menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and Input"]
  node_menu["Scanner Menu<br/>[network_scanner.py]"]
  node_validation["Input Validation<br/>[network_scanner.py]"]
end

subgraph group_scan["Scanning"]
  node_single["Single-Port Scan<br/>[network_scanner.py]"]
  node_range["Range Scan<br/>[network_scanner.py]"]
  node_probe["TCP Probe<br/>[network_scanner.py]"]
  node_pool["Thread Pool<br/>[network_scanner.py]"]
  node_v11["Range Scanner Version"]
  node_v10["Initial Scanner Version"]
end

subgraph group_history["Results and History"]
  node_report["Scan Report<br/>[network_scanner.py]"]
  node_json[("JSON Scan History<br/>[network_scanner.py]")]
  node_history_view["History Viewer<br/>[network_scanner.py]"]
end

node_user(("Operator"))
node_target(("TCP Target"))

node_user -->|"chooses action"| node_menu
node_menu -->|"validates input"| node_validation
node_menu -->|"starts scan"| node_single
node_menu -->|"starts scan"| node_range
node_menu -->|"opens history"| node_history_view
node_single -->|"connects TCP"| node_probe
node_range -->|"submits probes"| node_pool
node_pool -->|"runs concurrently"| node_probe
node_probe -->|"tests port"| node_target
node_single -->|"records outcome"| node_report
node_range -->|"counts and times"| node_report
node_report -->|"saves results"| node_json
node_history_view -->|"reads results"| node_json

click node_menu "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_validation "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_single "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_range "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_probe "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_pool "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_report "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_json "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_history_view "https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py"
click node_v11 "https://github.com/barlajashwanth/network-scanner-v1/blob/main/02_Network_scanner_v1.1.py"
click node_v10 "https://github.com/barlajashwanth/network-scanner-v1/blob/main/01_Network_scanner_v1.0.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_menu,node_validation toneBlue
class node_single,node_range,node_probe,node_pool,node_v11,node_v10 toneAmber
class node_report,node_json,node_history_view toneMint
class node_user,node_target toneIndigo
```

## Components

### CLI and Input

- [Scanner Menu](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [Input Validation](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`

### Scanning

- [Single-Port Scan](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [Range Scan](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [TCP Probe](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [Thread Pool](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [Range Scanner Version](https://github.com/barlajashwanth/network-scanner-v1/blob/main/02_Network_scanner_v1.1.py): `02_Network_scanner_v1.1.py`
- [Initial Scanner Version](https://github.com/barlajashwanth/network-scanner-v1/blob/main/01_Network_scanner_v1.0.py): `01_Network_scanner_v1.0.py`

### Results and History

- [Scan Report](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [JSON Scan History](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`
- [History Viewer](https://github.com/barlajashwanth/network-scanner-v1/blob/main/network_scanner.py): `network_scanner.py`

### Other components

- **Operator**
- **TCP Target**

## Connections

- Operator → Scanner Menu: chooses action (evidence: `README.md`)
- Scanner Menu → Input Validation: validates input (evidence: `network_scanner.py`)
- Scanner Menu → Single-Port Scan: starts scan (evidence: `network_scanner.py`)
- Scanner Menu → Range Scan: starts scan (evidence: `network_scanner.py`)
- Scanner Menu → History Viewer: opens history (evidence: `network_scanner.py`)
- Single-Port Scan → TCP Probe: connects TCP (evidence: `network_scanner.py`)
- Range Scan → Thread Pool: submits probes (evidence: `network_scanner.py`)
- Thread Pool → TCP Probe: runs concurrently (evidence: `network_scanner.py`)
- TCP Probe → TCP Target: tests port (evidence: `network_scanner.py`)
- Single-Port Scan → Scan Report: records outcome (evidence: `network_scanner.py`)
- Range Scan → Scan Report: counts and times (evidence: `network_scanner.py`)
- Scan Report → JSON Scan History: saves results (evidence: `network_scanner.py`)
- History Viewer → JSON Scan History: reads results (evidence: `network_scanner.py`)
