nmap-xml

Takes a file xml file from nmap or xml stream and get data!

Usage no npm install needed!

<script type="module">
  import nmapXml from 'https://cdn.skypack.dev/nmap-xml';
</script>

README

nmap-xml

Parse an nmap xml file, no matter the size thanks to streaming!

'use strict';

const nmapXml = require('nmap-xml');

const onHost = function(err, host) {
    console.log(host);
    console.log();
};

const onDone = function done(err) {
    console.log()
    console.log('DONE');
};

nmapXml.parseFile('./example-nmap.xml', onHost, onDone);

// or using streams ...

const stream; // Setup whatever stream you need ...
nmapXml.parseStream(stream, onHost, onDone);