Skip to content

A modular and beginner-friendly Python vulnerability scanner with port scanning, real-time CVE detection, CVSS-based risk scoring, and auto-generated PDF reports.

License

Notifications You must be signed in to change notification settings

tanujkumar2405/VulnHawk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VulnHawk - Python-Based Vulnerability Scanner

Welcome to VulnHawk — a powerful and educational open-source vulnerability scanner built in Python.

This repository includes two versions of the scanner:

  1. Basic Scanner – Great for learning port scanning fundamentals.
  2. Advanced Scanner – A comprehensive vulnerability assessment tool that integrates Nmap, CVE lookups, PDF reporting, and risk scoring.

🔍 Table of Contents


Project Overview

VulnHawk is built for learners, ethical hackers, and cybersecurity enthusiasts. It starts with the fundamentals and scales to a semi-professional tool that demonstrates:

  • Port scanning
  • Service fingerprinting
  • Vulnerability detection (CVE lookup)
  • Report generation

Basic Scanner

Description

A simple port scanner using Python’s built-in socket module. It scans a given range of ports and prints all open ports on the target.

Ideal for beginners who want to:

  • Understand TCP handshakes
  • Learn how port scanners work from scratch

Usage

cd basic/
python basic_scanner.py
  • Enter the target IP/domain.
  • Provide the port range (start & end).
  • See the list of open ports.

Requirements

  • Python 3.x (tested with Python 3.6+)
  • No external libraries needed

Advanced Scanner

Advanced Description

The advanced version elevates the scanner by using:

  • nmap for detailed port & service scanning
  • Public CVE databases for vulnerability detection
  • fpdf for professional report generation

This tool suits intermediate to advanced users and demonstrates real-world vulnerability scanning practices.

Features

  • 🛠 Service & version detection via Nmap

  • 🧠 Automatic CVE lookup (via Vulners API)

  • 📝 Generates PDF reports with:

    • Scan summary
    • Detected services & vulnerabilities
    • OS info, uptime, and traceroute
    • CVSS-based risk scoring with color-coded severity
  • 📊 Output in both terminal and PDF format

Setup & Requirements

Install the dependencies:

pip install nmap requests fpdf

Install Nmap:

Ensure the fonts/ folder exists in advanced/ directory:

  • Contains required fonts for PDF: DejaVuSans.ttf, DejaVuSans-Bold.ttf, DejaVuSans-Oblique.ttf

Advanced Usage

cd advanced/
python scanner.py
  • Enter target IP/domain
  • Optional: Generate a PDF report

Scan results and CVEs are displayed in the terminal and saved to a PDF report.


Folder Structure

vuln-hawk/
├── basic/
│   ├── info/
│   │   ├── .gitignore_info.txt
│   │   ├── basic_scanner_info.txt
│   ├── .gitignore
│   └── basic_scanner.py
├── advanced/
│   ├── scanner.py
│   ├── cve_lookup.py
│   ├── generate_report.py
│   ├── .gitignore
│   ├── README.md
│   ├── requirements.txt
│   ├── fonts/
│   │   ├── DejaVuSans.ttf
│   │   ├── DejaVuSans-Bold.ttf
│   │   └── DejaVuSans-Oblique.ttf
│   ├── info/
│   │   ├── .gitignore_info.txt
│   │   ├── cve_lookup_info.md
│   │   ├── generate_report_info.md
│   │   ├── requirements_info.md
│   │   ├── scanner_info.md
├── LICENSE
└── README.md

Contributing

All contributions are welcome! You can:

  • Report bugs or open issues
  • Suggest new features
  • Submit pull requests

Make sure your code is tested and well-documented before submitting.


Feedback

Got a bug, feature request, or improvement idea? 👉 Open an issue or start a discussion on GitHub Issues


License

This project is licensed under the MIT License — see the LICENSE file for details.


Author

Built and maintained by Tanuj Kumar. — Creator and Maintainer
GitHub | LinkedIn

If you find this project useful, please ⭐ the repository and share it with others.


Happy Scanning

Just a developer who loves breaking and fixing stuff.
Tanuj Kumar 💻🔐