Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
In this story, you'll see the process of decoding URL parameters for pagination on Google Maps. It involved deobfuscation of Closure-compiled JavaScript, reverse-engineering of Protobuf data structures, and a bit of math. We tried to decode URL parameters by ourselves, by using pbtk, and attempted to outsource this work. In the end, we succeeded after several pair programming sessions.
Google Maps URLs contain the pb parameter contains string-encoded Protobuf. The format is the same as for the data parameter in the browser URL on Google Maps. It contains !-separated values. There are several answers on StackOverflow, gists on GitHub, some blog posts about decoding, and even a kinda official guide on reverse engineering protobuf, but none of this touches pagination.
Related posts
- Eval("quire".replace(/^/,"re"))(moduleName)
- Add extra stuff to a “standard” encoding? Sure, why not
- Question about compressing JSON in multiplayer position updates
- Looking for ideas on how to implement serialization and deserialization between C++ and Javascript
- Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve