蜜罐项目http:bl-api客户端
httpbl的Python项目详细描述
需要来自https://www.projecthoneypot.org/的Http:BLapi密钥
响应格式
带键听写:
- days_since_last_activity
- name
- threat_score
- types-访问者类型列表(int值)
列表类型在模块中枚举:
- httpbl.COMMENT_SPAMMER
- httpbl.HARVESTER
- httpbl.SEARCH_ENGINE
- httpbl.SUSPICIOUS
文本描述可在httpbl.DESCRIPTIONSdict中找到。
示例
importhttpblip_address='127.5.20.3'bl=httpbl.HttpBL('my-key')response=bl.query(ip_address)print('IP Address: {}'.format(ip_address)print('Threat Score: {}'.format(response['threat_score'])print('Days since last activity: {}'.foramt(response['days_since_last_activity'])print('Visitor type: {}'.format(', '.join([httpbl.DESCRIPTIONS[t]fortinresponse['type']]))