Problem with get remote MAC address ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I working on a web project which must verify user device identity by MAC. I
know how to get local MAC but can't find any way to get remote MAC by .net
framework. Why I hooked on .net is because the user device may be PC or
PocketPc and I hope the method be supported on either .net framework or
compact .net framework.
 
try using WMI. I havent used it more than my quicktest now :-) but it
returns macadresses (several) from my host, one for each.

cant try if it works on PocketPC, I leave that test for you.

good luck

/ Mikael
------------------------ script start--------------------

strComputer = "."
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _
"root\CIMV2")

set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_networkadapter")
For Each objItem in colItems
WScript.Echo objItem.name & " = " & objItem.macaddress & VBNewLine
Next


------------------------ script end -------------------
 
That will just return your own MAC address and if you have mutliple
NICs it will return one for each NIC.

There is no way of getting the MAC address of the connecting party in
in the WebRequest object so you'll have to snoop the TCP stream
manually.

But, use MAC to identify user is not secure anyway, so why not just use
a cookie? (which is supported)

Jan
 
Back
Top