How to get uuid or mac address from client in Java?

后端 未结 3 1400
一个人的身影
一个人的身影 2020-12-30 17:04

I\'m looking for a solution for a Java based webapplication to uniquely identify the client. The server is in the same network as the clients and I thought that using the MA

3条回答
  •  借酒劲吻你
    2020-12-30 17:45

    The best I could find is this: Query ARP cache to get MAC ID

    And the potted summary is that:

    • there is no standard Java API,
    • there is no operating system independent solution,
    • your application typically needs to be privileged (e.g. root access) to query the host's ARP cache, and
    • if the packets go through a network router, you won't be able to identify the source MAC address anymore.

    I don't think this is a good approach for identifying your user's machine.

    Consider also that:

    • This only identifies the machine, not the user. Some computers are shared by multiple users.
    • MAC addresses can be changed too.

提交回复
热议问题