Live data from Hacker News

Get the physical location of wireless router from its MAC address

coderrr.wordpress.com

11–14 of 14 posts

Re: Get the physical location of wireless router from its MAC address

#11
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 "http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'>betajs.loki.com$MYMAC-50" https://api.skyhookwireless.com/wps2/location

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

Re: Get the physical location of wireless router from its MAC address

#12

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 " http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'> beta js.loki.com $MYMAC -50 " 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 "http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'>betajs.loki.com$(arp -a | awk '/[0-9a-f]:/ { gsub(/^0:|:0:/, "00:", $4); gsub(/:/, "", $4); print $4; exit; }')-50" https://api.skyhookwireless.com/wps2/location

Re: Get the physical location of wireless router from its MAC address

#14

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 " http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'> beta js.loki.com $MYMAC -50 " 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 " http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'> beta js.loki.com $(arp -a | awk '/[0-9a-f]:/ { gsub(/^0:|:0:/, "00:", $4); gsub(/:/, "", $4); print $4; exit; }') -50 " https://api.skyhookwireless.com/wps2/location

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