MAC address (or something similar)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Flamie
Forum Contributor
Posts: 166
Joined: Mon Mar 01, 2004 3:19 pm

MAC address (or something similar)

Post by Flamie »

Is there any way to be able to log a specific computer from something that doesnt change?
ip changes (or proxys hide them)
Getting the MAC adress would be ideal, I'm not sure if its possible tho.
What do you suggest?
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

You can't read the mac, but you can set a tracking cookie with unique info and you can read it later and assign with previous IP addresses used.

This is not so accurate because the user could delete the cookie.
Flamie
Forum Contributor
Posts: 166
Joined: Mon Mar 01, 2004 3:19 pm

Post by Flamie »

yeah thats what I'm currently using. But as you said, anyone with a little knowledge will figure it out and just clear cookies.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

but definately more accurate than IP
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post by bokehman »

Why do so many people want this? Don't they realise the web is supposed to be an annonomous medium unless the client allows otherwise?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I'm sure they all have nothing but good intentions in mind ;)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

MAC addresses can be changed easily anyway. timvw wrote a fingerprinting class or something in code snippets I think. Still not foolproof though.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

I didn't realize how easy it was to change your mac address on a linux box until just now, couldn't you just hijack all of someone network data by changing your macaddress to theirs? Seems to easy to be true, but...
User avatar
waradmin
Forum Contributor
Posts: 240
Joined: Fri Nov 04, 2005 2:57 pm

Post by waradmin »

Many people want mac addresses to for example avoid multiple registrations on websites, etc. By storing the mac address, the user would need to use a different machine for each account (unless they knew about changing mac's)

-Steve
brendandonhue
Forum Commoner
Posts: 71
Joined: Mon Sep 25, 2006 3:21 pm

Post by brendandonhue »

Todd_Z wrote:I didn't realize how easy it was to change your mac address on a linux box until just now, couldn't you just hijack all of someone network data by changing your macaddress to theirs? Seems to easy to be true, but...
Luckily no, spoofing someone's MAC address isn't much of a problem except on things like wireless networks that use MAC filtering to identify users, etc.
User avatar
waradmin
Forum Contributor
Posts: 240
Joined: Fri Nov 04, 2005 2:57 pm

Post by waradmin »

brendandonhue wrote: Luckily no, spoofing someone's MAC address isn't much of a problem except on things like wireless networks that use MAC filtering to identify users, etc.
Only if the wireless network does not tie the MAC to the system name. I know some wireless networks tie the mac address to the system name to avoid mac spoofing.

Sorry, off topic but none the less, a bit on topic.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

bokehman wrote:Why do so many people want this? Don't they realise the web is supposed to be an annonomous medium unless the client allows otherwise?
If this is an internal network, it's officially an intranet not an internet - original intentions get thrown out the window.


As has been said, there's no way to get the MAC address of someone. However, if you're running this script on the same box as the one handing out IPs, you can parse the dhcp.leases file to get the MAC.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply