May 2017
Intermediate to advanced
416 pages
21h 33m
English
XMLStarlet can be used for other parsing tasks easily. Let's filter IP addresses with open ports:
$xmlstarlet sel -t -m "//host[ports/port/state/@state='open']" -v "address[@addrtype='ipv4']/@addr" -n scanme.xml
To select IP addresses with specific open ports, we can use. For example, let's find who has port 443 accessible:
$xmlstarlet sel -t -m "//host[ports/port[@protocol='tcp' and @portid='443']/state/@state='open']" -v "address[@addrtype='ipv4']/@addr" -n scanme.xml
As you can see, the possibilities are endless. I will keep posting more useful XMLStarlet commands in SecWiki, so I encourage you to visit this page from time to time:
Read now
Unlock full access