Encoding/Encryption Type (or is there an easier way?)

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
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Encoding/Encryption Type (or is there an easier way?)

Post by shiznatix »

Full disclaimer: I am not hacking anyone. This text file is easily found just by watching the headers and it is just to get the lat/long of my cities bus stops so I can make a simple app to plot some things for myself.

My city has a map of all the bus stops in the city using google maps, for example right here: http://soiduplaan.tallinn.ee/#bus/1a/a-b/21215-1/map/en

This has all the stops plotted on it with a little image. Now, I want to get the lat/long of these points on the map. I started digging through the headers when I load the map and I found this file: http://soiduplaan.tallinn.ee/data/talli ... bus_18.txt

That is just for 1 of the busses but thats a start. I thought I could decode that and maybe get the lat/long of the stops but I can't figure out what kind of encoding that would be. This isn't super-secret stuff so I cant imagine them using crazy encryption there but it isn't base64 and I don't know what other options there would be. Anyone have any idea?

Also, maybe I am doing this the wrong way? Is there any way to listen in on where the images are placed on a google map to extract the lat/long and the title that goes on that image when clicked?
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: Encoding/Encryption Type (or is there an easier way?)

Post by tr0gd0rr »

Might be a simple substitution cipher. The second line of each one contains only the characters "R?@ABCDEFGHIJ" which might be lat/long with characters "-,.0123456789" in some order. I tried `strtr()` with those values and it the order isn't right.

You can "listen" by looking at the Net panel in Firebug or developer tools. It looks like it inserts script elements with SRC like this: `http://maps.google.com/maps/vp?spn=0.09 ... 1805&ev=zo` and returns JavaScript like this:

Code: Select all

GAddCopyright("k","224981442624908152",58.0078,23.0273,59.5898,24.7852,0,"",16,false);
// ...
GVerify("http://id.google.com/verify/EAAAACi0eGsGkPm2qaDNQ8Yfj4U.gif");
window.GAppFeatures && window.GAppFeatures({cb:{bounds:[{s:59556592,w:24785156,n:59578851,e:24829102,ix:-1},{s:59534318,w:24785156,n:59556592,e:24916992,ix:-1},{s:59534318,w:25136719,n:59556592,e:25180664...
Be careful, the terms of use may prohibit reverse engineering or the use of data outside their app.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Encoding/Encryption Type (or is there an easier way?)

Post by Weirdan »

Isn't this is what you're looking for?
http://soiduplaan.tallinn.ee/data/stops.txt
Post Reply