Jump to content

MAC adress of Remote Client


Recommended Posts

Is it possible to get the MAC of a remore client ?

I know Indy in 9 version could do that.



I think that isn´t possible because of security.


The problem is that browsers don't allow you to get the mac address, because it would allow users to be identified uniquely. In IE you can get around this by writing an ActiveX control, and script that with javascript (which you did), but ActiveX is something only available in IE on Windows. Other solution can be a Java applet.


Code to IE:


var macAddress = "";
   var ipAddress = "";
   var computerName = "";
   var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}");
   e = new Enumerator(wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"));
   for(; !e.atEnd(); e.moveNext()) {
       var s = e.item();
       macAddress = s.MACAddress;
       ipAddress = s.IPAddress(0);
       computerName = s.DNSHostName;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...