arpscan
Tested in Mac OSX 10.9.5, Ubuntu 14, Ubuntu 15, Ubuntu 16, Odroid and Raspbian GNU/Linux 7 and .
Getting Started
First you need to install arp-scan
if is not already installed.
In Mac you can use brew:
brew install arp-scan
On Debian:
sudo apt-get install arp-scan
Install the module with: npm install arpscan-new
Documentation
Usage: arpscan [options]
Options:
-h, --help output usage information
-V, --version output the version number
-C, --check-arpscan Test to see if arp-scan is installed
-i, --interface [interface] Interface to scan
-v, --verbose Verbose mode
Examples
To use the module programmatically:
var console = require("my-console");
var arpscan = require('arpscan-new');
arpscan(function(err, data){
if(err) throw err;
console.log(data);
});
Run Example
#sudo node example.js
[Sat Jun 03 2017 16:15:02] [ LOG ] [ { ip: '192.168.0.1',
mac: '1C:5F:2B:61:F1:CF',
vendor: '(Unknown)',
timestamp: 1496486702515 },
{ ip: '192.168.0.6',
mac: '80:A5:89:3D:90:9D',
vendor: '(Unknown)',
timestamp: 1496486702515 },
{ ip: '192.168.0.2',
mac: 'C0:EE:FB:53:C0:2F',
vendor: '(Unknown)',
timestamp: 1496486702515 },
{ ip: '192.168.0.3',
mac: 'C0:EE:FB:56:31:15',
vendor: '(Unknown)',
timestamp: 1496486702515 },
{ ip: '192.168.0.8',
mac: 'C8:3A:35:C8:05:C0',
vendor: 'Tenda Technology Co., Ltd.',
timestamp: 1496486702515 },
{ ip: '192.168.0.10',
mac: '08:37:3D:5A:51:0A',
vendor: '(Unknown)',
timestamp: 1496486702515 },
{ ip: '192.168.0.7',
mac: '3C:77:E6:FB:85:77',
vendor: '(Unknown)',
timestamp: 1496486702515 } ]