File: examples/timeout.js

Recommend this page to a friend!
  Classes of Jason Gerfen   Node nmap   examples/timeout.js   Download  
File: examples/timeout.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/timeout.js
Date: 3 years ago
Size: 452 bytes
 

Contents

Class file image Download
/*! * libnmap * Copyright(c) 2013-2019 Jason Gerfen <jason.gerfen@gmail.com> * License: MIT */ 'use strict' const nmap = require('../'); const opts = { timeout: 900, // 900s = 15m and increases the reliability of scan results range: ['scanme.nmap.org', '192.168.0.0/26'] }; nmap.scan(opts, function(err, report) { if (err) throw new Error(err); for (let item in report) { console.log(JSON.stringify(report[item], null, 2)); } });