
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
mac-address-lookup
Advanced tools
A fast and lightweight library for MAC address vendor lookup using IEEE OUI database
A fast and lightweight Node.js library for MAC address vendor lookup using the IEEE OUI database.
npm install mac-address-lookup
const macLookup = require('mac-address-lookup');
// Basic lookup
const result = macLookup.lookup('10:00:20:11:3A:B7');
console.log(result.vendor); // "Apple, Inc."
// Simple vendor lookup
const vendor = macLookup.getVendor('10:00:20:11:3A:B7');
console.log(vendor); // "Apple, Inc."
lookup(mac)Query detailed vendor information for a MAC address.
Parameters:
mac (string): MAC address in various formatsReturns:
nullExample:
const result = macLookup.lookup('10:00:20:11:3A:B7');
// {
// oui: '100020',
// vendor: 'Apple, Inc.',
// address: '1 Infinite Loop\nCupertino CA 95014\nUnited States',
// raw: 'Apple, Inc.\n1 Infinite Loop\nCupertino CA 95014\nUnited States'
// }
getVendor(mac)Get the vendor name of a MAC address (simplified version).
Parameters:
mac (string): MAC addressReturns:
nullExample:
const vendor = macLookup.getVendor('00:50:56:AA:BB:CC');
console.log(vendor); // "VMware, Inc."
isValid(mac)Validate MAC address format.
Parameters:
mac (string): MAC address to validateReturns:
boolean: Whether the format is validExample:
console.log(macLookup.isValid('10:00:20:11:3A:B7')); // true
console.log(macLookup.isValid('invalid')); // false
format(mac, separator)Format a MAC address.
Parameters:
mac (string): MAC addressseparator (string, optional): Separator character, defaults to :Returns:
string: Formatted MAC addressExample:
console.log(macLookup.format('001b44113ab7')); // "00:1B:44:11:3A:B7"
console.log(macLookup.format('001b44113ab7', '-')); // "00-1B-44-11-3A-B7"
stats()Get database statistics.
Returns:
object: Object containing statisticsExample:
const stats = macLookup.stats();
// {
// totalOUIs: 37496,
// uniqueVendors: 25637,
// lastUpdated: "^1.1.362"
// }
The library supports the following MAC address formats:
00:1B:44:11:3A:B7 (colon-separated)00-1B-44-11-3A-B7 (hyphen-separated)001B44113AB7 (no separators)001b44113ab7 (lowercase)const macs = [
'10:00:20:11:3A:B7', // Apple
'08:00:27:12:34:56', // Oracle (VirtualBox)
'00:50:56:AA:BB:CC', // VMware
];
macs.forEach(mac => {
const vendor = macLookup.getVendor(mac);
console.log(`${mac} -> ${vendor || 'Unknown vendor'}`);
});
try {
const result = macLookup.lookup('invalid-mac');
} catch (error) {
console.error('Lookup failed:', error.message);
}
const macLookup = require('mac-address-lookup');
// Process network packets
function processPacket(packetData) {
const srcMac = packetData.sourceMac;
const vendor = macLookup.getVendor(srcMac);
return {
...packetData,
sourceVendor: vendor
};
}
For convenience, the library also provides these aliases:
find() - Alias for lookup()vendor() - Alias for getVendor()validate() - Alias for isValid()This library uses the oui-data package which provides the IEEE OUI database. The database is regularly updated to include the latest vendor registration information.
MIT License - see LICENSE file for details.
Issues and Pull Requests are welcome!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)FAQs
A fast and lightweight library for MAC address vendor lookup using IEEE OUI database
We found that mac-address-lookup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.