@tndev/project-honeypot

0.0.2 • Public • Published

Project Honeypot

Build Status codecov

This npm module will allow you to query and consume the Project Honeypot API. Query it with an IP, and an Object will be sent back with relevent metadata regarding that IP.

Installation

npm install @tndev/project-honeypot

Usage

  1. Register for an account at Project Honeypot.
  2. Enable API access and receive an access key.
  3. Use this code:
    const Honeypot = require('project-honeypot')
    
    let pod = new Honeypot('YOUR-ACCESS-KEY')

    // ...

    let response = await honeypot.query(ip)

Result

  • If the IP address was not found, response.found is false.
  • Otherwise, if response.found is true it will contain the following additional fields:
{
  ip: '127.1.1.5',
  found: true,
  lastSeenDays: 1,
  threatScore: 1,
  type: {
    searchEngine: false,
    suspicious: true,
    harvester: false,
    commentSpammer: true
  }
}

Note: Certain ip addresses in the 127.*.*.* range are test addresses, 127.1.1.5 being one of them. It returns a result record corresponding to a IP address flagged as both suspicious and comment spammer. View the full list here.

Tests

$ npm i
$ npm test

License

BSD 3-Clause

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @tndev/project-honeypot

    Weekly Downloads

    21

    Version

    0.0.2

    License

    BSD-3-Clause

    Unpacked Size

    9.18 kB

    Total Files

    10

    Last publish

    Collaborators

    • tndev