How can I get a MAC address from an HTTP request?

后端 未结 3 1546
既然无缘
既然无缘 2020-11-28 13:20

Can someone give me some pointers on picking up the user\'s MAC address from an HTTP request?

The users will be from outside my network.

3条回答
  •  庸人自扰
    2020-11-28 14:09

    I don't think there is a way to do it in ASP.NET.
    MAC is a property of a TCP packet, and on HTTP level there're no packets or MACs (for example, a single HTTP request might be assembled of several TCP packets).

    You could try using a packet sniffer (like WireShark) to capture TCP packets, and then analyze them to extract MACs and map them to HTTP requests.

    Anyway, you won't get any useful data unless the user is in the same network segment as your server.

    UPD. As was pointed out in the comments, I mixed up the network layers. MAC address is a property of Ethernet frame, not a TCP packet.
    The conclusion is still correct, however.

提交回复
热议问题