Redirect URLs

206 views
Skip to first unread message

Andre

unread,
Oct 14, 2011, 10:16:27 AM10/14/11
to Google Safe Browsing API
Hi Guys,

So, I'm able to get the redirect URLs now with no problem. From what I
understand, these urls should contain the data associated with the
list. I'm pretty sure I understand what the redirect response should
look like, but what I get is something that doesn't seem correct.

For example, lets take the redirect url:
u:safebrowsing-cache.google.com/safebrowsing/rd/
ChNnb29nLW1hbHdhcmUtc2hhdmFyEAEYgdsDIIDgAzJVge0AAP__________________________________________________________________________________________________________AA

I used,
>wget -O url1 safebrowsing-cache.google.com/safebrowsing/rd/ChNnb29nLW1hbHdhcmUtc2hhdmFyEAEYgdsDIIDgAzJVge0AAP__________________________________________________________________________________________________________AA

I did get a file called url1. When I
>cat url1
this is what I have in the file:
s:60801:4:167
[encoded data with weird characters] -->can't paste the actual encoded
data because it's not regular characters

I understand that the data should look something like (which is almost
correct?):
a:9:32:320
[encoded data]
But I thought the encoded data would be the hash values? Am I doing
something wrong or did I miss understand something?

Thanks for the help!!


Patrick Kelley

unread,
Oct 14, 2011, 10:42:07 AM10/14/11
to google-safe-...@googlegroups.com, Google Safe Browsing API
The encoded binary data is of the format described in a later section.

4 byte hostkey
1 byte (unsigned) count

Next, if the command is 'a', and count is > 0, there will be a list of hash prefixes, each of HASHLEN bytes.

If count was 0, then a hostkey match is good enough.

If the command was 's', then there is a 4 byte value that corresponds to the addchunknun for each hash prefix.

Check the docs again for this section. Use a hex editor to follow along until it makes sense.

Sent from my iPhone

> --
> You received this message because you are subscribed to the Google Groups "Google Safe Browsing API" group.
> To post to this group, send email to google-safe-...@googlegroups.com.
> To unsubscribe from this group, send email to google-safe-browsi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-safe-browsing-api?hl=en.
>

Andre

unread,
Oct 14, 2011, 11:24:20 AM10/14/11
to Google Safe Browsing API
Thank you Patrick!

On Oct 14, 9:42 am, Patrick Kelley <peanutbutterkrac...@gmail.com>
wrote:
> The encoded binary data is of the format described in a later section.
>
> 4 byte hostkey
> 1 byte (unsigned) count
>
> Next, if the command is 'a', and count is > 0, there will be a list of hash prefixes, each of HASHLEN bytes.
>
> If count was 0, then a hostkey match is good enough.
>
> If the command was 's', then there is a 4 byte value that corresponds to the addchunknun for each hash prefix.
>
> Check the docs again for this section.  Use a hex editor to follow along until it makes sense.
>
> Sent from my iPhone
>
Reply all
Reply to author
Forward
0 new messages