harryhorton / node-nmap

NPM package for interfacing with local NMAP installation
MIT License
67 stars 26 forks source link

Error on incompleate XML #30

Open hugomosh opened 6 years ago

hugomosh commented 6 years ago

I have tried the package on my Home LAN and it works great but when i went to my Work LAN I got an error:

Error converting XML to JSON in xml2js: Error: Unclosed root tag
Line: 5
Column: 0
Char: 

Somehow If I do nmap -oX output.xml -sP 192.168.1.* it works but in the code it reads the file when nmap has not finish so only the headers are places on the xml output. That is way it is unclosed. Any advice, is this an error with nmap (maybe it send a close event) or what can it be this bug?