JSPM

project-honeypot

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1106
  • Score
    100M100P100Q132288F
  • License MIT

Friendly API for querying and consuming the Project Honeypot API

Package Exports

  • project-honeypot

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (project-honeypot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Project Honeypot

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

Installation

npm install project-honeypot

Usage

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

    honeypot.query(ip, callback);

Callback

Callback signature is (err, payload), and follows the following format:

  1. If the IP address not found, payload.found is boolean false
  2. Otherwise, payload.found is boolean true and shows follows this format:
{
  "ip": "127.1.1.5",
  "found": true,
  "lastSeenDays": 1,
  "threatScore": 1,
  "searchEngineId": null,
  "type": {
    "searchEngine": false,
    "suspicious": true,
    "harvester": false,
    "spammer": 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.

License

MIT