views:

72

answers:

5

Is it possible to get access to a users Mac address when they visit my website?

I wanted to uniquely identify computers when they visit my website. As Ip addresss change or can be changed, how can i do so using python?

+1  A: 

No its absolutly not, MAC's aren't used in the internet, it is only localy simple speaking.

Try to use cookies for identifying users.

Quonux
+2  A: 

No. You can't access your clients computer's MAC ADDRESS in your website.

Best thing you can do is use a Browser Cookie to identify different users accessing from the same IP address.

Pablo Santa Cruz
Cookies don't relate to IP addresses at all.
strager
They do identify clients though. Which is apparently what the person doing the question is trying to...
Pablo Santa Cruz
cookies can easily be deleted or not placed to begin with. is there a way to uniquely identify a machine then?
Ali
@Pablo Santa Cruz, Yes, but your statement that "Browser Cookie [allows you] to identify different users accessing from the same IP address" is incorrect.
strager
not without an trojaner xD
Quonux
True. Cookies can be easily deleted. If you are doing this for security purposes instead of identification purposes, you need something stronger. Like a Java Applet getting the MAC ADDRESS, or a Flash Application... You won't be able to get MAC ADDRESS with HTTP protocol or through JavaScript of anything HTML related.
Pablo Santa Cruz
@strager: I didn't say that. I said "best thing you can do", which I still think it is if he/she wants to count/identify users. If he/she is looking to use this as a security measure, it's not a good way to do it.
Pablo Santa Cruz
@Pablo Santa Cruz, Ah, I'm sorry, I misread your statement. I thought you said that there are cookies per-IP. My mistake.
strager
@Ali no, there isn't. And thank God for that!
Pekka
A: 

The MAC address can be changed also, although it's not advisable. The MAC address is not available to you when someone visits your website

Cookies work fairly well, however they can be copied between computers. Some people do not allow cookies, and sometimes people delete their cookies. Different browsers on the same computer will also use different cookies.

gnibbler
+5  A: 

The best way is to use cookies.

In case you absolutely need the mac address, you can use a Java Applet to do so. The user will have to allow it to run though.

Hrishi
Here is how you do it http://techdetails.agwego.com/2008/02/11/37/
Hrishi
A: 

There is a fairly reliable way to identify users who visit your site: username and password. Any site that needs to be reasonably sure that a client is the same user will use some sort of authentication system. If you need to be sure who you are talking to, you should request people to authenticate.

Although even this can fail in some circumstances:

  • A user picks an easy to guess password.
  • A user chooses to publish their password.
  • A user has their password copied by spyware.
  • A user uses the same password for multiple systems and one of the other systems was hacked.
  • etc...

Reasons why the other mechanisms cannot be used reliably:

  • IP addresses can be changed
  • MAC addresses can be changed
  • Cookies can be changed

In addition, you don't have the MAC address of a connecting client.

If you need a reliable system use username and password. If not, use a cookie and hope that most people won't delete it.

Mark Byers
How can you authenticate with username/password without cookies? Do you really want an SID in every URL? Oh, the horror.
strager
The point is that if they log in you know who they are. Even if they disable cookies and login again for each page you can still track them by logging on the server every page request from that user name. Cookies alone cannot do this.
Mark Byers