getAPLocation.py
22 07 06 - 18:48 (note: I accidentally closed the wrong tab while posting. I'll keep it's replacement short.)New toy for you all.
getAPLocation.py
Python script to get the location of an AP off WiGLE.
Howto:
1. Create an account on wigle.net.
2. Login to WiGLE.
3. Drag this link to your bookmarks bar: Show Cookie. This is a short piece of javascript code that displays the document's cookie in an alert box.
4. Copy the code off the alert box. It should look something like this:
auth=themacuser%1F956613561%1F1155146170%1FepchUgMjhQt76E7fg%2FFCFh
5. Find the line in the script that goes:
cookie = "" # find it from your web browser. you must put it here.
and paste your cookie inbetween the quotes like so:
cookie = "auth=themacuser%1F956613561%1F1155146170%1FepchUgMjhQt76E7fg%2FFCFh" # find it from your web browser. you must put it here.
6. Run getAPLocation.py like so:
./getAPLocation.py 00:12:34:56:78:90.
Or if env doesn't know where Python is:
python getAPLocation.py 00:12:34:56:78:90
Todo:
Multiple APs in batch mode
KML output
Ability to specify username/password instead of cookie.
Ability to detect that cookie isn't good (that you don't get the search page).
Modularize it (make it a function).
Closing Note:
Whatever would I do without Wireshark. So useful.
Another note:
Maybe I should use the WiGLE API - it would be more efficient. Except for all the warnings that it's going to break...
It would be very nice if they had an API they could keep constant.
Yet another note...
If you are logged into the forums, there's extra PHPBB data in the cookie. You want just the auth= part. Make sure there's no trailing ;.
Enjoy.
Trackback link: http://gm.stackunderflow.com/blog/pivot/tb.php?tb_id=21