A lightweight local network vulnerability scanner built using Python and Nmap.
It scans a local subnet or target IP, detects risky services, assigns CVSS‑style severity, and generates HTML & PDF reports.
- Scan local network or custom target
- Detect:
- Open ports
- Weak / risky services
- Outdated service versions
- Potential default credential risks
- CVSS-style scoring & severity levels
- CLI-based tool
- Generates:
- HTML report
- PDF report (optional)
- Clean project structure (reports/ directory)
Most vulnerability scanners are heavy, commercial, or cloud-based. This tool focuses on:
- Local environments
- Fast visibility
- Clear prioritization
- Offline report generation
- Python 3.x
- Nmap
- python-nmap
- pdfkit
- wkhtmltopdf
vuln-scanner/
├── scanner.py # Main scanner logic
├── reports/ # Generated scan reports
│ ├── *.html
│ └── *.pdf
└── README.md
Download and install Nmap from:
https://nmap.org/download.html
Verify:
nmap --versionpython -m venv venv
venv\Scripts\activatepip install python-nmap pdfkitDownload from:
https://wkhtmltopdf.org/downloads.html
Default install path used in code:
The tool assumes wkhtmltopdf is available in system PATH.
If installed elsewhere, update the path inside scanner.py.
Tested on:
- Windows
- Linux (Ubuntu)
python scanner.pyScans local /24 subnet and generates:
reports/scan_report.html
python scanner.py --pdfGenerates:
reports/scan_report.html
reports/scan_report.pdf
python scanner.py --target 192.168.0.10or subnet:
python scanner.py --target 192.168.0.0/26python scanner.py --output office_scan --pdfOutput:
reports/office_scan.html
reports/office_scan.pdf
- Detects local subnet automatically (default /24)
- Uses Nmap for:
- Host discovery
- Port scanning
- Service version detection
- Applies rule-based logic:
- Weak services (FTP, Telnet, SMB, etc.)
- Default credential risk ports
- Outdated software versions
- Calculates CVSS-style score
- Assigns severity:
- Low
- Medium
- High
- Critical
- Generates professional reports
192.168.1.0/24
Generated reports include:
- Target summary
- Open ports & services
- Risk explanation
- Severity classification
Example: reports/scan_report.html reports/scan_report.pdf
This tool uses a simplified, rule-based CVSS-style scoring system. It is NOT a full CVSS v3.1 implementation.
| CVSS Score | Severity |
|---|---|
| 9.0 – 10 | Critical |
| 7.0 – 8.9 | High |
| 4.0 – 6.9 | Medium |
| < 4.0 | Low |
Scores are calculated based on:
- Service type risk
- Port exposure
- Known weak protocols
- Version age indicators
The goal is prioritization, not formal compliance.
This tool is intended only for educational purposes and authorized testing.
Do NOT scan networks you do not own or have permission to test.
- JSON export
- Severity filtering
- NSE vulnerability scripts
- Banner grabbing
- OS detection
- Web dashboard