Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This tool doesn't decode url encoded ProtoBuf messages #75

Open
adibalcan opened this issue Nov 30, 2023 · 1 comment
Open

This tool doesn't decode url encoded ProtoBuf messages #75

adibalcan opened this issue Nov 30, 2023 · 1 comment

Comments

@adibalcan
Copy link

I can't decode the following message with this tool:

!3m1!5s0x479fc1a8e70d7c1b:0x92dd4312ee42f2f8!4m22!1m10!3m9!1s0x479fc1a8e70717f3:0x316fca3a5c2c03e!2sBohemian+Hotel!5m2!4m1!1i2!8m2!3d49.0186323!4d12.091916!16s%2Fg%2F11byp8407w!3m10!1s0x479fc1a8e70717f3:0x316fca3a5c2c03e!5m2!4m1!1i2!8m2!3d49.0186323!4d12.091916!9m1!1b1!16s%2Fg%2F11byp8407w

@konsumer
Copy link
Contributor

konsumer commented Apr 26, 2024

There is no way to auto-detect that a string is URL-encoded over base64, and personally I think it would be a confusing option in the UI, since it's a specific, but not often usecase. You can easily do it yourself, though. I did this in dev-console:

// decode url, encode as base64
const getBytes = s => btoa(decodeURIComponent(s))

getBytes('!3m1!5s0x479fc1a8e70d7c1b:0x92dd4312ee42f2f8!4m22!1m10!3m9!1s0x479fc1a8e70717f3:0x316fca3a5c2c03e!2sBohemian+Hotel!5m2!4m1!1i2!8m2!3d49.0186323!4d12.091916!16s%2Fg%2F11byp8407w!3m10!1s0x479fc1a8e70717f3:0x316fca3a5c2c03e!5m2!4m1!1i2!8m2!3d49.0186323!4d12.091916!9m1!1b1!16s%2Fg%2F11byp8407w')

@adibalcan, your example doesn't appear to be valid protobuf, though (it converted to hex when I pasted base64):
Screenshot 2024-04-25 at 8 14 13 PM

Do you have more info?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants