Skip to content

Examples

Vsevolod Djagilev edited this page Jun 2, 2024 · 4 revisions

This page contains screenshots and examples of output

HTML

Dark mode (+ floating table of contents)

Command used:

nmap-formatter html example.xml --html-toc-float=true > example.html

Screenshot:

nmap-example-html

Light mode

Command used:

nmap-formatter html example.xml --html-dark-mode=false > example-light.html

Screenshot:

nmap-example-light-html

Markdown

Command used:

nmap-formatter md example.xml > example.md

Screenshot (VSCode markdown preview):

nmap-example-md

CSV

Command:

nmap-formatter csv example.xml > example.csv

Screenshot (LibreOffice Calc):

nmap-example-csv

JSON

Command:

cat example.json | nmap-formatter json | jq

Screenshot:

nmap-example-json

Graphviz (dot)

Command:

cat example.xml | nmap-formatter dot | dot -Tsvg > test.svg

Screenshot of the SVG file opened in the browser:

nmap-example-dot

SQLite

The example file here is radialnet.xml taken from here: https://github.com/nmap/nmap/blob/master/zenmap/radialnet/share/sample/nmap_example.xml

Command:

cat example.xml | nmap-formatter sqlite

Open nmap.sqlite file.

A unique scan with joined IP/hostname addresses (nf_ prefix in database tables are nmap-formatter specific columns) image

A case with ports:

image

SQLite database allows to query all kinds of data very flexibly and SQLite format is easily transferrable.

Excel

Excel output looks like this:

cat example.xml | nmap-formatter excel > example.xlsx

example

D2 lang

The D2 lang (https://d2lang.com/tour/intro) is very flexible diagram scripting language that can help you to build quite nice graphs.

Notice: It's faster to generate SVG instead

cat example.xml | nmap-formatter d2 | d2 --theme 200 --layout elk example.png

example.png

Clone this wiki locally