Skip to content

Instantly share code, notes, and snippets.

@baboures
baboures / nmap-open-ports.sh
Last active January 10, 2023 03:06 — forked from thomaspatzke/nmap-open-ports.sh
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/hostnames/hostname[@type="user"]/@name' -o : -v './@portid' -n nmap-output.xml