UNPKG

simplespamcop

Version:

Easy note implementation to test if an IP is related to spam in spamcop.net

29 lines (21 loc) 568 B
# Node Simple Spamcop Use Node to check for malicious IPs in [spamcop](https://www.spamcop.net) ## Install `npm install simplespamcop` ## How to use ```javascript const simplespamcop = require('simplespamcop'); // Use checkIP(<IP>) to check that IP against projecthoneypot.org // A promise will be returned ip = "127.1.1.1"; simplespamcop.checkIP(ip).then(function(result){ console.log(result); }, function(err) { console.log(err); }); /* Outputs examples { malicious: true, title: 'Spammer' } { malicious: false, title: 'Spammer' } */ ```