MyKings / python-masscan

python-masscan is a python library which helps in using masscan port scanner.
https://pypi.org/project/python-masscan/
GNU General Public License v3.0
281 stars 60 forks source link

masscan json output broken? #35

Closed hegzploit closed 2 years ago

hegzploit commented 3 years ago

I get my portnumbers as integers and not strings which breaks parsing it as a JSON object. any workaround for this

dk-0x89 commented 3 years ago

Yes this still happen, and would hope that they fix this little bug. :(

Easyiest way to fix it: nano /usr/local/lib/python3.6/dist-packages/masscan/masscan.py edit line: port = int(dport.get('portid')) to port = str(dport.get('portid'))