Skip to content

Instantly share code, notes, and snippets.

@fariszacina
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save fariszacina/993e71048d43a42985c8 to your computer and use it in GitHub Desktop.

Select an option

Save fariszacina/993e71048d43a42985c8 to your computer and use it in GitHub Desktop.
Node NMAP scan using libnmap
var scanner = require('node-libnmap')
var opts = {
range: ['10.0.2.128-255', '10.0.2.0/25', '192.168.0.0/17', '::ffff:192.168.2.15'],
ports: '21,22,80,443,3306,60000-65535'
}
scanner.nmap('scan', opts, function(err, report) {
if (err) console.error(err)
report.forEach(function(item){
console.log(item[0])
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment