Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regarding Google Safe Browsing API

Does anyone know how to use the Google safe browsing API.

I downloaded the entire the malware and phish update from the google safe browsing using the API key and tried comparing the hash of the suspicious site (md5_file method in php) but it did not work. I also tried comparing the hash of the suspicious site's url (md5 method in php).

Am I doing something wrong here?

like image 323
felix Avatar asked Nov 05 '22 21:11

felix


1 Answers

You need to use a canonical version of the site url. The canonicalization algorithm is officially documented, along with examples, at https://developers.google.com/safe-browsing/v4/urls-hashing#canonicalization . Also, I think using the suffix or prefix of the url may be necessary depending on what you are doing with the url.

like image 164
Brian Avatar answered Nov 12 '22 18:11

Brian