-
-
Save baboures/0ddeb0fcff62a74db79808a94d5ba8d3 to your computer and use it in GitHub Desktop.
Extract all open ports in Host:Port format from nmap XML output
This file contains 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"]/parent::port' -v 'ancestor::host/hostnames/hostname[@type="user"]/@name' -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