File: examples/flags.js

Recommend this page to a friend!
  Classes of Jason Gerfen   Node nmap   examples/flags.js   Download  
File: examples/flags.js
Role: Example script
Content type: text/plain
Description: Example script
Class: Node nmap
Scan a network for computers using nmap
Author: By
Last change: Update of examples/flags.js
Date: 2 years ago
Size: 726 bytes


Class file image Download
/*! * libnmap * Copyright(c) 2013-2019 Jason Gerfen <> * License: MIT */ 'use strict' const nmap = require('../'); const opts = { flags: [ '-sV', // Open port to determine service (i.e. FTP, SSH etc) '-O', // OS finger printing (requires elevated privileges) '-sC', // Enables the nmap scripts (all) against each host (requires elevated privileges) '--traceroute', // Turns on tracerouting '--script traceroute-geolocation' // Turns on GeoIP functionality per hops ], range: ['', ''] }; nmap.scan(opts, function(err, report) { if (err) throw err; for (let item in report) { console.log(JSON.stringify(report[item], null, 2)); } });