1.0.5 • Published 6 years ago
netdiscover-node v1.0.5
netdiscover-node
A simple nodejs wrapper around the netdiscover tool
Installation
First ensure netdiscover
is installed on your system.
Then install via npm
npm install netdiscover-node
Usage
One Time Scan
const netdiscover = require('netdiscover-node')
netdiscover.scan(options).then((hosts) => {
console.log(hosts)
// [{ ip: '', mac: '', count: '', len: '', vendor: ''}, ...]
})
Persistent Scan
const netdiscover = require('netdiscover-node')
netdiscover.on('newHost', (host) => {
console.log(host)
// { ip: '', mac: '', count: '', len: '', vendor: ''}
})
netdiscover.start(options)
Options
Option | CLI command | Data Type | About |
---|---|---|---|
interface | -i | string | Which device to scan |
range | -r | string | A range of ip addresses to scan |
passive | -p | boolean | Whether or not to scan in passive mode |
fastmode | -f | boolean | Whether or not to scan in fast mode |
Read more about what these mean here