Nmap-Formatter
Nmap-Formatter是一个工具,可以将您的NMAP XML输出转换为html / csv / json /markdown / dot格式,从而方便进行分析和查看。
Nmap自导的文件输出结果XML文档并不好进行分析观察,可以将其转换为易于查看的表格或者HTML文档。

Nmap-Formatter安装配置

第一步:如果你有Go环境可以直接使用go install命令编译安装:go install github.com/vdjagilev/nmap-formatter@latest,也可以在github release页面下载编译好的二进制文件。

第二步:将nmap-formatter添加到你的环境变量,这里以Windows为例,在 系统环境变量 选择 Path ,点击编辑,选择浏览选项卡,选择nmap-foamatter二进制文件保存的目录,这样环境变量就添加好了。
添加环境变量

打开cmd或者Powershell,输入命令:nmap-formatter,出现如下页面则代表安装成功:
成功安装

基本使用

基本命令格式:

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

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)

将XML输出为HTML:

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

或Markdown文档:

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

或json文件:

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

或 Graphviz (dot):

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

完整的使用文档详见链接:

最后修改:2022 年 11 月 05 日
如果觉得我的文章对你有用,请随意赞赏