Repository navigation
v2.0.0 is a major release that rebuilds the entire codebase from the ground up.
The tool has been fully restructured into a production-grade Python package with proper
testing, linting, CI/CD, and developer tooling.
Note: This is a breaking change from v1.7.0. The standalone
main_v1.7.pyscript has been removed and replaced with a proper package. See the Quick Start section below.
What's New
Added
- Modular
src/nmap_scanning_toolpackage with dedicated modules:cli.py- Interactive CLI entrypoint and user promptsscanner.py- Core scanning logic and subprocess handlingmodels.py- Typed data models for targets, ports, and profilesprofiles.py- 12 predefined scan profiles as typed objectsvalidation.py- Input validation with descriptive error messagesconfig.py- Centralized runtime configurationerrors.py- Custom exception hierarchy
- New unified entrypoint
main.py(replacesmain_v1.7.py) pyproject.tomlwith Hatchling build, Ruff linter, mypy type checking, and pytest configuration- Full test suite under
tests/with unit and integration tests (80% coverage threshold enforced) - GitHub Actions CI pipeline with lint, type check, test, build, and dependency audit stages
- Pre-commit hooks via
.pre-commit-config.yaml - Dockerfile for containerized usage
- Makefile for common developer commands
- Dependabot configuration for automated dependency updates
- Issue templates (bug report, feature request) and PR template
- Community files:
LICENSE(MIT),CHANGELOG.md,CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.md .editorconfigand.env.example
Changed
- Replaced monolithic script with a fully modular CLI and scanner service architecture
- Updated
README.mdwith full setup, usage, testing, and project structure documentation - Updated
requirements.txtwith pinned version ranges
Fixed
- Improved open-port output filtering to prevent false positives
- Eliminated inconsistent file references and outdated command examples in documentation
Requirements
- Python 3.10+
- Nmap installed and available on PATH
- Python packages:
pyfiglet>=1.0.2,termcolor>=2.4.0
Quick Start
# Install dependencies
pip install -r requirements.txt
# Run the scanner
python main.pyOr install as a package:
pip install .
nmap-scannerScan Profiles
| # | Profile | Nmap Flags |
|---|---|---|
| 1 | SYN Scan | -sS -O |
| 2 | Aggressive Scan | -A |
| 3 | Service Version Detection | -sV |
| 4 | Vulnerability Scan | --script=vuln |
| 5 | Heartbleed Check | --script=ssl-heartbleed |
| 6 | HTTP Security Headers | --script=http-security-headers |
| 7 | SQL Injection Check | --script=http-sql-injection |
| 8 | SMB Vulnerability Scan | --script=smb-vuln* |
| 9 | SSL/TLS Cipher Enumeration | --script=ssl-enum-ciphers |
| 10 | Service Discovery | --script=default |
| 11 | OS Detection | -O |
| 12 | Custom Scan | (enter your own flags) |
Full changelog: https://github.com/SagarBiswas-MultiHAT/NmapScanningTool/blob/main/CHANGELOG.md