Hacker News new | ask | show | jobs
by 0x0 4199 days ago
The wifi router knows your mac and probably intercepts a HTTP request (like a "captive portal"), which probably redirects you to that URL while including the MAC address
1 comments

Yes, I am connected to the store's wifi. Can you point me to some code that actually can grab the mac address? As the title suggests -- I want to know how they do it.
http://en.wikipedia.org/wiki/Captive_portal lists three ways to achieve it. The details will depend on how Starbucks decided to do it.

What you're asking is, in essence, "how does ethernet work?" That cannot be explained in a few paragraphs. You can start with Richard Stevens' "TCP/IP Illustrated, Vol. 1", as one of many available descriptions. You can use Wireshark to track all of the details.

At this point you should stop asking questions here. There's likely no simple answer, and this is a great chance to experiment and figure it out for yourself.

(Even if someone knows the exact details of how Starbucks does it, you are unlikely to understand the explanation without understanding some of the fundamentals.)

ok, I think I got it. Fundamentals I know enough to be dangerous, thanks for the pointers to captive portal. I'll be able to run with this now... I upvoted you and 0x0