{"_id":"node-macaddress","_rev":"4244903","name":"node-macaddress","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","dist-tags":{"latest":"0.2.4"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"time":{"modified":"2026-03-29T21:28:48.000Z","created":"2015-03-30T18:35:38.113Z","0.2.4":"2015-04-03T22:42:30.178Z","0.2.2":"2015-04-02T20:05:37.813Z","0.2.1":"2015-04-02T20:04:45.543Z","0.1.3":"2015-04-02T20:03:42.101Z","0.2.0":"2015-04-02T20:02:09.848Z","0.1.2":"2015-04-02T02:26:47.129Z","0.1.1":"2015-03-30T19:15:19.464Z","0.1.0":"2015-03-30T18:35:38.113Z"},"users":{},"author":{"name":"Julian Fleischer"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"versions":{"0.2.4":{"name":"node-macaddress","version":"0.2.4","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"36a01ae53ddbe0d7648fa6678be34dad6dba1c86","_id":"node-macaddress@0.2.4","_shasum":"8dc3927d47c266fba0b0d8ce6db1c3da8eb7cc60","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"8dc3927d47c266fba0b0d8ce6db1c3da8eb7cc60","size":4252,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.2.4.tgz"},"directories":{},"publish_time":1428100950178,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1428100950178,"_cnpmcore_publish_time":"2021-12-16T18:05:14.511Z"},"0.2.2":{"name":"node-macaddress","version":"0.2.2","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"05671f6ea558959bc98f264ac630591df8a355a8","_id":"node-macaddress@0.2.2","_shasum":"df564a53e129fc54ed98e71b5a21089d422a7f1d","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"df564a53e129fc54ed98e71b5a21089d422a7f1d","size":4146,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.2.2.tgz"},"directories":{},"publish_time":1428005137813,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1428005137813,"_cnpmcore_publish_time":"2021-12-16T18:05:14.733Z"},"0.2.1":{"name":"node-macaddress","version":"0.2.1","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"c68669e26e7aa7b35aa1abe4cb1190cefa8b8b28","_id":"node-macaddress@0.2.1","_shasum":"170576a706c8606e1e99b3c22137f6b89827ea37","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"170576a706c8606e1e99b3c22137f6b89827ea37","size":4164,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.2.1.tgz"},"directories":{},"publish_time":1428005085543,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1428005085543,"_cnpmcore_publish_time":"2021-12-16T18:05:14.982Z"},"0.1.3":{"name":"node-macaddress","version":"0.1.3","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"c68669e26e7aa7b35aa1abe4cb1190cefa8b8b28","_id":"node-macaddress@0.1.3","_shasum":"167a857ea479669925fd8e0cdef2c536b95db062","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"167a857ea479669925fd8e0cdef2c536b95db062","size":4150,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.1.3.tgz"},"directories":{},"publish_time":1428005022101,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1428005022101,"_cnpmcore_publish_time":"2021-12-16T18:05:15.222Z"},"0.2.0":{"name":"node-macaddress","version":"0.2.0","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"c68669e26e7aa7b35aa1abe4cb1190cefa8b8b28","_id":"node-macaddress@0.2.0","_shasum":"9fb3a24aa1d70eb792aeb97d32ffcf69e44981b7","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"9fb3a24aa1d70eb792aeb97d32ffcf69e44981b7","size":4160,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.2.0.tgz"},"directories":{},"publish_time":1428004929848,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1428004929848,"_cnpmcore_publish_time":"2021-12-16T18:05:15.567Z"},"0.1.2":{"name":"node-macaddress","version":"0.1.2","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"729d19634c6eafec3de95b7ad0b549bfa33b6705","_id":"node-macaddress@0.1.2","_shasum":"95c3f600201987637c5ccdf3f9ff0345a698e1e4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"95c3f600201987637c5ccdf3f9ff0345a698e1e4","size":4178,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.1.2.tgz"},"directories":{},"publish_time":1427941607129,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1427941607129,"_cnpmcore_publish_time":"2021-12-16T18:05:15.902Z"},"0.1.1":{"name":"node-macaddress","version":"0.1.1","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"d6a286282cc6da87a805c55965b17aa0499bb9ff","_id":"node-macaddress@0.1.1","_shasum":"433d780fd514ba688cb2e37853571401f7e213ca","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.10.26","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"433d780fd514ba688cb2e37853571401f7e213ca","size":4147,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.1.1.tgz"},"directories":{},"publish_time":1427742919464,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1427742919464,"_cnpmcore_publish_time":"2021-12-16T18:05:16.123Z"},"0.1.0":{"name":"node-macaddress","version":"0.1.0","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"f6009714731723376abe099d713c2ff41fe75443","_id":"node-macaddress@0.1.0","_shasum":"624ef2ce092ade17409f00e1e3c7cf2bab73e00e","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.10.26","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"624ef2ce092ade17409f00e1e3c7cf2bab73e00e","size":3932,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-macaddress/download/node-macaddress-0.1.0.tgz"},"directories":{},"publish_time":1427740538113,"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","_hasShrinkwrap":false,"_cnpm_publish_time":1427740538113,"_cnpmcore_publish_time":"2021-12-16T18:05:16.332Z"}},"readme":"node-macaddress\n===============\n\n[![Build Status](https://travis-ci.org/scravy/node-macaddress.svg?branch=master)](https://travis-ci.org/scravy/node-macaddress)\n\nRetrieve MAC addresses in Linux, OS X, and Windows.\n\nA common misconception about MAC addresses is that every *host* had *one* MAC address,\nwhile a host may have *multiple* MAC addresses – since *every network interface* may\nhave its own MAC address.\n\nThis library allows to discover the MAC address per network interface and chooses\nan appropriate interface if all you're interested in is *one* MAC address identifying\nthe host system (see `API + Examples` below).\n\n**Features:**\n\n+ works on `Linux`, `Mac OS X`, `Windows`, and on most `UNIX` systems.\n+ `node ≥ 0.12` and `io.js` report MAC addresses in `os.networkInterfaces()`\n  this library utilizes this information when available.\n+ also features a sane replacement for `os.networkInterfaces()`\n  (see `API + Examples` below).\n\nUsage\n-----\n\n```\nnpm install --save node-macaddress\n```\n\n```JavaScript\nvar macaddress = require('node-macaddress');\n```\n\nAPI + Examples\n--------------\n\n    (async)  .one(iface, callback) → string\n    (async)  .one(callback)        → string\n    (async)  .all(callback)        → { iface: { type: address } }\n    (sync)   .networkInterfaces()  → { iface: { type: address } }\n\n---\n\n### `.one([iface], callback)`\n\nRetrieves the MAC address of the given `iface`.\n\nIf `iface` is omitted, this function automatically chooses an\nappropriate device (e.g. `eth0` in Linux, `en0` in OS X, etc.).\n\n**Without `iface` parameter:**\n\n```JavaScript\nmacaddress.one(function (err, mac) {\n  console.log(\"Mac address for this host: %s\", mac);  \n});\n```\n\n```\n→ Mac address for this host: ab:42:de:13:ef:37\n```\n\n**With `iface` parameter:**\n\n```JavaScript\nmacaddress.one('awdl0', function (err, mac) {\n  console.log(\"Mac address for awdl0: %s\", mac);  \n});\n```\n\n```\n→ Mac address for awdl0: ab:cd:ef:34:12:56\n```\n\n---\n\n### `.all(callback)`\n\nRetrieves the MAC addresses for all non-internal interfaces.\n\n```JavaScript\nmacaddress.all(function (err, all) {\n  console.log(JSON.stringify(all, null, 2));\n});\n```\n\n```JavaScript\n{\n  \"en0\": {\n    \"ipv6\": \"fe80::cae0:ebff:fe14:1da9\",\n    \"ipv4\": \"192.168.178.20\",\n    \"mac\": \"ab:42:de:13:ef:37\"\n  },\n  \"awdl0\": {\n    \"ipv6\": \"fe80::58b9:daff:fea9:23a9\",\n    \"mac\": \"ab:cd:ef:34:12:56\"\n  }\n}\n```\n\n---\n\n### `.networkInterfaces()`\n\nA useful replacement of `os.networkInterfaces()`. Reports only non-internal interfaces.\n\n```JavaScript\nconsole.log(JSON.stringify(macaddress.networkInterfaces(), null, 2));\n```\n\n```JavaScript\n{\n  \"en0\": {\n    \"ipv6\": \"fe80::cae0:ebff:fe14:1dab\",\n    \"ipv4\": \"192.168.178.22\"\n  },\n  \"awdl0\": {\n    \"ipv6\": \"fe80::58b9:daff:fea9:23a9\"\n  }\n}\n```\n\n","_attachments":{},"homepage":"https://github.com/scravy/node-macaddress","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"license":"MIT"}