Skip to content

Instantly share code, notes, and snippets.

@fariszacina
Created March 15, 2015 22:33
Show Gist options
  • Select an option

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

Select an option

Save fariszacina/eed60dfbbcf91106ec98 to your computer and use it in GitHub Desktop.
Node NMAP scan with additional settings
var scanner = require('node-libnmap')
var opts = {
range: ['127.0.0.1', '192.168.0.1/24'],
nmap: '/usr/local/bin/nmap',
scripts: '/usr/local/bin/nmap/scripts/',
flags: '-p 8080 -oG -'
}
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