Skip to content

bmodha/pentest-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pentest Visualizer

A Python script that processes nmap XML output and generates an XLSX spreadsheet for pentest kickoff activities.

Features

  • Processes nmap XML output files
  • Creates a comprehensive XLSX spreadsheet with:
    • Summary sheet with all scanned IPs, scan status, and open port counts
    • List of unique ports and their associated services
    • Individual sheets per IP address with detailed scan results
  • Outputs unique ports and services table to CLI/terminal
  • Future-ready for commands.json generation (not implemented yet)

Requirements

  • Python 3.6+
  • pandas
  • openpyxl

Installation

Quick Setup

# Run the setup script (recommended)
./setup.sh

Manual Setup

  1. Clone or download this repository
  2. Create a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install required dependencies:
    pip install -r requirements.txt

Usage

Basic Usage

python pentest_visualizer.py <nmap_xml_file>

With Custom Output File

python pentest_visualizer.py <nmap_xml_file> -o custom_output.xlsx

Example

# Activate virtual environment first
source venv/bin/activate

# Run with sample data
python pentest_visualizer.py sample_nmap.xml -o pentest_results.xlsx

# Or run the example script
./example_usage.sh

Output

The script generates:

  1. XLSX Spreadsheet with multiple sheets:

    • Summary: Overview of all hosts, their status, open port counts, and unique ports/services
    • Individual IP sheets: Detailed scan results for each IP (e.g., "192_168_1_1", "192_168_1_10")
  2. CLI Output: Table showing unique ports and services identified during the scan

Sample Data

A sample nmap XML file (sample_nmap.xml) is included for testing purposes.

Future Enhancements

  • Commands.json generation for enumeration commands per service (planned but not implemented)

Example Output Structure

Summary Sheet

IP Address Scan Status Open Ports Count
192.168.1.1 up 3
192.168.1.10 up 4
192.168.1.20 up 3

Individual Host Sheets

IP Port Status Service Version/Notes
192.168.1.1 22 open ssh OpenSSH 8.2p1 Ubuntu-4ubuntu0.2
192.168.1.1 80 open http Apache httpd 2.4.41 (Ubuntu)
192.168.1.1 443 open https Apache httpd 2.4.41 (Ubuntu)

Troubleshooting

  • Ensure the nmap XML file is valid and properly formatted
  • Check that all required dependencies are installed
  • Verify file permissions for both input and output files

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published