Reputation: 2365
How do I get the Mac address of the user of my site (server). Welcome any tools, methods and techniques, all language. Thank you.
Upvotes: 2
Views: 1801
Reputation: 385546
By having the client send you the machine's MAC addresses to you. You'd have to execute some code on the client capable of collecting that information, and have it include that data in the communications with the server.
For example, you could have linux clients run /sbin/ifconfig
and collect the MAC addresses from the output. You didn't specify what protocol you are using to communicate, so I can't offer advice on how to send the data once you've collected it.
Why do you want that? The machine might not even have any MAC addresses, or it might have several.
Upvotes: 0
Reputation: 943108
Assuming your site is on the Internet (as opposed to a LAN), you can't.
That information is not exposed to client side JavaScript and isn't routed over the Internet.
Upvotes: 3
Reputation: 6005
Short answer is: you can't. Even assuming you could pull a MAC address from the request, the user goes through many network devices before hitting your site so how would you know which of these the MAC address came from?
Upvotes: 3
Reputation: 522005
Assuming your visitors come over the internet and not simply the local network: You don't.
It is not part of the underlying protocol to transport that information more than a hop on the network.
Upvotes: 2