Socket
Book a DemoInstallSign in
Socket

honeypot

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

honeypot

Node.js implementation of the Project Honeypot (Http:BL) API. Because we all hate spam.

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
107
15.05%
Maintainers
1
Weekly downloads
 
Created
Source

honeypot

Node.js implementation of the Project Honeypot (Http:BL) API. Because we all hate spam.

  • Utilizes Http:BL from known and loved https://www.projecthoneypot.org/
  • Uses built-in node dns.resolve4 to get response from the DNS API
  • No Unicorns were harmed during development

Installation

npm install honeypot

Usage

var honeypot = require('honeypot');

var pot = new honeypot('your_api_key');

pot.query('127.0.0.1', function(err, response){
    if (!response) {
        console.log("IP not found in honeypot, we're all good!");
    } else {
        console.log("Oh no, it's a spammer mate! Kil it with fire!");
        console.log(response.getFormattedResponse());
        // Suspiious, Comment Spammer
        // Threat Rating: 58 / 255
        // Recency: 1 / 255
    }
});

Example within Express

var honeypot = require('honeypot');

var pot = new honeypot('your_api_key');

// example route for POST /comment/
create: function(req, res) {

    pot.query(req.ip, function(err, response){
      if (!response) {
        console.log("IP not found in honeypot, we're all good!");
        // do some commentary magic
        res.send({ msg: 'we hate spam!' });
      } else {
        console.log("Die!");
        res.send(null);
      }
    });
}

Kudos

Based on this sweet PHP gist https://gist.github.com/smithweb/7773373.

License

MIT

Free Software, Hell Yeah!

Keywords

honeypot

FAQs

Package last updated on 10 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.