Icontem

File: examples/discover.js

Recommend this page to a friend!
  Classes of Jason Gerfen  >  Node nmap  >  examples/discover.js  >  Download  
File: examples/discover.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: Attempts to fix nvm version for travis-ci in linux/osx; part five
Attempts to fix nvm version for travis-ci in linux/osx; part four
Date: 9 months ago
Size: 325 bytes
 

Contents

Class file image Download
/*!
 * libnmap
 * Copyright(c) 2013-2018 Jason Gerfen <jason.gerfen@gmail.com>
 * License: MIT
 */

'use strict'

const nmap = require('../');

nmap.discover({verbose: true}, function(err, report) {
  if (err) throw new Error(err);

  for (let item in report) {
    console.log(JSON.stringify(report[item], null, 2));
  }
});