Created
February 16, 2022 19:05
-
-
Save wsummerhill/475425cc722946afc629cc6e7ead9fa9 to your computer and use it in GitHub Desktop.
Quick masscan parser to print output in format HOST:IP
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
#!/usr/bin/python3 | |
import sys | |
from xml.dom import minidom | |
file = sys.argv[1] | |
xml = minidom.parse(file) | |
ips = xml.getElementsByTagName('address') | |
ports = xml.getElementsByTagName('port') | |
i = 0 | |
for x in ips: | |
print(ips[i].attributes['addr'].value + ':' + ports[i].attributes['portid'].value) | |
i += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment