Skip to content

A tool that allows you to convert NMAP results to html, csv, json, markdown, graphviz (dot), sqlite, excel and d2-lang. Simply put it's nmap converter.

License

Notifications You must be signed in to change notification settings

vdjagilev/nmap-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ec90a15 · Jun 2, 2024
Jun 2, 2024
Jun 2, 2024
Jul 23, 2022
Jun 2, 2024
Feb 12, 2022
Jun 28, 2021
Jul 19, 2021
Jun 2, 2024
Jun 2, 2024
Jun 2, 2024
Jun 2, 2024
Jun 2, 2024
Jun 2, 2024

Repository files navigation

NMAP-Formatter

build status codecov Maintainability


Examples

HTML: nmap-example-html Graphviz: nmap-example-graphviz

A tool that allows you to convert NMAP XML output to excel/html/csv/json/markdown/dot/sqlite.

Installation

git clone https://github.com/gorkavp/nmap-formatter.git
cd nmap-formatter
go build

Usage

nmap-formatter [html|csv|md|json|dot|sqlite|excel] [path-to-nmap.xml] [flags]

Or alternatively you can read file from stdin and parse it

cat some.xml | nmap-formatter json

Convert XML output to nicer HTML

nmap-formatter html [path-to-nmap.xml] > some-file.html

or Markdown

nmap-formatter md [path-to-nmap.xml] > some-markdown.md

or Excel

nmap-formatter excel [path-to-nmap.xml]

or JSON

nmap-formatter json [path-to-nmap.xml]
# This approach is also possible
cat nmap.xml | nmap-formatter json

or Graphviz (dot)

cat example.xml | nmap-formatter dot | dot -Tsvg > test.svg
# open test.svg with browser

or SQLite

cat example.xml | nmap-formatter sqlite --sqlite-dsn nmap.sqlite
# open nmap.sqlite with any database tool

More examples can be found on Usage Wiki page

Flags

  • -f, --file [filename] outputs result to the file (by default output goes to STDOUT)
  • --help display help message
  • --version display version (also can be used: ./nmap-formatter version)

It's also possible to change various output options. More examples on Usage Wiki Page - Flags.

Screenshots of various formats available here

Use as a library

Examples on how to use this project as a library in golang: Use as a library Wiki page