Update README
parent
a1a7beb464
commit
5585e5d92e
32
README.rdoc
32
README.rdoc
|
@ -1,21 +1,29 @@
|
||||||
= Project Honeypot
|
= Project Honeypot
|
||||||
|
|
||||||
Project Honeypot is a programmatic interface to the Project Honeypot HTTP:BL service for identifying suspicious ip addresses.
|
Project Honeypot is a programmatic interface to the Project Honeypot HTTP:BL service for identifying suspicious ip addresses.
|
||||||
This Gem was built to filter out spammers on http://www.tweetburner.com.
|
|
||||||
|
|
||||||
It is a handy thing to be able to identify spammers, harvesters, and other suspicious IP addresses if you're worried about who might be abusing your service.
|
It is a handy thing to be able to identify spammers, harvesters, and other suspicious IP addresses if you're worried about who might be abusing your service.
|
||||||
|
|
||||||
= Requirements
|
== Requirements
|
||||||
|
|
||||||
This Gem requires that you have an Http:BL API key from Project Honeypot. You can get one at http://projecthhoneypot.org
|
This Gem requires that you have an Http:BL API key from Project Honeypot. You can get one at http://projecthhoneypot.org
|
||||||
|
|
||||||
= Usage
|
== Configuration
|
||||||
|
|
||||||
|
ProjectHoneypot.configure do
|
||||||
|
@api_key = 'api_key'
|
||||||
|
@score = 42
|
||||||
|
@last_activity = 10
|
||||||
|
@offenses = [:comment_spammer, :suspicious, :harvester]
|
||||||
|
end
|
||||||
|
|
||||||
|
== Usage
|
||||||
|
|
||||||
HTTP:BL lookups through Project Honeypot result in a Url object that gives you the risk score, last activity, and types of offenses the ip address is listed for.
|
HTTP:BL lookups through Project Honeypot result in a Url object that gives you the risk score, last activity, and types of offenses the ip address is listed for.
|
||||||
|
|
||||||
The score is worse the higher it is and the last_activity is in days.
|
The score is worse the higher it is and the last_activity is in days.
|
||||||
|
|
||||||
== Example #1: Suspicious IP Address
|
=== Example #1: Suspicious IP Address
|
||||||
|
|
||||||
Given an api key of "abcdefghijkl"
|
Given an api key of "abcdefghijkl"
|
||||||
|
|
||||||
|
@ -23,6 +31,9 @@ Given an api key of "abcdefghijkl"
|
||||||
@listing.safe?
|
@listing.safe?
|
||||||
# => false
|
# => false
|
||||||
|
|
||||||
|
@listing.safe?(score: 64, last_activity: 10, offenses: [:comment_spammer])
|
||||||
|
# => true
|
||||||
|
|
||||||
@listing.ip_address
|
@listing.ip_address
|
||||||
# => "192.168.1.1"
|
# => "192.168.1.1"
|
||||||
|
|
||||||
|
@ -44,9 +55,12 @@ Given an api key of "abcdefghijkl"
|
||||||
@listing.harvester?
|
@listing.harvester?
|
||||||
# => false
|
# => false
|
||||||
|
|
||||||
== Example #2: Safe IP Address
|
@listing.search_engine?
|
||||||
|
# => false
|
||||||
|
|
||||||
@listing = ProjectHoneypot.lookup("abcdefghijkl", "192.168.1.1")
|
=== Example #2: Safe IP Address
|
||||||
|
|
||||||
|
@listing = ProjectHoneypot.lookup("192.168.1.1")
|
||||||
@listing.safe?
|
@listing.safe?
|
||||||
# => true
|
# => true
|
||||||
|
|
||||||
|
@ -70,9 +84,3 @@ Given an api key of "abcdefghijkl"
|
||||||
|
|
||||||
@listing.harvester?
|
@listing.harvester?
|
||||||
# => false
|
# => false
|
||||||
|
|
||||||
= To Do Items
|
|
||||||
|
|
||||||
- Cache Responses from Project Honeypot
|
|
||||||
- Allow 'safe?' to be configurable (algorithm based on recency and severity(score))
|
|
||||||
- A .yml config file
|
|
||||||
|
|
Loading…
Reference in New Issue