I am working on a project using mongodb, express and nodejs to build an intranet based webapp. The goal of the project is to acquire a user mac address upon authentication and run a remote ssh. I am however finding it difficult to get the remote pc mac address. The clients and server are meant to be on the same local subnet. I tried using the node getmac module, but apparently it only gives host server's mac,
var macAddress = require('getmac');
require('getmac').getMac(function(err, macAddress){
if (err) throw err
console.log(macAddress)
});
I also tried the macfromip module but with that you have to predefine the host IP to get the mac of the remote computer.
var macfromip = require('macfromip');
macfromip.getMac('192.168.1.100', function(err, data){
if(err){
console.log(err);
}
console.log(data);
});
Is there any other way i could get the user's mac address?