Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2018-13797 — Cross-platform Node.js library to retrieve MAC addresses per network interface on Linux, macOS, and Windows, with async and sync APIs. | Kitploit
Tools/GitHubGitHub/dsp-testing/cve-2018-13797
General Purpose UtilitiesNetwork MappingInformation GatheringUtilities & Frameworks
GitHubdsp-testing/cve-2018-13797

CVE-2018-13797

Cross-platform Node.js library to retrieve MAC addresses per network interface on Linux, macOS, and Windows, with async and sync APIs.

View Repository
45 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

node-macaddress

Build Status

Retrieve MAC addresses in Linux, OS X, and Windows.

A common misconception about MAC addresses is that every host had one MAC address, while a host may have multiple MAC addresses – since every network interface may have its own MAC address.

This library allows to discover the MAC address per network interface and chooses an appropriate interface if all you're interested in is one MAC address identifying the host system (see API + Examples below).

Features:

  • works on Linux, Mac OS X, Windows, and on most UNIX systems.
  • node ≥ 0.12 and io.js report MAC addresses in this library utilizes this information when available.
os.networkInterfaces()
  • also features a sane replacement for os.networkInterfaces() (see API + Examples below).
  • works with stoneage node versions ≥ v0.8 (...)
  • Usage

    root@kitploit:~
    npm install --save macaddress
    
    root@kitploit:~
    var macaddress = require('macaddress');
    

    API + Examples

    root@kitploit:~
    (async)  .one(iface, callback) → string
    (async)  .one(callback)        → string
    (async)  .all(callback)        → { iface: { type: address } }
    (sync)   .networkInterfaces()  → { iface: { type: address } }
    

    .one([iface], callback)

    Retrieves the MAC address of the given iface.

    If iface is omitted, this function automatically chooses an appropriate device (e.g. eth0 in Linux, en0 in OS X, etc.).

    Without iface parameter:

    root@kitploit:~
    macaddress.one(function (err, mac) {
      console.log("Mac address for this host: %s", mac);  
    });
    
    root@kitploit:~
    → Mac address for this host: ab:42:de:13:ef:37
    

    With iface parameter:

    root@kitploit:~
    macaddress.one('awdl0', function (err, mac) {
      console.log("Mac address for awdl0: %s", mac);  
    });
    
    root@kitploit:~
    → Mac address for awdl0: ab:cd:ef:34:12:56
    

    .all(callback)

    Retrieves the MAC addresses for all non-internal interfaces.

    root@kitploit:~
    macaddress.all(function (err, all) {
      console.log(JSON.stringify(all, null, 2));
    });
    
    root@kitploit:~
    {
      "en0": {
        "ipv6": "fe80::cae0:ebff:fe14:1da9",
        "ipv4": "192.168.178.20",
        "mac": "ab:42:de:13:ef:37"
      },
      "awdl0": {
        "ipv6": "fe80::58b9:daff:fea9:23a9",
        "mac": "ab:cd:ef:34:12:56"
      }
    }
    

    .networkInterfaces()

    A useful replacement of os.networkInterfaces(). Reports only non-internal interfaces.

    root@kitploit:~
    console.log(JSON.stringify(macaddress.networkInterfaces(), null, 2));
    
    root@kitploit:~
    {
      "en0": {
        "ipv6": "fe80::cae0:ebff:fe14:1dab",
        "ipv4": "192.168.178.22"
      },
      "awdl0": {
        "ipv6": "fe80::58b9:daff:fea9:23a9"
      }
    }
    
    Download Tool