Ruby interface to the OpenDNS PhishTank phishing dataset.
Ruby
Latest commit 71cddbc Jun 11, 2012 @ezkl Merge pull request #3 from vzctl/master
fix UndefinedConversionError when updating the feed
Permalink
Failed to load latest commit information.
lib fix UndefinedConversionError when updating the feed Jun 10, 2012
spec Update to v0.1.1 closes #1 Mar 14, 2012
.gitignore Removing api_key from .gitignore Mar 14, 2012
.rspec First commit Mar 14, 2012
.rvmrc
.travis.yml I really don't care about 1.8.7 [ci skip] Mar 14, 2012
ChangeLog.md Update to v0.1.1 closes #1 Mar 14, 2012
Gemfile First commit Mar 14, 2012
Guardfile First commit Mar 14, 2012
LICENSE First commit Mar 14, 2012
README.md
Rakefile First commit Mar 14, 2012
phishtank.gemspec Bump rspec to 2.9.0 Mar 20, 2012

README.md

PhishTank

This is a Ruby interface to OpenDNS's PhishTank developer API. The PhishTank dataset contains quite a bit of human-verified and classified phishing data, if you're into that sort of thing.

Tested against Ruby 1.9.2 and 1.9.3 w/ Travis-CI. Current Build Status: Build Status

Installation

From the Rubygems CLI:

gem install phishtank

or w/ Bundler, add the following to the Gemfile.

gem 'phishtank'

Usage

require 'phishtank'
PhishTank.configure do |c|
  c.api_key = "YOUR_PHISHTANK_API_KEY" #required
  c.temp_directory = "/path/to/temporary/directory" #optional - default: /tmp
  c.etag = "ETag" #optional
end

PhishTank.update_feed!

data = PhishTank::FeedData.new

data.entries.first 
# => #<OpenStruct:0x1021026f8
#    attr_reader :modifiable = true,
#    attr_reader :table = {
#                      :url => "http://www.grovesgas.co.uk/TAMFidelidade/clientetam.htm",
#                 :phish_id => "1389753",
#         :phish_detail_url => "http://www.phishtank.com/phish_detail.php?phish_id=1389753",
#               :ip_address => "209.235.144.9",
#          :submission_time => "2012-03-13T21:46:39+00:00",
#                 :verified => "yes",
#        :verification_time => "2012-03-13T22:51:43+00:00",
#            :online_status => "yes",
#                   :target => "TAM Fidelidade"
#    }
#>

PhishTank.search("http://www.google.com/") #=> false
PhishTank.search("http://suspiciousurl.com/") #=> OpenStruct w/ PhishTank details

Read specs for more details.

TODO

You can see and contribute to the list of TODO items in issues.