nginxparser
Advanced tools
+3
-8
| var fs = require('fs') | ||
| , spawn = require('child_process').spawn; | ||
| , spawn = require('child_process').spawn | ||
| , buffertools = require('buffertools'); | ||
| /** | ||
| * Patch the Buffer class to add methods such as concat(). | ||
| */ | ||
| require('buffertools'); | ||
| /** | ||
| * Create a log parser. | ||
@@ -92,3 +87,3 @@ * | ||
| stream.on('data', function (data) { | ||
| var buffer = overflow.concat(data), newline = 0; | ||
| var buffer = buffertools.concat(overflow, data), newline = 0; | ||
| for (var i = 0, len = buffer.length; i < len; i++) { | ||
@@ -95,0 +90,0 @@ if (buffer[i] === 10) { |
+2
-2
| { "name" : "nginxparser", | ||
| "description" : "Parse Nginx log files", | ||
| "version" : "1.0.2", | ||
| "version" : "1.1.0", | ||
| "homepage" : "http://github.com/chriso/nginx_parser", | ||
@@ -16,3 +16,3 @@ "author" : "Chris O'Hara <cohara87@gmail.com>", | ||
| "dependencies": { | ||
| "buffertools": "*" | ||
| "buffertools": "2.1.2" | ||
| }, | ||
@@ -19,0 +19,0 @@ "licenses": [{ |
+14
-1
@@ -1,2 +0,3 @@ | ||
| var NginxParser = require('./'); | ||
| var NginxParser = require('./') | ||
| , EventEmitter = require('events').EventEmitter; | ||
@@ -7,5 +8,17 @@ var parser = new NginxParser('$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'); | ||
| /* | ||
| parser.parseLine(line, function (row) { | ||
| console.log(row); | ||
| }); | ||
| */ | ||
| var ee = new EventEmitter(); | ||
| parser.stream(ee, function (row) { | ||
| console.log(row); | ||
| }); | ||
| for (var i = 0; i < line.length; i++) { | ||
| ee.emit('data', line[i]); | ||
| } | ||
| ee.emit('end'); |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
7436
2.78%181
4.62%1
-50%+ Added
- Removed
Updated