Skip to content

An XSL stylesheet for rendering Nmap XML output with a modernized UI using Tailwind CSS and DataTables

License

Notifications You must be signed in to change notification settings

marksowell/nmap-tailwind-xsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nmap-tailwind-xsl

An XSL stylesheet for rendering Nmap XML output with a modernized UI using Tailwind CSS and DataTables.

Overview

nmap-tailwind-xsl provides a streamlined interface to view Nmap scan results in a browser with enhanced, mobile-responsive styling using Tailwind CSS and interactive tables with DataTables.

Features

  • Modern UI: Styled with Tailwind CSS for a cleaner and more responsive layout.
  • Interactive Data: Includes DataTables for easy sorting and pagination of Nmap scan results.
  • Scan Report: Only displays hosts with open ports for a focused scan summary.
  • Clear Section Navigation: Accessible navigation links for "Hosts" and "Services".
  • Dark Mode: Toggle between light and dark mode comfortable viewing experience.

Dependencies

This project uses the following versions specified in the XSL file:

Dependency Version
jQuery v3.7.1
DataTables v2.1.8
Tailwind CSS Latest via Tailwind Play CDN

Installation

Clone the Repository

git clone https://github.com/marksowell/nmap-tailwind-xsl.git

Getting Started

  1. Run an Nmap Scan With XML Output

    nmap -oX scan.xml [target]

Tip

If you have multiple XML files you can combine them

  1. Install xmlstarlet (if not already installed)

    sudo apt-get install xmlstarlet
  2. Create the Combined XML File

    echo '<?xml version="1.0" encoding="UTF-8"?>' > combined_nmap_output.xml
    echo '<nmaprun>' >> combined_nmap_output.xml
  3. Extract and Append Elements

    for file in *.xml; do
    # Skip the combined output file
    if [ "$file" != "combined_nmap_output.xml" ]; then
        xmlstarlet sel -t -c "/nmaprun/host" "$file" >> combined_nmap_output.xml
    fi
    done
  4. Close the Root Tag

    echo '</nmaprun>' >> combined_nmap_output.xml
  5. Use xmllint to Validate the Combined XML File

    xmllint combined_nmap_output.xml --noout
  1. Use the nmap_tailwind_xsl.xsl Stylesheet to Create a HTML Report Using xsltproc

    xsltproc -o scan_report.html ./nmap-tailwind.xsl combined_nmap_output.xml
    

License

This project is licensed under the Creative Commons BY-SA 4.0 License.

Attribution

nmap-tailwind-xsl is inspired by the original work nmap-bootstrap-xsl by Andreas Hontzia, which is also licensed under CC BY-SA 4.0. This project includes modifications to update the UI and functionality.

About

An XSL stylesheet for rendering Nmap XML output with a modernized UI using Tailwind CSS and DataTables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages