netcheck-osint 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dhruv Rathod
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include requirements.txt
2
+ include README.md
3
+ include LICENSE
4
+ recursive-include config *.json
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: netcheck-osint
3
+ Version: 0.1.0
4
+ Summary: A high-performance, asynchronous digital identity validation and network endpoint auditing tool.
5
+ Author: Dhruv Rathod
6
+ Classifier: Development Status :: 4 - Beta
7
+ Classifier: Intended Audience :: Information Technology
8
+ Classifier: Intended Audience :: System Administrators
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Security
18
+ Classifier: Topic :: System :: Networking :: Monitoring
19
+ Classifier: Environment :: Console
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: aiohttp==3.11.11
24
+ Requires-Dist: python-dotenv==1.0.1
25
+ Requires-Dist: colorama==0.4.6
26
+ Dynamic: author
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: license-file
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
34
+
35
+ # NetCheck-CLI
36
+
37
+ A high-performance, asynchronous digital identity validation and network endpoint auditing tool engineered in Python.
38
+
39
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
40
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
41
+ [![Architecture](https://img.shields.io/badge/architecture-AsyncIO--EventLoop-orange.svg)](https://docs.python.org/3/library/asyncio.html)
42
+
43
+ ## 📋 Description
44
+
45
+ **NetCheck-CLI** is a modular command-line utility designed for Security Engineers, Penetration Testers, and Site Reliability Engineers (SREs). It optimizes the discovery and auditing of digital footprints across enterprise systems, developer registries, and cloud infrastructure.
46
+
47
+ Traditional footprinting and status-checking tools execute requests sequentially, spending significant CPU idle time waiting for network I/O operations to resolve. **NetCheck-CLI** solves this bottleneck by utilizing Python's `asyncio` framework and `aiohttp` client engine to achieve non-blocking concurrency over a single-threaded architecture. This cuts execution windows down from minutes to seconds under scale.
48
+
49
+ ---
50
+
51
+ ## 🛠️ Core Features
52
+
53
+ * **Asynchronous Concurrency:** Leverages a single-threaded Event Loop to manage hundreds of parallel network requests efficiently, eliminating thread context-switching overhead.
54
+ * **Persistent Connection Pooling:** Instantiates a unified `aiohttp.ClientSession` connection pool, preserving TCP sockets and mitigating the overhead of repeated TCP 3-way handshakes and TLS negotiations.
55
+ * **Strict Separation of Concerns (SoC):** Decouples target signature definitions entirely from execution logic using an external JSON configuration layer for seamless, zero-code target expanding.
56
+ * **Resilient Fault Isolation:** Encapsulates network exception handlers directly within individual execution workers, preventing localized connection drops or timeouts from halting the global queue.
57
+ * **Structured Telemetry Logs:** Generates highly deterministic, machine-readable JSON reports mapping aggregate performance statistics alongside detailed response criteria for downstream SIEM integration.
58
+ * **Cross-Platform UX:** Styled with cross-platform terminal auto-reset escape codes using `colorama` for unified formatting on both Windows PowerShell and Linux terminals.
59
+
60
+ ---
61
+
62
+ ## 📐 Architectural Design
63
+
64
+ ```
65
+ [CLI Flags: --target / --output]
66
+
67
+
68
+ [Parse JSON Target Registry]
69
+
70
+
71
+ [Async Event Loop Initiated]
72
+
73
+ ┌─────────────┼─────────────┐
74
+ ▼ ▼ ▼
75
+ [Worker Task] [Worker Task] [Worker Task] <-- Managed concurrently by Event Loop
76
+ │ │ │
77
+ └─────────────┼─────────────┘
78
+
79
+ [Data Aggregator Module]
80
+
81
+ ┌─────────┴─────────┐
82
+ ▼ ▼
83
+ [Terminal UI Log] [Structured JSON Export]
84
+ ```
85
+
86
+ ---
87
+
88
+ ## 🚀 Installation & Setup
89
+
90
+ ### Prerequisites
91
+ * Python 3.8 or higher
92
+ * Git
93
+
94
+ ### 1. Clone the Repository
95
+ ```bash
96
+ git clone https://github.com/dhruvrathod68/NetCheck-CLI.git
97
+
98
+ cd NetCheck-CLI
99
+ ```
100
+
101
+ ### 2. Environment Isolation & Package Setup
102
+
103
+ #### On Windows (PowerShell):
104
+ ```powershell
105
+ # Initialize virtual environment
106
+ python -m venv venv
107
+
108
+ # Activate virtual environment
109
+ .\venv\Scripts\Activate.ps1
110
+
111
+ # Install package in editable development mode
112
+ pip install -e .
113
+ ```
114
+
115
+ #### On Linux / Kali Linux (Bash):
116
+ ```bash
117
+ # Initialize virtual environment
118
+ python3 -m venv venv
119
+
120
+ # Activate virtual environment
121
+ source venv/bin/activate
122
+
123
+ # Install package in editable development mode
124
+ pip install -e .
125
+ ```
126
+
127
+ ---
128
+
129
+ ## 💻 Usage & Examples
130
+
131
+ The tool evaluates targets by reading signatures from `config/endpoints.json` and injecting runtime target values into string placeholder paths dynamically. Once installed, invoke using `netcheckcli` (or the shortcut `netcheck`).
132
+
133
+ ### Basic Application Execution
134
+ Run a validation check against the default endpoint registry and export logs to the default `results.json` matrix:
135
+
136
+ ```bash
137
+ netcheckcli --target "developer_handle"
138
+ ```
139
+
140
+ ### Custom Document Report Redirection
141
+ Target a specific system identifier and route the production JSON telemetry matrix directly to a custom file path:
142
+
143
+ ```bash
144
+ netcheckcli --target "audit-target-handle" --output telemetry_report.json
145
+ ```
146
+
147
+ ### Extending Target Databases
148
+ To add target networks without altering the source code, append entries directly to the database file at `config/endpoints.json`:
149
+
150
+ ```json
151
+ {
152
+ "name": "Custom_Platform_Service",
153
+ "url": "https://api.example.com/users/{}",
154
+ "validation_type": "status_code",
155
+ "expected_value": 200
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ## 📂 Project Directory Structure
162
+
163
+ ```plaintext
164
+ NetCheck-CLI/
165
+
166
+ ├── config/
167
+ │ └── endpoints.json # Decoupled Target Data Layer
168
+ ├── main.py # Core Asynchronous Execution Loop & CLI Entrypoint
169
+ ├── requirements.txt # Pinned Package Metadata Dependency List
170
+ ├── setup.py # Setuptools Package Configuration & Console Scripts
171
+ ├── LICENSE # MIT Operational License
172
+ └── README.md # Enterprise Documentation Module
173
+ ```
174
+
175
+ ---
176
+
177
+ ## 🤝 Contributing
178
+
179
+ Contributions are highly valued for optimizing throughput and expansion. For sweeping architecture updates, please open an execution issue first to discuss structural modifications.
180
+
181
+ 1. Fork the Repository
182
+ 2. Instantiate a Feature Branch (`git checkout -b feature/Optimization`)
183
+ 3. Commit Changes (`git commit -m 'Optimized event loop chunk management'`)
184
+ 4. Push to the Branch (`git push origin feature/Optimization`)
185
+ 5. Open a Pull Request
186
+
187
+ ---
188
+
189
+ ## 📜 License
190
+
191
+ Distributed under the MIT License. See `LICENSE` for further operational legal documentation.
@@ -0,0 +1,157 @@
1
+ # NetCheck-CLI
2
+
3
+ A high-performance, asynchronous digital identity validation and network endpoint auditing tool engineered in Python.
4
+
5
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
6
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
+ [![Architecture](https://img.shields.io/badge/architecture-AsyncIO--EventLoop-orange.svg)](https://docs.python.org/3/library/asyncio.html)
8
+
9
+ ## 📋 Description
10
+
11
+ **NetCheck-CLI** is a modular command-line utility designed for Security Engineers, Penetration Testers, and Site Reliability Engineers (SREs). It optimizes the discovery and auditing of digital footprints across enterprise systems, developer registries, and cloud infrastructure.
12
+
13
+ Traditional footprinting and status-checking tools execute requests sequentially, spending significant CPU idle time waiting for network I/O operations to resolve. **NetCheck-CLI** solves this bottleneck by utilizing Python's `asyncio` framework and `aiohttp` client engine to achieve non-blocking concurrency over a single-threaded architecture. This cuts execution windows down from minutes to seconds under scale.
14
+
15
+ ---
16
+
17
+ ## 🛠️ Core Features
18
+
19
+ * **Asynchronous Concurrency:** Leverages a single-threaded Event Loop to manage hundreds of parallel network requests efficiently, eliminating thread context-switching overhead.
20
+ * **Persistent Connection Pooling:** Instantiates a unified `aiohttp.ClientSession` connection pool, preserving TCP sockets and mitigating the overhead of repeated TCP 3-way handshakes and TLS negotiations.
21
+ * **Strict Separation of Concerns (SoC):** Decouples target signature definitions entirely from execution logic using an external JSON configuration layer for seamless, zero-code target expanding.
22
+ * **Resilient Fault Isolation:** Encapsulates network exception handlers directly within individual execution workers, preventing localized connection drops or timeouts from halting the global queue.
23
+ * **Structured Telemetry Logs:** Generates highly deterministic, machine-readable JSON reports mapping aggregate performance statistics alongside detailed response criteria for downstream SIEM integration.
24
+ * **Cross-Platform UX:** Styled with cross-platform terminal auto-reset escape codes using `colorama` for unified formatting on both Windows PowerShell and Linux terminals.
25
+
26
+ ---
27
+
28
+ ## 📐 Architectural Design
29
+
30
+ ```
31
+ [CLI Flags: --target / --output]
32
+
33
+
34
+ [Parse JSON Target Registry]
35
+
36
+
37
+ [Async Event Loop Initiated]
38
+
39
+ ┌─────────────┼─────────────┐
40
+ ▼ ▼ ▼
41
+ [Worker Task] [Worker Task] [Worker Task] <-- Managed concurrently by Event Loop
42
+ │ │ │
43
+ └─────────────┼─────────────┘
44
+
45
+ [Data Aggregator Module]
46
+
47
+ ┌─────────┴─────────┐
48
+ ▼ ▼
49
+ [Terminal UI Log] [Structured JSON Export]
50
+ ```
51
+
52
+ ---
53
+
54
+ ## 🚀 Installation & Setup
55
+
56
+ ### Prerequisites
57
+ * Python 3.8 or higher
58
+ * Git
59
+
60
+ ### 1. Clone the Repository
61
+ ```bash
62
+ git clone https://github.com/dhruvrathod68/NetCheck-CLI.git
63
+
64
+ cd NetCheck-CLI
65
+ ```
66
+
67
+ ### 2. Environment Isolation & Package Setup
68
+
69
+ #### On Windows (PowerShell):
70
+ ```powershell
71
+ # Initialize virtual environment
72
+ python -m venv venv
73
+
74
+ # Activate virtual environment
75
+ .\venv\Scripts\Activate.ps1
76
+
77
+ # Install package in editable development mode
78
+ pip install -e .
79
+ ```
80
+
81
+ #### On Linux / Kali Linux (Bash):
82
+ ```bash
83
+ # Initialize virtual environment
84
+ python3 -m venv venv
85
+
86
+ # Activate virtual environment
87
+ source venv/bin/activate
88
+
89
+ # Install package in editable development mode
90
+ pip install -e .
91
+ ```
92
+
93
+ ---
94
+
95
+ ## 💻 Usage & Examples
96
+
97
+ The tool evaluates targets by reading signatures from `config/endpoints.json` and injecting runtime target values into string placeholder paths dynamically. Once installed, invoke using `netcheckcli` (or the shortcut `netcheck`).
98
+
99
+ ### Basic Application Execution
100
+ Run a validation check against the default endpoint registry and export logs to the default `results.json` matrix:
101
+
102
+ ```bash
103
+ netcheckcli --target "developer_handle"
104
+ ```
105
+
106
+ ### Custom Document Report Redirection
107
+ Target a specific system identifier and route the production JSON telemetry matrix directly to a custom file path:
108
+
109
+ ```bash
110
+ netcheckcli --target "audit-target-handle" --output telemetry_report.json
111
+ ```
112
+
113
+ ### Extending Target Databases
114
+ To add target networks without altering the source code, append entries directly to the database file at `config/endpoints.json`:
115
+
116
+ ```json
117
+ {
118
+ "name": "Custom_Platform_Service",
119
+ "url": "https://api.example.com/users/{}",
120
+ "validation_type": "status_code",
121
+ "expected_value": 200
122
+ }
123
+ ```
124
+
125
+ ---
126
+
127
+ ## 📂 Project Directory Structure
128
+
129
+ ```plaintext
130
+ NetCheck-CLI/
131
+
132
+ ├── config/
133
+ │ └── endpoints.json # Decoupled Target Data Layer
134
+ ├── main.py # Core Asynchronous Execution Loop & CLI Entrypoint
135
+ ├── requirements.txt # Pinned Package Metadata Dependency List
136
+ ├── setup.py # Setuptools Package Configuration & Console Scripts
137
+ ├── LICENSE # MIT Operational License
138
+ └── README.md # Enterprise Documentation Module
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 🤝 Contributing
144
+
145
+ Contributions are highly valued for optimizing throughput and expansion. For sweeping architecture updates, please open an execution issue first to discuss structural modifications.
146
+
147
+ 1. Fork the Repository
148
+ 2. Instantiate a Feature Branch (`git checkout -b feature/Optimization`)
149
+ 3. Commit Changes (`git commit -m 'Optimized event loop chunk management'`)
150
+ 4. Push to the Branch (`git push origin feature/Optimization`)
151
+ 5. Open a Pull Request
152
+
153
+ ---
154
+
155
+ ## 📜 License
156
+
157
+ Distributed under the MIT License. See `LICENSE` for further operational legal documentation.
@@ -0,0 +1,76 @@
1
+ {
2
+ "endpoints": [
3
+ {
4
+ "name": "GitHub",
5
+ "url": "https://github.com/{}",
6
+ "validation_type": "status_code",
7
+ "expected_value": 200
8
+ },
9
+ {
10
+ "name": "DockerHub",
11
+ "url": "https://hub.docker.com/v2/users/{}/",
12
+ "validation_type": "status_code",
13
+ "expected_value": 200
14
+ },
15
+ {
16
+ "name": "GitLab",
17
+ "url": "https://gitlab.com/{}",
18
+ "validation_type": "status_code",
19
+ "expected_value": 200
20
+ },
21
+ {
22
+ "name": "PyPI (Python Packages)",
23
+ "url": "https://pypi.org/user/{}/",
24
+ "validation_type": "status_code",
25
+ "expected_value": 200
26
+ },
27
+ {
28
+ "name": "NPM Registry",
29
+ "url": "https://www.npmjs.com/~{}",
30
+ "validation_type": "status_code",
31
+ "expected_value": 200
32
+ },
33
+ {
34
+ "name": "Dev.to",
35
+ "url": "https://dev.to/{}",
36
+ "validation_type": "status_code",
37
+ "expected_value": 200
38
+ },
39
+ {
40
+ "name": "Hashnode",
41
+ "url": "https://hashnode.com/@{}",
42
+ "validation_type": "status_code",
43
+ "expected_value": 200
44
+ },
45
+ {
46
+ "name": "Reddit",
47
+ "url": "https://www.reddit.com/user/{}/",
48
+ "validation_type": "status_code",
49
+ "expected_value": 200
50
+ },
51
+ {
52
+ "name": "Vimeo",
53
+ "url": "https://vimeo.com/{}",
54
+ "validation_type": "status_code",
55
+ "expected_value": 200
56
+ },
57
+ {
58
+ "name": "Pinterest",
59
+ "url": "https://www.pinterest.com/{}/",
60
+ "validation_type": "status_code",
61
+ "expected_value": 200
62
+ },
63
+ {
64
+ "name": "BuyMeACoffee",
65
+ "url": "https://www.buymeacoffee.com/{}",
66
+ "validation_type": "status_code",
67
+ "expected_value": 200
68
+ },
69
+ {
70
+ "name": "Bitbucket API",
71
+ "url": "https://api.bitbucket.org/2.0/users/{}",
72
+ "validation_type": "status_code",
73
+ "expected_value": 200
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,141 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ NetCheck-CLI: A high-performance, asynchronous digital identity validation
4
+ and network endpoint auditing utility.
5
+ """
6
+
7
+ import asyncio
8
+ import json
9
+ import argparse
10
+ import sys
11
+ import os
12
+ import aiohttp
13
+ from typing import List, Dict, Any
14
+ from colorama import Fore, Style, init
15
+
16
+ # Initialize colorama for cross-platform auto-resetting terminal colors
17
+ init(autoreset=True)
18
+
19
+ def load_endpoints(filepath: str = "config/endpoints.json", target: str = None) -> List[Dict[str, Any]]:
20
+ """
21
+ Reads the configuration file, returns the list of target endpoints,
22
+ and dynamically formats placeholder URLs if a target value is provided.
23
+ """
24
+ try:
25
+ resolved_path = filepath
26
+ if not os.path.isabs(filepath) and not os.path.exists(filepath):
27
+ module_dir = os.path.dirname(os.path.abspath(__file__))
28
+ alt_path = os.path.join(module_dir, filepath)
29
+ if os.path.exists(alt_path):
30
+ resolved_path = alt_path
31
+
32
+ with open(resolved_path, "r", encoding="utf-8") as f:
33
+ data: Dict[str, Any] = json.load(f)
34
+ endpoints: List[Dict[str, Any]] = data.get("endpoints", [])
35
+
36
+ if target:
37
+ for ep in endpoints:
38
+ url: str = ep.get("url", "")
39
+ if "{}" in url:
40
+ ep["url"] = url.format(target)
41
+ return endpoints
42
+ except (FileNotFoundError, json.JSONDecodeError) as e:
43
+ print(f"{Fore.RED}[CONFIG ERROR] Failed to load configuration: {e}{Style.RESET_ALL}")
44
+ return []
45
+
46
+ async def check_endpoint(session: aiohttp.ClientSession, endpoint_data: Dict[str, Any]) -> Dict[str, Any]:
47
+ """
48
+ Executes an explicit status check on a target endpoint using an active ClientSession.
49
+ Returns a structured dictionary matching the telemetry logging schema.
50
+ """
51
+ name: str = endpoint_data.get("name", "Unknown Service")
52
+ url: str = endpoint_data.get("url", "")
53
+ expected: int = endpoint_data.get("expected_value", 200)
54
+
55
+ record: Dict[str, Any] = {
56
+ "service_name": name,
57
+ "target_url": url,
58
+ "expected_value": expected,
59
+ "status_code": None,
60
+ "match_status": False
61
+ }
62
+
63
+ if not url:
64
+ print(f"{Fore.RED}[ERROR] Service '{name}' is missing a target URL.{Style.RESET_ALL}")
65
+ record["status_code"] = "MISSING_URL"
66
+ return record
67
+
68
+ timeout = aiohttp.ClientTimeout(total=5.0)
69
+
70
+ try:
71
+ async with session.get(url, timeout=timeout) as response:
72
+ status: int = response.status
73
+ matched: bool = (status == expected)
74
+ record["status_code"] = status
75
+ record["match_status"] = matched
76
+ if matched:
77
+ print(f"{Fore.GREEN}[PASS] {name} ({url}) | Expected: {expected} | Got: {status}{Style.RESET_ALL}")
78
+ else:
79
+ print(f"{Fore.RED}[FAIL] {name} ({url}) | Expected: {expected} | Got: {status}{Style.RESET_ALL}")
80
+ except asyncio.TimeoutError:
81
+ print(f"{Fore.RED}[TIMEOUT] {name} ({url}) | Expected: {expected} | Timeout of 5.0s exceeded{Style.RESET_ALL}")
82
+ record["status_code"] = "TIMEOUT"
83
+ except aiohttp.ClientError as e:
84
+ print(f"{Fore.RED}[ERROR] {name} ({url}) | Expected: {expected} | Connection/DNS Error: {e}{Style.RESET_ALL}")
85
+ record["status_code"] = "CLIENT_ERROR"
86
+
87
+ return record
88
+
89
+ def save_report(filepath: str, records: List[Dict[str, Any]]) -> None:
90
+ """
91
+ Writes the audit telemetry records to a structured JSON file on disk.
92
+ """
93
+ try:
94
+ report: Dict[str, Any] = {
95
+ "total_checks": len(records),
96
+ "successful_checks": sum(1 for r in records if r["match_status"]),
97
+ "failed_checks": sum(1 for r in records if not r["match_status"]),
98
+ "results": records
99
+ }
100
+ with open(filepath, "w", encoding="utf-8") as f:
101
+ json.dump(report, f, indent=4)
102
+ print(f"\n{Fore.GREEN}[REPORT] Uptime report successfully written to '{filepath}'.{Style.RESET_ALL}")
103
+ except IOError as e:
104
+ print(f"{Fore.RED}[REPORT ERROR] Failed to write report to '{filepath}': {e}{Style.RESET_ALL}")
105
+
106
+ async def main() -> None:
107
+ """
108
+ Main asynchronous coordinator function. Handles argument parsing, session pooling,
109
+ and workflow scheduling.
110
+ """
111
+ parser = argparse.ArgumentParser(description="NetCheck-CLI: Concurrent endpoint status checks and monitoring.")
112
+ parser.add_argument("--target", type=str, help="The string identifier to dynamically inject into endpoints with '{}' placeholders.")
113
+ parser.add_argument("--output", type=str, default="results.json", help="File path to export JSON results (default: results.json).")
114
+ args = parser.parse_args()
115
+
116
+ endpoints: List[Dict[str, Any]] = load_endpoints(target=args.target)
117
+ if not endpoints:
118
+ print(f"{Fore.YELLOW}[WARN] No endpoints configured. Exiting...{Style.RESET_ALL}")
119
+ return
120
+
121
+ print(f"{Fore.CYAN}Starting NetCheck-CLI on {len(endpoints)} endpoints...{Style.RESET_ALL}")
122
+ if args.target:
123
+ print(f"{Fore.CYAN}Target identifier: '{args.target}'{Style.RESET_ALL}")
124
+ print()
125
+
126
+ async with aiohttp.ClientSession() as session:
127
+ tasks = [check_endpoint(session, endpoint) for endpoint in endpoints]
128
+ records: List[Dict[str, Any]] = await asyncio.gather(*tasks)
129
+
130
+ save_report(args.output, records)
131
+
132
+ def cli() -> None:
133
+ """CLI entrypoint for console_scripts."""
134
+ try:
135
+ asyncio.run(main())
136
+ except KeyboardInterrupt:
137
+ print(f"\n{Fore.YELLOW}Audit interrupted by user.{Style.RESET_ALL}")
138
+ sys.exit(0)
139
+
140
+ if __name__ == "__main__":
141
+ cli()
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: netcheck-osint
3
+ Version: 0.1.0
4
+ Summary: A high-performance, asynchronous digital identity validation and network endpoint auditing tool.
5
+ Author: Dhruv Rathod
6
+ Classifier: Development Status :: 4 - Beta
7
+ Classifier: Intended Audience :: Information Technology
8
+ Classifier: Intended Audience :: System Administrators
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Security
18
+ Classifier: Topic :: System :: Networking :: Monitoring
19
+ Classifier: Environment :: Console
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: aiohttp==3.11.11
24
+ Requires-Dist: python-dotenv==1.0.1
25
+ Requires-Dist: colorama==0.4.6
26
+ Dynamic: author
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: license-file
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
34
+
35
+ # NetCheck-CLI
36
+
37
+ A high-performance, asynchronous digital identity validation and network endpoint auditing tool engineered in Python.
38
+
39
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
40
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
41
+ [![Architecture](https://img.shields.io/badge/architecture-AsyncIO--EventLoop-orange.svg)](https://docs.python.org/3/library/asyncio.html)
42
+
43
+ ## 📋 Description
44
+
45
+ **NetCheck-CLI** is a modular command-line utility designed for Security Engineers, Penetration Testers, and Site Reliability Engineers (SREs). It optimizes the discovery and auditing of digital footprints across enterprise systems, developer registries, and cloud infrastructure.
46
+
47
+ Traditional footprinting and status-checking tools execute requests sequentially, spending significant CPU idle time waiting for network I/O operations to resolve. **NetCheck-CLI** solves this bottleneck by utilizing Python's `asyncio` framework and `aiohttp` client engine to achieve non-blocking concurrency over a single-threaded architecture. This cuts execution windows down from minutes to seconds under scale.
48
+
49
+ ---
50
+
51
+ ## 🛠️ Core Features
52
+
53
+ * **Asynchronous Concurrency:** Leverages a single-threaded Event Loop to manage hundreds of parallel network requests efficiently, eliminating thread context-switching overhead.
54
+ * **Persistent Connection Pooling:** Instantiates a unified `aiohttp.ClientSession` connection pool, preserving TCP sockets and mitigating the overhead of repeated TCP 3-way handshakes and TLS negotiations.
55
+ * **Strict Separation of Concerns (SoC):** Decouples target signature definitions entirely from execution logic using an external JSON configuration layer for seamless, zero-code target expanding.
56
+ * **Resilient Fault Isolation:** Encapsulates network exception handlers directly within individual execution workers, preventing localized connection drops or timeouts from halting the global queue.
57
+ * **Structured Telemetry Logs:** Generates highly deterministic, machine-readable JSON reports mapping aggregate performance statistics alongside detailed response criteria for downstream SIEM integration.
58
+ * **Cross-Platform UX:** Styled with cross-platform terminal auto-reset escape codes using `colorama` for unified formatting on both Windows PowerShell and Linux terminals.
59
+
60
+ ---
61
+
62
+ ## 📐 Architectural Design
63
+
64
+ ```
65
+ [CLI Flags: --target / --output]
66
+
67
+
68
+ [Parse JSON Target Registry]
69
+
70
+
71
+ [Async Event Loop Initiated]
72
+
73
+ ┌─────────────┼─────────────┐
74
+ ▼ ▼ ▼
75
+ [Worker Task] [Worker Task] [Worker Task] <-- Managed concurrently by Event Loop
76
+ │ │ │
77
+ └─────────────┼─────────────┘
78
+
79
+ [Data Aggregator Module]
80
+
81
+ ┌─────────┴─────────┐
82
+ ▼ ▼
83
+ [Terminal UI Log] [Structured JSON Export]
84
+ ```
85
+
86
+ ---
87
+
88
+ ## 🚀 Installation & Setup
89
+
90
+ ### Prerequisites
91
+ * Python 3.8 or higher
92
+ * Git
93
+
94
+ ### 1. Clone the Repository
95
+ ```bash
96
+ git clone https://github.com/dhruvrathod68/NetCheck-CLI.git
97
+
98
+ cd NetCheck-CLI
99
+ ```
100
+
101
+ ### 2. Environment Isolation & Package Setup
102
+
103
+ #### On Windows (PowerShell):
104
+ ```powershell
105
+ # Initialize virtual environment
106
+ python -m venv venv
107
+
108
+ # Activate virtual environment
109
+ .\venv\Scripts\Activate.ps1
110
+
111
+ # Install package in editable development mode
112
+ pip install -e .
113
+ ```
114
+
115
+ #### On Linux / Kali Linux (Bash):
116
+ ```bash
117
+ # Initialize virtual environment
118
+ python3 -m venv venv
119
+
120
+ # Activate virtual environment
121
+ source venv/bin/activate
122
+
123
+ # Install package in editable development mode
124
+ pip install -e .
125
+ ```
126
+
127
+ ---
128
+
129
+ ## 💻 Usage & Examples
130
+
131
+ The tool evaluates targets by reading signatures from `config/endpoints.json` and injecting runtime target values into string placeholder paths dynamically. Once installed, invoke using `netcheckcli` (or the shortcut `netcheck`).
132
+
133
+ ### Basic Application Execution
134
+ Run a validation check against the default endpoint registry and export logs to the default `results.json` matrix:
135
+
136
+ ```bash
137
+ netcheckcli --target "developer_handle"
138
+ ```
139
+
140
+ ### Custom Document Report Redirection
141
+ Target a specific system identifier and route the production JSON telemetry matrix directly to a custom file path:
142
+
143
+ ```bash
144
+ netcheckcli --target "audit-target-handle" --output telemetry_report.json
145
+ ```
146
+
147
+ ### Extending Target Databases
148
+ To add target networks without altering the source code, append entries directly to the database file at `config/endpoints.json`:
149
+
150
+ ```json
151
+ {
152
+ "name": "Custom_Platform_Service",
153
+ "url": "https://api.example.com/users/{}",
154
+ "validation_type": "status_code",
155
+ "expected_value": 200
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ## 📂 Project Directory Structure
162
+
163
+ ```plaintext
164
+ NetCheck-CLI/
165
+
166
+ ├── config/
167
+ │ └── endpoints.json # Decoupled Target Data Layer
168
+ ├── main.py # Core Asynchronous Execution Loop & CLI Entrypoint
169
+ ├── requirements.txt # Pinned Package Metadata Dependency List
170
+ ├── setup.py # Setuptools Package Configuration & Console Scripts
171
+ ├── LICENSE # MIT Operational License
172
+ └── README.md # Enterprise Documentation Module
173
+ ```
174
+
175
+ ---
176
+
177
+ ## 🤝 Contributing
178
+
179
+ Contributions are highly valued for optimizing throughput and expansion. For sweeping architecture updates, please open an execution issue first to discuss structural modifications.
180
+
181
+ 1. Fork the Repository
182
+ 2. Instantiate a Feature Branch (`git checkout -b feature/Optimization`)
183
+ 3. Commit Changes (`git commit -m 'Optimized event loop chunk management'`)
184
+ 4. Push to the Branch (`git push origin feature/Optimization`)
185
+ 5. Open a Pull Request
186
+
187
+ ---
188
+
189
+ ## 📜 License
190
+
191
+ Distributed under the MIT License. See `LICENSE` for further operational legal documentation.
@@ -0,0 +1,13 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ main.py
5
+ requirements.txt
6
+ setup.py
7
+ config/endpoints.json
8
+ netcheck_osint.egg-info/PKG-INFO
9
+ netcheck_osint.egg-info/SOURCES.txt
10
+ netcheck_osint.egg-info/dependency_links.txt
11
+ netcheck_osint.egg-info/entry_points.txt
12
+ netcheck_osint.egg-info/requires.txt
13
+ netcheck_osint.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ netcheck = main:cli
3
+ netcheckcli = main:cli
@@ -0,0 +1,3 @@
1
+ aiohttp==3.11.11
2
+ python-dotenv==1.0.1
3
+ colorama==0.4.6
@@ -0,0 +1,3 @@
1
+ aiohttp==3.11.11
2
+ python-dotenv==1.0.1
3
+ colorama==0.4.6
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,58 @@
1
+ from setuptools import setup
2
+ import os
3
+
4
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
5
+
6
+ readme_path = os.path.join(BASE_DIR, "README.md")
7
+ with open(readme_path, "r", encoding="utf-8") as f:
8
+ long_description = f.read()
9
+
10
+ req_path = os.path.join(BASE_DIR, "requirements.txt")
11
+ if os.path.exists(req_path):
12
+ with open(req_path, "r", encoding="utf-8") as f:
13
+ install_requires = [
14
+ line.strip() for line in f if line.strip() and not line.startswith("#")
15
+ ]
16
+ else:
17
+ install_requires = [
18
+ "aiohttp==3.11.11",
19
+ "python-dotenv==1.0.1",
20
+ "colorama==0.4.6",
21
+ ]
22
+
23
+ setup(
24
+ name="netcheck-osint",
25
+ version="0.1.0",
26
+ description="A high-performance, asynchronous digital identity validation and network endpoint auditing tool.",
27
+ long_description=long_description,
28
+ long_description_content_type="text/markdown",
29
+ author="Dhruv Rathod",
30
+ py_modules=["main"],
31
+ package_data={"": ["config/*.json"]},
32
+ include_package_data=True,
33
+ install_requires=install_requires,
34
+ entry_points={
35
+ "console_scripts": [
36
+ "netcheck=main:cli",
37
+ "netcheckcli=main:cli",
38
+ ],
39
+ },
40
+ classifiers=[
41
+ "Development Status :: 4 - Beta",
42
+ "Intended Audience :: Information Technology",
43
+ "Intended Audience :: System Administrators",
44
+ "License :: OSI Approved :: MIT License",
45
+ "Operating System :: OS Independent",
46
+ "Programming Language :: Python :: 3",
47
+ "Programming Language :: Python :: 3.8",
48
+ "Programming Language :: Python :: 3.9",
49
+ "Programming Language :: Python :: 3.10",
50
+ "Programming Language :: Python :: 3.11",
51
+ "Programming Language :: Python :: 3.12",
52
+ "Topic :: Security",
53
+ "Topic :: System :: Networking :: Monitoring",
54
+ "Environment :: Console",
55
+ ],
56
+ python_requires=">=3.8",
57
+ )
58
+