Skip to content
 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

macaddr.js

Gets the MAC addresses for the current machine.

Comes in two forms, one to get the first address found, and one to get them all.

var macaddr = require('macaddr');

macaddr.address()

macaddr.address(function(err, addr) {
    if (addr) {
        console.log('MAC address: ' + addr);
    } else {
        console.log('MAC address not found');
    }
});

macaddr.all_addresses()

macaddr.all_addresses(function(err, addrs) {
    if (addrs && addrs.length > 0) {
        console.log('MAC addresses: ' + JSON.stringify(addrs));
    } else {
        console.log('No MAC addresses found');
    }
});

About

Gets the system MAC addresses from a node.js program

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages