You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extracts a list of all ports with a specific service (e.g. http, ms-wbt-server, smtp) in host:port format.
67
84
Note: This command is intended for the masscan XML output only.
85
+
68
86
blocked-ports
69
87
Extracts all ports in host:port format, which either admin-prohibited or tcpwrapped.
88
+
70
89
host-ports-protocol
71
90
Extracts a list of all *open* ports in host:port format and marks the protocol type (tcp, udp)
91
+
72
92
host-ports
73
93
Extracts a list of all *open* ports in host:port format.
94
+
74
95
hosts-to-port [port]
75
96
Extracts a list of all hosts that have the given port open in 'host (hostname)' format.
97
+
76
98
hosts
77
99
Generates a line break separated list of all hosts with open ports. Can be used to perform an additional scan on this hosts.
100
+
78
101
http-ports
79
102
Generates a line separated list of HTTP(s) all ports.
80
103
Currently, the following services are detected as HTTP: http, https, http-alt, https-alt, http-proxy, sip, rtsp (potentially incomplete)
104
+
81
105
http-title
82
106
Extracts a list of HTTP HTML titles in the following format:
83
107
host:port HTML title
108
+
84
109
nmap-cmdline
85
110
Shows the parameters passed to nmap of the runned scan
111
+
86
112
port-info [port]
87
113
Extracts a list of extra information about the given port in the following format:
88
114
port;service name;http title
115
+
89
116
ports
90
117
Generates a comma-separated list of all ports. Can be used to verify if open/closed ports reachable from another host or generate port lists for specific environments. Filter closed/filtered ports.
118
+
91
119
product
92
120
Extracts all detected product names.
121
+
93
122
service-names
94
123
Extracts all detected service names.
124
+
95
125
service [service-name]
96
126
Extracts a list of all *open* ports with a specific service (e.g. http, ms-wbt-server, smtp) in host:port format.
127
+
97
128
ssl-common-name
98
129
Extracts a list of TLS/SSL ports with the commonName and Subject Alternative Name in the following format:
99
130
host:port commonName X509v3 Subject Alternative Name
131
+
100
132
tls-ports
101
133
Extracts a list of all TLS ports in host:port format. Works only after a script scan. Can be used to do a testssl.sh scan.
102
134
Example testssl.sh command (generates a text and HTML report for each host):
103
135
for f in `cat ~/ssl-hosts.txt`; do ./testssl.sh --logfile ~/testssl.sh-results/$f.log --htmlfile ~/testssl.sh-results/$f.html $f; done
104
136
137
+
105
138
Manipulate Scan Commands:
106
139
comment-hosts [hosts] [comment]
107
140
Comments a list of hosts in scan result. Expects a comma-separated list as input. The comment will be displayed in the HTML report.
nmap-parse-output scan.xml comment-hosts $(./nmap-parse-output.sh scan-subnet.xml hosts | tr "\n" ",") 'this host was scanned in subnet, too.'
145
+
112
146
comment-ports [ports] [comment]
113
147
Comments a list of ports or hosts with port (in address:port format) in scan result. Expects a comma-separated list as input. The comment will be displayed in the HTML report.
Filter a scan by a list of ports or ports of a specific host (in address:port format) so that only the specified ports are in the output. Expects a comma-separated list as input.
Filter a scan by a list of hosts so that only the specified hosts are in the output.
132
170
Filter a list of hosts from scan result by its IP address. Expects a comma-separated list as input.
133
171
You can pipe the output, for instance:
134
172
nmap-parse-output scan.xml include '192.168.1.1,192.168.1.20' | nmap-parse-output - service-names
173
+
135
174
mark-ports [ports] [color]
136
175
Marks a list of ports or hosts with port (in address:port format) with the given color in scan result. Expects a comma-separated list as input. The comment will be displayed in the HTML report.
137
176
Example:
138
177
nmap-parse-output scan.xml mark-ports '80,10.0.0.1:8080' red | nmap-parse-output - html > report.html
178
+
139
179
reachable
140
180
Removes all hosts where all ports a filtered. Can be used to generate a smaller HTML report.
141
181
Example usage to generate HTML report:
142
182
nmap-parse-output scan.xml reachable | nmap-parse-output - html > scan.html
143
183
184
+
144
185
Convert Scan Commands:
145
186
html-bootstrap
146
187
Converts the XML output into a fancy HTML report based on Bootstrap.
147
188
Note: This HTML report requests JS/CSS libs from CDNs. However, the generated file uses the no-referrer meta tag and subresource integrity to protect the confidentiality.
189
+
148
190
html
149
191
Converts a XML output into a HTML report
192
+
150
193
to-json
151
194
Converts a nmap scan output to JSON
152
195
196
+
153
197
Misc Commands:
154
198
155
-
[v1.4.3]
199
+
[v1.4.4]
156
200
157
201
## Changelog
158
202
203
+
* v1.4.4
204
+
* Fixed bug in [bash completion](_nmap-parse-output) when installed system-wide
205
+
* Improved documentation
159
206
* v1.4.3
160
207
* Fixed bug in [include-ports command](nmap-parse-output-xslt/include-ports.xslt)
161
208
* v1.4.2
@@ -171,7 +218,9 @@ Remove all ports found in `scan-before.xml` from `scan-after.xml` and write the
171
218
* v1.3.0
172
219
* First public release
173
220
174
-
## Adding new Commands
221
+
## Contribute
222
+
223
+
### Adding new Commands
175
224
176
225
Commands are written as [XSLT](https://en.wikipedia.org/wiki/XSLT). See [nmap-parse-output-xslt/](nmap-parse-output-xslt/) if you want to add new commands. A good way is mostly copying an existing script that does something similar.
177
226
@@ -208,14 +257,34 @@ More information about XSLT and writing new commands can be found here:
You can create a link to the ``nmap-parse-output`` script in your local bin directory or add the directory into your path if you want to execute it directly. Add the following line into your ``~/.bash_profile`` or your ``~/.zshrc`` file:
0 commit comments