nginxparser
Advanced tools
+9
| var NginxParser = require('./'); | ||
| var parser = new NginxParser('$remote_addr [$time_local]'); | ||
| var line = '127.0.0.1 [2015 08 12]' | ||
| parser.parseLine(line, console.log); | ||
| var parser = new NginxParser('[$time_local] $remote_addr'); | ||
| var line = '[2015 08 12] 127.0.0.1' | ||
| parser.parseLine(line, console.log); |
+7
-2
@@ -12,6 +12,11 @@ var fs = require('fs') | ||
| var Parser = module.exports = function (format) { | ||
| format = format.replace('[' , '\[') | ||
| this.parser = format; | ||
| this.directives = {}; | ||
| var prefix = format.match(/^[^\$]*/); | ||
| if (prefix) { | ||
| format = this.escape(prefix[0]) + format.slice(prefix[0].length); | ||
| } | ||
| this.parser = format; | ||
| var directive = /\$([a-z_]+)(.)?([^\$]+)?/g | ||
@@ -18,0 +23,0 @@ , match, regex, boundary, i = 1; |
+1
-1
| { "name" : "nginxparser", | ||
| "description" : "Parse Nginx log files", | ||
| "version" : "1.2.2", | ||
| "version" : "1.2.3", | ||
| "homepage" : "http://github.com/chriso/nginx_parser", | ||
@@ -5,0 +5,0 @@ "author" : "Chris O'Hara <cohara87@gmail.com>", |
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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
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
8036
5.28%6
20%194
5.43%2
100%