Home > malware_api

malware_api

Malware_api is a project mainly written in Ruby, based on the MIT license.

Google Safe Browsing API for rails

Malware

Malware is a rails plugin to take advantage of the Google Safe Browsing API

Installation

Request an API key from http://code.google.com/apis/safebrowsing/key_signup.html

Create a config file with your API key. In RAILS_ROOT/config/initializers/malware_key.rb

# API key for Google Safe Browsing API
# http://code.google.com/apis/safebrowsing/
SAFEBROWSING_API_KEY = "ABQIAAAAN_MxjBsAgBKC8N1cqNloZhT3elDgi-bgogZuFD30ho7emQ1XEw"

Install the plugin

gem install malware

Generate and run a migration to create the tables

script/generate malware_migration
rake db:migrate

Example

$ script/console 
Loading development environment (Rails 2.3.5)
>> Malware.update
=> "Updated malware info (in 73.865188s) +301657/-0 (1.47438 1.18185)
"
>> Malware.check('http://malware.testing.google.test/testing/malware/')
=> true
>> Malware.check('http://www.jorgebernal.info/')
=> false

Copyright (c) 2009 Jorge Bernal [email protected], released under the MIT license

Previous:sample_app