Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

404project

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

404project - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

16

lib/404project.js

@@ -14,4 +14,12 @@ /*

* labeled "Your Authentication Key:"
*//*jshint devel:true, node:true, indent:2, maxerr:50 */(function() {
*/
/*jshint devel:true, node:true, indent:2, maxerr:50 */
(function() {
"use strict";
var debug;
if (process.env.NODE_DEBUG && /404project/.test(process.env.NODE_DEBUG)) {
debug = function(x) { console.error('404project: %s', x); };
} else {
debug = function() { };
}
var https = require("https");

@@ -42,3 +50,3 @@ function formatYmd(ts) {

res.on("data", function(chunk) {
// console.log(chunk);
debug(chunk);
});

@@ -71,7 +79,5 @@ });

};
if (next) {
return next();
}
return next && next();
};
};
})();
{
"name": "404project",
"version": "0.0.4",
"version": "0.0.5",
"description": "Report 404 errors to http://www.dshield.org/tools/404project.html",

@@ -5,0 +5,0 @@ "keywords": ["security", "http", "https", "connect", "express"],

@@ -16,2 +16,6 @@ node-404project

### Express.js
Using as a plugin for express.js:
```

@@ -22,3 +26,3 @@ var express = require("express");

var myKey = process.argv[3] || "[Your Authentication Key]";
var app = module.exports = express.createServer();
var app = express.createServer();

@@ -29,2 +33,40 @@ app.use(reporter(myUserID, myKey));

### Connect.js
The same code also works for connect.js. Just replace
```
var express = require("express");
```
with
```
var express = require("connect");
```
### Other Frameworks
Users of different frameworks can call the functionreturned by ``reporter(myUserID, myKey)`` directly using:
```
// ...
var report = reporter(myUserID, myKey);
report(request, response);
// ...
```
or
```
// ...
var report = reporter(myUserID, myKey);
report(url, ip, ua, timestamp);
// ...
```
### Command-Line Support
There is also a command-line tool:

@@ -34,2 +76,2 @@

bin/404reporter 036742670 aaaaaaaaaaaabbcccccccccccceeeeeeeeffffff "http://www.jolira.com/__phpamdin" 125.64.23.180 jakarta
```
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc