Created
March 12, 2024 04:10
-
-
Save alsunseri/9d880b52d502ae79770eb7e020af9d3d to your computer and use it in GitHub Desktop.
parse nmap xml files for ip and open ports using xmlstarlet
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 "//host"\ | |
-v "address/@addr" -o " "\ | |
-m "ports/port[state/@state='open']"\ | |
-v "@portid" -o "/" -v "state/@state"\ | |
-n many-up-hosts-nmap-scan-results.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment