This script will accept a masscan xml result file, and output lists of ips, grouped by open ports
For example:
sudo masscan -p 10,20 0.0.0.0/8 -oX out.xml
- python 3
- python 3 lxml parser
apt install python3-lxml
- beautifulSoup module
pip install bs4
(bs4 docs: https://www.crummy.com/software/BeautifulSoup/bs4/doc)
python3 masscan_organizer.py masscan_file.xml
Output files will be created in the working directory; one for each unique open port in your file (so like, this could be many!!)
for example, mso_80.txt, mso_443.txt, mso_22.txt: each of these will contain a list of hosts which have this port open
pipenv run pip install -r requirements.txt
pipenv run python masscan_organizer.py out.xml