Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2018-13797 — 跨平台 Node.js 库,用于在 Linux、macOS 和 Windows 上按网络接口检索 MAC 地址,提供异步和同步 API。 | Kitploit
工具/GitHubGitHub/dsp-testing/cve-2018-13797
通用工具网络映射信息收集实用工具与框架
GitHubdsp-testing/cve-2018-13797

CVE-2018-13797

跨平台 Node.js 库,用于在 Linux、macOS 和 Windows 上按网络接口检索 MAC 地址,提供异步和同步 API。

查看仓库
45年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

node-macaddress

Build Status

在 Linux、OS X 和 Windows 中获取 MAC 地址。

关于 MAC 地址的一个常见误解是,每台主机只有一个 MAC 地址,而一台主机可能有多个 MAC 地址——因为每个网络接口都可能拥有自己的 MAC 地址。

该库可以按网络接口发现 MAC 地址,并且如果你只关注用于标识主机系统的一个 MAC 地址,它会选择一个合适的接口(参见下面的 API + 示例)。

特性:

  • 适用于 Linux、Mac OS X、Windows 以及大多数 UNIX 系统。
  • node ≥ 0.12 和 io.js 会在 os.networkInterfaces() 中报告 MAC 地址,该库在可用时会利用这一信息。
  • 还提供了 os.networkInterfaces() 的合理替代方案(参见下面的 API + 示例)。
  • 兼容古老的 node 版本 ≥ v0.8 (...)

用法

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

API + 示例

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)

获取指定 iface 的 MAC 地址。

如果省略 iface,该函数会自动选择一个合适的设备(例如 Linux 中的 eth0、OS X 中的 en0 等)。

不带 iface 参数:

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

带 iface 参数:

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)

获取所有非内部接口的 MAC 地址。

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()

这是 os.networkInterfaces() 的一个实用替代方案。仅报告非内部接口。

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"
  }
}
下载工具