A comprehensive Nmap output analyzer and enumeration helper that parses XML output and generates detailed reports with enumeration commands.
- Parse Nmap XML output files
- Generate organized Excel reports
- Multiple report organization modes (subnet-based or IP-based)
- Merge multiple scan results with different strategies
- Generate targeted enumeration commands
- Support for extensive service types
- Comprehensive service enumeration techniques
- Beautiful console output with rich formatting
# Clone the repository
git clone https://github.com/bmodha/PortScoper.git
cd PortScoper
# Install requirements
pip install -r requirements.txt
The tool expects Nmap XML output. Generate it using:
nmap -sV -sC -O <target> -oX scan.xml
Basic usage:
python portscoper.py -i scan.xml
You can analyze multiple Nmap XML files with different merge strategies:
# Analyze multiple scans (union strategy by default)
python portscoper.py -i scan1.xml scan2.xml scan3.xml
# Choose a specific merge strategy
python portscoper.py -i scan1.xml scan2.xml --merge-strategy intersection
Choose how to combine multiple scan results:
-
union (default): Combines all findings
- Includes all hosts and ports from all scans
- Updates port states if they change
- Best for: Complete enumeration, catching intermittent services
-
intersection: Keeps only common findings
- Only includes hosts/ports present in all scans
- Filters out transient services
- Best for: Finding stable, persistent services
-
latest: Uses most recent data
- Takes newest scan data for each host
- Overwrites old data completely
- Best for: Current state analysis
Choose between two organization modes for the Excel report:
# Subnet-based organization (default)
python portscoper.py -i scan.xml --organization subnet
# IP-based organization
python portscoper.py -i scan.xml --organization ip
- Groups hosts by /24 subnet
- One sheet per subnet
- Summary sheet with subnet statistics
- Better for large networks
- More compact for many hosts
- One sheet per IP address
- Detailed view of each host
- Summary sheet with host statistics
- Better for individual host analysis
- More granular information
Specify custom output file paths:
python portscoper.py -i scan.xml -o custom_report.xlsx -c custom_commands.json
- Network/Host overview
- Statistics and key findings
- Hyperlinks to detailed sheets
- Critical service highlighting
- Port information
- Service details
- Version detection
- OS detection results
- NSE script outputs
- Comprehensive notes
Generates targeted enumeration commands for:
- Web Services (HTTP/HTTPS)
- Network Services (SSH, FTP, Telnet)
- Windows Services (SMB, RDP)
- Databases (MySQL, MSSQL, PostgreSQL)
- Mail Services (SMTP, POP3, IMAP)
- And many more...
- Python 3.6+
- openpyxl
- rich
MIT License
Contributions are welcome! Please feel free to submit pull requests.