Re: Is there any implementation of google-safe-browsing in Python?

1,393 views
Skip to first unread message

Garrett Casto

unread,
Jul 27, 2012, 5:19:00 PM7/27/12
to google-safe-...@googlegroups.com
That directory is used to test that clients are setup correctly. The actual client code is at http://code.google.com/p/google-safe-browsing/source/browse/#svn%2Ftrunk%2Fpython. Check out client.py for usage.

On Fri, Jul 27, 2012 at 2:15 PM, Diogo <diogo...@gastecnologia.com.br> wrote:
I've looked into http://code.google.com/p/google-safe-browsing/source/browse/#svn%2Ftrunk%2Ftesting but I haven't got its meaning. Why do I have to run a server? Is it any implementation of Protocol v2 (Safe Browsing API v2)?

--
You received this message because you are subscribed to the Google Groups "Google Safe Browsing API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-safe-browsing-api/-/v88c-SsVfJoJ.
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.

Diogo

unread,
Jul 29, 2012, 4:14:21 PM7/29/12
to google-safe-...@googlegroups.com
I've checked out client.py and I've seen its usage. Just for test I performed a client-side lookups of URLs, such:
urls = ["http://ianfette.org/", "www.google.com.br"]
client.CheckForUrl(myapikey,urls)

and I recived this message:
INFO:root:Finished update number 1, next delay: 1818
INFO:root:Waiting to complete updates...
INFO:root:Waiting 1818 seconds

and after a while other message:
INFO:root:Finished update number 2, next delay: 1776
INFO:root:Waiting to complete updates...
INFO:root:Waiting 1776 seconds

so on.

I suppose that the client.py is performing only the updates but, how can I get the result of the lookups? If it's either phishing, malware, both or none of them. My guess is that it isn't calling function CheckUrl from Client class. Am I wrong?

Diogo

unread,
Aug 14, 2012, 3:52:39 PM8/14/12
to google-safe-...@googlegroups.com
Someone have any idea?

Garrett Casto

unread,
Aug 14, 2012, 4:16:05 PM8/14/12
to google-safe-...@googlegroups.com
The way the client works it will update until it's completely up to date before telling you if you the url you have specified is bad or not. This can take a while (on the order of hours) if you haven't done this before or if the database you specified is out of date. If you just want to know if a few sites are bad or not, using the lookup api (https://developers.google.com/safe-browsing/lookup_guide) is much easier. This implementation is more if you want to check very large numbers of urls or if you don't wish to disclose the urls to Google for privacy reasons.


On Tue, Aug 14, 2012 at 12:52 PM, Diogo <diogo...@gastecnologia.com.br> wrote:
Someone have any idea?

--
You received this message because you are subscribed to the Google Groups "Google Safe Browsing API" group.

Diogo

unread,
Aug 15, 2012, 2:56:43 PM8/15/12
to google-safe-...@googlegroups.com
In fact, for now, I just want to check if a few sites are bad or not and I've been performing lookups with this implementation of lookup api: http://pypi.python.org/pypi/Google%20Safe%20Browsing%20v2%20Lookup/ , but it's giving me some errors, it is not, sometimes, "saying" if a site is bad or not, it's "saying" "error" and because of this I thought about using Protocol v2. And in the future I think that I'll check very large numbers, more than 10.000. Any tip or trick while using Protocol v2?

Julien Sobrier

unread,
Aug 15, 2012, 4:53:04 PM8/15/12
to google-safe-...@googlegroups.com
Hello,
I wrote this python module. if you can tell me which specific URLs are
causing an issue, I'll debug it. (you can contact me directly at
jul...@sobrier.net, or open a ticket on
https://github.com/juliensobrier/google-safe-browsing-lookup-python)

Julien
> --
> You received this message because you are subscribed to the Google Groups
> "Google Safe Browsing API" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-safe-browsing-api/-/aeS4GbTBFwoJ.
Reply all
Reply to author
Forward
0 new messages