Project Honeypot Http:BL API Package
Requires a Http:BL API key from http://www.projecthoneypot.org/
import httpbl ip_address = '127.5.20.3' key = 'my-key' bl = httpbl.HttpBL(key) response = bl.query(ip_address) print "IP Address: %s" % ip_address print "Threat Score: %i" % response['threat_score'] print "Days since last activity: %i" % response['days_since_last_activity'] print "Visitor type: %s" % ', '.join([httpbl.DESCRIPTIONS[type_] \ for type_ in response['type']])
- list of visitor types (int)
The list types are enumerated in the module:
Text descriptions are available in the httpbl.DESCRIPTIONS dictionary.