0.0
No commit activity in last 3 years
No release in over 3 years
Google Safe Browsing API for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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)\n"
>> Malware.check('http://malware.testing.google.test/testing/malware/')
=> true
>> Malware.check('http://www.jorgebernal.info/')
=> false

Copyright (c) 2009 Jorge Bernal koke@amedias.org, released under the MIT license