Skip to content

shadabansari/NmapXport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Nmap to Excel Converter (Linux Bash Edition)

A simple and efficient Bash script to convert Nmap scan results (nmap -sV) into a clean Excel (.xlsx) report for further analysis, filtering, or documentation.


πŸ“Œ Features

βœ… Supports parsing Nmap scans from Linux (Ubuntu/Kali)
βœ… Extracts and structures the following fields:

  • Hostname
  • IP Address
  • Port
  • Protocol (TCP/UDP)
  • State
  • Service
  • Version (if available)

βœ… Automatically generates:

  • CSV file: nmap_results.csv
  • Excel file: nmap_results.xlsx

βœ… Works great with spreadsheet tools like LibreOffice Calc or Microsoft Excel
βœ… Handles Nmap output with or without hostnames
βœ… Clean separation of port numbers and protocols


πŸ“‚ Example Output

Hostname IP Port Protocol State Service Version
webserver.local 192.168.1.10 80 tcp open http Apache httpd 2.4.29
192.168.1.10 443 tcp open https nginx 1.18.0

πŸ› οΈ Prerequisites

Make sure the following are installed:

sudo apt install nmap
pip3 install pandas openpyxl

πŸš€ Usage

1. Run an Nmap scan and save the output:

nmap -sV 192.168.1.0/24 > nmap_scan.txt

2. Run the script:

bash nmap_to_excel.sh

3. Output Files:

  • βœ… nmap_results.csv – Raw data in CSV format
  • βœ… nmap_results.xlsx – Excel-friendly version

πŸ“ File Structure

πŸ“ your-project/
β”œβ”€β”€ nmap_scan.txt         # Your Nmap output (input)
β”œβ”€β”€ nmap_to_excel.sh      # The Bash script
β”œβ”€β”€ nmap_results.csv      # Generated CSV
└── nmap_results.xlsx     # Final Excel report

✨ Enhancements (coming soon or DIY ideas)

  • Auto-detect UDP or TCP scans
  • Add OS detection and MAC address fields
  • Export to PDF summary
  • Combine multiple scans into one Excel
  • Color-coded Excel rows for open/filtered/closed ports

πŸ‘¨β€πŸ’» Author

Made with ❀️ for pentesters, sysadmins, and network engineers who love clean reporting.

Feel free to fork, enhance, or suggest improvements!


πŸ“œ License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages