I want to find the client MAC address using Angular JS or JavaScript. How can I do that?
-
2AngularJS is javascript and will have the same access. Like this ansver very clearly sais; it would be a privacy/security vulnerability if you would be able to do this directly from Javascript. stackoverflow.com/questions/3385/mac-addresses-in-javascript– J.A.K.Feb 1, 2017 at 10:26
-
1If you have already tried something, please write what you have tried, not just that you have done something.– AndersFeb 1, 2017 at 10:37
1 Answer
You cannot get the MAC address from the machine where the browser is running on by executing Javascript (and thus also Angular.js) inside the browser. Access to this information is restricted due to the sandbox in which Javascript is executed.
-
1
-
1Also there is no "the MAC address". A MAC address is tied to a network interface card (and additionally, specifically MAC addresses are an Ethernet concept; granted, Ethernet is awfully common, especially if you also throw in WiFi, but it is not the only way to network computers). A computer can have an arbitrary number of NICs; all the way from zero and up.– userFeb 1, 2017 at 12:48
-
technically, it's not the sandbox, it's just that there's no API from JS to reach that info...– dandavisFeb 1, 2017 at 20:05