-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpackage.json
44 lines (44 loc) · 2.37 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"name": "honeypot",
"version": "0.0.2",
"description": "Node.js implementation of the Project Honeypot (Http:BL) API. Because we all hate spam.",
"keywords": [
"honeypot",
"spam",
"honey",
"Http:BL",
"ip",
"spammer"
],
"author": {
"name": "Piotr Rochala",
"email": "[email protected]",
"url": "http://rocha.la/"
},
"dependencies": {},
"devDependencies": {
"mocha": "*",
"should": "*"
},
"engines": {
"node": "*"
},
"repository": {
"type": "git",
"url": "https://github.com/rochal/honeypot.git"
},
"bugs": {
"url": "https://github.com/rochal/honeypot/issues"
},
"licenses": [
{
"type": "MIT"
}
],
"main": "honeypot",
"readme": "honeypot\n=========\n\nNode.js implementation of the Project Honeypot (Http:BL) API. Because we all hate spam.\n\n - Utilizes Http:BL from known and loved https://www.projecthoneypot.org/\n - Uses built-in node dns.resolve4 to get response from the DNS API\n - No Unicorns were harmed during development\n\nInstallation\n--------------\n\n```sh\nnpm install honeypot\n```\n\nUsage\n----\n```javascript\nvar honeypot = require('honeypot');\n\nvar pot = new honeypot('your_api_key');\n\npot.query('127.0.0.1', function(err, response){\n if (!response) {\n console.log(\"IP not found in honeypot, we're all good!\");\n } else {\n console.log(\"Oh no, it's a spammer mate! Kil it with fire!\");\n console.log(response.getFormattedResponse());\n // Suspicious, Comment Spammer\n // Threat Rating: 58 / 255\n // Recency: 1 / 255\n }\n});\n```\n\nExample within Express\n----\n\n```javascript\nvar honeypot = require('honeypot');\n\nvar pot = new honeypot('your_api_key');\n\n// example route for POST /comment/\ncreate: function(req, res) {\n \n pot.query(req.ip, function(err, response){\n if (!response) {\n console.log(\"IP not found in honeypot, we're all good!\");\n // do some commentary magic\n res.send({ msg: 'we hate spam!' });\n } else {\n console.log(\"Die!\");\n res.send(null);\n }\n });\n}\n```\n\nKudos\n----\n\nBased on this sweet PHP gist https://gist.github.com/smithweb/7773373.\n\n\nLicense\n----\n\nMIT\n\n**Free Software, Hell Yeah!**\n\n",
"readmeFilename": "Readme.md",
"_id": "[email protected]",
"_from": "[email protected]",
"scripts": {}
}