如何使用node.js获取连接到WiFi的所有MAC地址?

有没有办法使用node.js列出所有连接的设备的MAC地址?

你可能想尝试这个像nmap一样工作的节点模块。

https://github.com/jas-/node-libnmap

var nmap = require('libnmap'); nmap.discover(function(err, report) { if (err) throw new Error(err); for (var item in report) { console.log(JSON.stringify(report[item])); } }); 

这个库有一些很好的实用工具,用于寻找类似的东西。

这里有两个其他模块也做类似的事情。

https://github.com/TheThingSystem/node-arp-a

https://github.com/goliatone/arpscan