harryhorton / node-nmap

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

Scan immediately runs upon construction #27

Open rbwilcoxon11 opened 7 years ago

rbwilcoxon11 commented 7 years ago

Not sure what I'm missing here... its like the scan quicks off automatically, not letting me set responses to the event emitter

var nmap = require('node-nmap')
var blah = new nmap.QuickScan('192.168.1.1/24')
console.log(blah.scanResults)
/* returns [{ hostname: ...
    ...
   }]
*/

without having explicitly ran

blah.startScan()