Getting client's MAC address on node.js

前端 未结 2 1402
没有蜡笔的小新
没有蜡笔的小新 2020-12-19 01:38

Is there a way to find client\'s mac address on Node.js? I have been searching about it and i found node-sigar project but it didn\'t works because it throws a \"cannot find

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 02:17

    The getmac module will do this. It calls out to the command line to get the system's network config info and then uses a regex to parse output to find the mac address. The system commands it uses are getmac (Windows) or ifconfig (other platforms).

提交回复
热议问题