Created
November 15, 2013 08:35
-
-
Save thomaspatzke/7481047 to your computer and use it in GitHub Desktop.
Create "host;name;port;service;product" CSV from nmap scan XML.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlstarlet sel -t -m '//port/state[@state="open"]' -v 'concat(ancestor::host/address/@addr,";",ancestor::host/hostnames/hostname[position()=1]/@name,";",../@portid,";",../service/@name,";",../service/@product)' -n file.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment