A helper script to convert grepable nmap files (.gnmap) into json files. Good in combination with nmap2table.
# gnmap file as argument:
nmap2json path/to/scan.gnmap
# via stdin
cat path/to/scan.gnmap | nmap2json
Formatted Example Output:
As nicely formatted table:
cat scan.gnmap | nmap2json | nmap2table
The output can also be filtered by port/service:
cat scan.gnmap | nmap2json | nmap2table --port 22
cat scan.gnmap | nmap2json | nmap2table --serivce ssh
If only the IPs are required for certain services (e.g. for other scans):
cat scan.gnmap | nmap2json | nmap2table --port 22 --ip-only