Search form

Search form

Zero trust security

Make it possible

Perl Library For Google Safe Browsing V2

By:Julien Sobrier

October 26, 2010

Malware

Perl Library For Google Safe Browsing V2

Google offers URL blacklists to identify malicious websites and phishing sites through the Google Safe Browsing API. It is used in pretty much all browsers (Firefox, Safari, etc.), except Internet Explorer. Version 2 has been available for a few months, but there are only 2 implementations thus far: Python (from Google) and PHP.

Version 1 and 2 are supposed to provide the same coverage, but I've found that Google Safe Browsing v2 lists are updated much more frequently than v1. Since I'm using the API for several of my Perl projects, I wanted to get up to date information from Google. Until now, there was a Perl implementation for v1 only.

Net::Google::SafeBrowsing2, which I've developed, is the first implementation of the Google Safe Browsing v2 API for Perl and I've made it available in CPAN.

Here is a quick example on how to use it:

use Net::Google::SafeBrowsing2; use Net::Google::SafeBrowsing2::Sqlite;

0.1 is the first version available on CPAN. It does not include Message Authentication Code (MAC), but otherwise it is fully functional. I've been using the library successfully for a couple of weeks now. There may be a bugs left, as more unit tests are required. I encourage you to help me further develop the code. You can report bugs by posting comments here, or send me an e-mail.