Link to home
Start Free TrialLog in
Avatar of gharnett
gharnett

asked on

Can a website detect a persons mac address?

What info can the collect about site viewers?
Avatar of Sam Panwar
Sam Panwar
Flag of India image

No its not possible to get mac address through the website. It means you can search the computer and website or explorer have not right about it .

But try these may be

1.
First you can use Gethostbyaddr() to get remote host's name
then you can use Netbios()(setting ncb.command =ncbstat)
then you can get the mac address of remote host's net adapter

2.You cannot do this without platform-specific code which is off-topic here.
The C language does not provide networking support
3. Mac address of the remote connected machine

command promt>

arp ? then enter

run this

3.C program for Mac address

#include <stdio.h>

int main(void)
{
        char mac_address[257];

        printf("Enter the MAC address of the remote computer: ");
        fflush(stdin);

        fgets(mac_address,sizeof(mac_address), stdin);
        if (mac_address[strlen(mac_address) - 1] == '\n')
                mac_address[strlen(mac_address) - 1] = 0;

        printf("The MAC address of the remote computer is %s\n",
               mac_address);

        return 0;

}

5.Try: 'nbtstat -A <IP>' or 'nbtstat -a computername' (note, the -A and -a
are case sensitive). For example, if the 95's name is MyPC and its IP is
192.168.1.10, you might use either of the following:

  nbtstat -a MyPC

  nbtstat -A 192.160.1.10
> Can a website detect a persons mac address?
only if you manage to use malware (JavaScript, ActiveX, etc.) on the client which is able to read the NIC sesstings
Avatar of gharnett
gharnett

ASKER

Abs_jaipur

Thanks,


How would I use that program you gave if I were a webmaster?


Hi,

You can use in your website and your webserver support these mime type.
ASKER CERTIFIED SOLUTION
Avatar of Sam Panwar
Sam Panwar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this is asp.net script
<political-ethical>
RomMod, if posting such harmless code is illegal (while uncle Sam violates human rights, and people's privarcy all over the world), it would probably be time to totally blacklist EE. Keep in mind that the code is "malware" (in my definition just like JavaScript) and will not be executed on a properly configured browser ;-)
Please undelete the comments or inform responsible EE people (netminder, Wes).
@~/
</political-ethical>

BTW, the asnser to the initial question has alreday be given: NO

---- this comment may be deleted afterwords, could do it  myself, but won't put on my PE hat ...
Hi- ahoffmann -

HAve see my code its not political-ethical .

Just define it with my code its not harmful
Abs_jaipur, my comment was for the moderators, I don't see a problem with your code (as long as not run on my machine:-))
Hi -RomMod & ahoffmann -

Ok sorry for it. And thank you for restore my post.

This is not harmful code and anyone can't run this without permisssion.