Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Extract all open ports in Host:Port format from nmap XML output
xmlstarlet sel -t -m '//port/state[@state="open"]/parent::port' -v 'ancestor::host/address/@addr' -o : -v './@portid' -n nmap-output.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.