A modern Python network reconnaissance and diagnostics toolkit.
Project description
NetTools CLI
A modern Python network reconnaissance toolkit.
Overview
NetTools CLI is a modular Python command-line toolkit for authorized network diagnostics and service discovery. It brings together several common reconnaissance workflows — port scanning, DNS analysis, subdomain enumeration, web inspection, and assessment reporting — into a single, consistent CLI built on top of Typer and Rich.
NetTools CLI is intended for:
- Security teams and penetration testers performing authorized assessments
- System administrators auditing infrastructure they manage
- DevOps and network engineers diagnosing connectivity and DNS issues
- Students and researchers learning about network diagnostics in a controlled, ethical context
NetTools CLI is not a hacking tool, and it is not designed to bypass authorization, evade detection, or exploit vulnerabilities. It is a diagnostics and reporting utility intended to help authorized users understand the state of systems they are responsible for or have explicit permission to test.
Features
- TCP port scanning — Identify open, closed, and filtered TCP ports on target hosts
- DNS lookup — Query common DNS record types (A, AAAA, MX, TXT, NS, CNAME, and more)
- Subdomain enumeration — Discover subdomains using wordlist-based and passive techniques
- Website inspection — Inspect HTTP/HTTPS endpoints, headers, TLS certificate details, and basic metadata
- Unified assessment workflow — Run scan, DNS, subdomain, and web checks together in a single pass
- HTML report generation — Produce clean, shareable HTML reports summarizing findings
- JSON output support — Machine-readable output for every command, suitable for automation and pipelines
- Modular architecture — Each capability lives in its own module, making the codebase easy to extend and maintain
Architecture
NetTools CLI follows a src-based package layout, keeping the installable package isolated from project tooling and tests.
nettools-cli/
├── src/
│ └── nettools/
│ ├── __init__.py
│ ├── cli/
│ │ ├── app.py
│ │ ├── scan.py
│ │ ├── dns.py
│ │ ├── subdomains.py
│ │ ├── web.py
│ │ ├── assess.py
│ │ └── report.py
│ │
│ ├── core/
│ ├── scanner/
│ ├── dns/
│ ├── subdomains/
│ ├── web/
│ └── report/
Each command module is responsible for a single capability and exposes a clear, testable interface. Shared logic (networking primitives, formatting, configuration) lives under core/ and output/ so commands stay thin and consistent.
Installation
From PyPI
pip install nettools-cli
From source
git clone https://github.com/sujalsubedi06/nettools-cli
cd nettools-cli
pip install -e .
NetTools CLI requires Python 3.13 or later.
Usage
View all available commands:
nettools --help
Scan common TCP ports on a target:
nettools scan example.com
Perform DNS lookups:
nettools dns example.com
Run a full assessment (scan, DNS, subdomains, and web inspection together):
nettools assess example.com
Generate an HTML report from previous results:
nettools report --help
Other available commands:
nettools subdomains example.com
nettools web example.com
nettools version
Most commands support a --json flag for machine-readable output, suitable for scripting or integration with other tools:
nettools scan example.com --json
Configuration
NetTools CLI can be configured via a project-level configuration file, environment variables, or command-line flags, in increasing order of precedence.
- Configuration file:
nettools.tomlin the current working directory, or a path passed via--config - Environment variables: prefixed with
NETTOOLS_(e.g.NETTOOLS_TIMEOUT,NETTOOLS_MAX_WORKERS) - CLI flags: passed directly to individual commands (e.g.
--timeout,--ports,--output)
Common configurable options include:
| Option | Description | Default |
|---|---|---|
timeout |
Per-connection timeout in seconds | 3 |
max_workers |
Concurrent worker threads/processes | 50 |
ports |
Port range or list to scan | Common ports (top 1000) |
output_dir |
Directory for reports and JSON output | ./nettools-output |
wordlist |
Wordlist path for subdomain enumeration | Bundled default wordlist |
Refer to nettools <command> --help for the full set of options available on each command.
Development Setup
Clone the repository and set up a local development environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
Run the test suite:
pytest -v
Run linting and type checks:
ruff check .
ruff format .
mypy
Testing
NetTools CLI uses pytest for automated testing, with unit tests covering individual modules and integration tests covering end-to-end CLI behavior against controlled, local test fixtures. Networking calls in tests are mocked or run against local/loopback targets to keep the suite deterministic and safe to run in CI.
To run the full suite with verbose output:
pytest -v
Contributions are expected to include appropriate test coverage for new functionality. Continuous integration runs the test suite, ruff check, and mypy on every pull request.
Roadmap
Planned and potential future improvements include:
- Asynchronous scanning engine for improved performance on large port ranges
- Additional DNS record types and DNSSEC validation checks
- Plugin system for custom assessment modules
- PDF export for assessment reports
- Configurable scan profiles (fast, thorough, stealth-safe timing)
- Expanded passive subdomain enumeration sources
- Structured logging and verbosity controls
Roadmap items are tracked and discussed in the project's GitHub Issues.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md for guidelines on:
- Setting up your development environment
- Coding standards and style (enforced via Ruff and Mypy)
- Commit message conventions
- Submitting pull requests and what reviewers look for
Security
If you discover a security vulnerability in NetTools CLI itself, please do not open a public issue. Instead, follow the responsible disclosure process described in SECURITY.md.
License
NetTools CLI is released under the MIT License.
Responsible Usage
NetTools CLI is a diagnostic and reporting tool intended strictly for authorized use.
- Only use NetTools CLI against systems, networks, and domains that you own, or for which you have explicit, documented permission to test.
- NetTools CLI is intended for authorized diagnostics, auditing, and educational purposes only.
- Unauthorized scanning, enumeration, or assessment of systems you do not own or have permission to test may violate laws and regulations in your jurisdiction, as well as the terms of service of the target system's provider.
- Users are solely responsible for ensuring their use of NetTools CLI complies with all applicable laws and any agreements governing the systems being tested.
The maintainers of NetTools CLI assume no liability for misuse of this software.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nettools_cli-1.0.1.tar.gz.
File metadata
- Download URL: nettools_cli-1.0.1.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ab6d3662b7362c4f44244f3291d3af220121edf8023a3f21d5adad82a3448a4
|
|
| MD5 |
1c793477837b1c04d689f9e27f78426e
|
|
| BLAKE2b-256 |
21bf8c0367cec9cee1a36c95ecfbcb85959f4b4fb7ca3ccecedcb5bad4c9f2a3
|
File details
Details for the file nettools_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nettools_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54276ca393ac080a483bc146e325995965fece764db12e54e07ced8f790ec9d
|
|
| MD5 |
976ff0575354269dcc4db4eaf993a120
|
|
| BLAKE2b-256 |
682dd90890af1682e3afc6c5bf44239ad525f7a405001d8561bfd72e8fd0019d
|