Skip to content

find a local network device ip addr by mac address using arp cache && arp-scan

License

Notifications You must be signed in to change notification settings

francop-eb/arp-find-ip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arp-find-ip

Sometimes you need to consume a service from a local network segment host, but, you can't/ won't avoid the DHCP server to change default IP leasing mechanism.

Use arp-find-ip to populate your ARP table and ask for your 'well known' host MAC's actual leased IP.

Install

npm install -g arp-find-ip

Usage

var util = require('util');
var ARP = require('arp-find-ip');

var arp = new ARP();
arp.discover();

arp.on('error', function (err) {
    console.log(err);
});

// Discovery (AKA arp-scan) :
arp.on('success', function (res) {
    if (!res) {
        console.log('!res');
        return;
    }
    // Search for a particular MAC's ip :
    console.log(arp.getIP('00:40:ad:9e:a4:eb'));
});

About

find a local network device ip addr by mac address using arp cache && arp-scan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%