node-nmap
Version:
Interfaces with locally installed NMAP
17 lines (15 loc) • 525 B
JavaScript
var nmap = require('./index');
var scan = new nmap.NmapScan("google.com", "-sV");
//scan.runActionOnError = true;
//scan.saveErrorsToResults =true;
console.log('scan starting');
scan.on('complete', function (data) {
console.log(JSON.stringify(data, null, 4));
console.log("total scan time" + scan.scanTime);
});
scan.on('error', function (data) {
console.log(JSON.stringify(data,null, 2));
console.log("total scan time" + scan.scanTime);
});
scan.startScan();
//# sourceMappingURL=app.js.map