Hacker News new | past | comments | ask | show | jobs | submit login
Get the physical location of wireless router from its MAC address (coderrr.wordpress.com)
24 points by coderrr on Sept 10, 2008 | hide | past | favorite | 12 comments



one single cmd wee

MYMAC=$(arp -a | awk '/[0-9a-f]:/ { gsub(/^0:|[1-9a-z]0:/, "00:", $4); gsub(/:/, "", $4); print $4; exit; }') && curl --header "Content-Type: text/xml" --data "<?xml version='1.0'?><LocationRQ xmlns='http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'><authentication version='2.0'><simple><username>beta</username><realm>js.loki.com</realm></simple></authentication><access-point><mac>$MYMAC</mac><signal-strength>-50</signal-strength></access-point></LocationRQ>" https://api.skyhookwireless.com/wps2/location

had to change 0: to 00: and strip out those :'s


:P or rather,

curl --header "Content-Type: text/xml" --data "<?xml version='1.0'?><LocationRQ xmlns='http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'><authentication version='2.0'><simple><username>beta</username><realm>js.loki.com</realm></simple></authentication><access-point><mac>$(arp -a | awk '/[0-9a-f]:/ { gsub(/^0:|:0:/, "00:", $4); gsub(/:/, "", $4); print $4; exit; }')</mac><signal-strength>-50</signal-strength></access-point></LocationRQ>" https://api.skyhookwireless.com/wps2/location


Our wonderful scripting adventures don't seem to work anymore... ;( Anyone able to confirm?


curl --header "Content-Type: text/xml" --data "<?xml version='1.0'?><LocationRQ xmlns='http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'><authentication version='2.0'><simple><username>beta</username><realm>js.loki.com</realm></simple></authentication><access-point><mac>YOURMACADDRESS</mac><signal-strength>-50</signal-strength></access-point></LocationRQ>" https://api.skyhookwireless.com/wps2/location <?xml version="1.0" encoding="UTF-8" standalone="yes"?>


haha cmd line ftw, nice

except you have an extra xml tag at the end


This is related to, but NOT A DUP of, the post incorrectly titled "Google map a cellphone knowing its MAC address" at http://news.ycombinator.com/item?id=298073. The article intruiged me but I knew there had to be an easier way to send any MAC address to their API since there is no way for them to remotely determine your MAC address. In the blog post I show how.


Skyhook knows where your access point is because at one time they drove by and mapped it. Google is probably collecting the same information from their street view vans. All you need is a laptop with a GPS receiver to log coordinates and MAC addresses.

So why not do it yourself? http://wigle.net/ is a public access point MAC address mapping site run by community contributions of location information.


I looked through the wiggle database. A TON of their information is super old. Of course there's no way to know how old SkyHook's is since it's totally private.


Skyhook loves to tell you how recent their data is. They re-drive high turnover areas (colleges) a few times a year. Everything else is quite recent. With Skyhook's high profile use in the iPhone they can't afford to be out of date.

Last I checked they had over 45 million access points recorded. With enough users, the system can become self sustaining. You upload all the detected access points in your area for a request so it's trivial for them to auto-update their system if you submitted a newly discovered or changed MAC address.


Thanks for the wiggle.net link... I've got a place to put my wardriving data now! :)


Does this mean that if you upgrade your router and put the old one on eBay and sell it to someone across the country, Skyhook's data is inaccurate (until they next drive by)?


yup




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: