检测 MAC 地址? - 通过浏览器,无需插件
例如,出于验证目的,是否有办法在用户注册网页时检测用户的 Mac 地址?我更喜欢 LAMP 方法,但也接受 ASP.NET 的可能性。
For validation purposes, is there a way to detect a user's mac address as they're signing up on a webpage, for example? I'd prefer a LAMP approach, but also open to ASP.NET possibilities.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想您可以通过阅读底层操作系统的 ARP 缓存,假设客户端和服务器是在同一网络上。
但是,在大多数情况下,使用 MAC 地址进行验证是一个坏主意:
MAC 地址可以轻松欺骗。许多网络驱动程序允许您将地址设置为您想要的任何地址。
MAC 地址是本地链接。如果服务器和客户端之间至少有一个路由器,服务器将看到最近的路由器 MAC 地址。
I guess you could by reading the ARP cache of the underlying OS, assuming that the client and server are on the same network.
However, using the MAC address for validation is under most circumstances a bad idea:
The MAC address can be easily spoofed. Many network drivers allow you to set the address to whatever you want.
The MAC address is link local. If there is at least one router between the server and the client, the server will see the closest routers MAC address.
尝试检测 mac 地址并不是一个好主意。
但您可以使用 Java Applet 来执行此操作。但用户必须允许它运行。
Java 小程序可以嵌入到任何网页中
以下是具体操作方法 http://techdetails .agwego.com/2008/02/11/37
Trying to detect mac-addresses is not a good idea.
But you can use a Java Applet to do so. The user will have to allow it to run though.
The Java Applets can be embedded in any webpage
Here is how you do it http://techdetails.agwego.com/2008/02/11/37