Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Ginx is a fast Nginx log parser written in Javascript; It can persist cursors of each file, to continue where it left off in case of a shutdown, unexpected exception or Ctrl+D, all that with the option of parsing a directory of files instead of one file.
var Ginx = require("./lib/ginx");
var ginx = new Ginx();
//example read from file
ginx.parseFile("nginx_prod.log",
function(err, row){
if (err) throw err;
console.log("this will print each parsed line:" + JSON.stringify(row));
},
function(err, file){
if (err) throw err;
console.log(file + " parsing complete");
}
);
##Ginx(format, options={})##
Construct a 'new Ginx();
##ginx.parseLine(line, rowCallback, options={})##
Parse one line string
##ginx.parseFile(path, rowCallback, fileCallback, options={})##
Parse a file
##ginx.parseDir(directory, rowCallback, fileCallback, dirCallback)##
Parse all files in the first level of a directory (they have to all have the same format)
##ginx.pause([readFile], [callback])##
Pauses all ReadStreams in Ginx Memory, or a single file's stream if passed.
##ginx.resume([readFile], [callback])##
Resumes all ReadStreams in Ginx Memory, or a single file's stream if passed.
##ginx.stop([callback])##
Stops all ReadStreams in Ginx Memory, then persists all cursors in memory
npm install ginx
or manually git clone https://github.com/akhoury/ginx.git # cp the ginx dir into your program's node_modules npm install # to install dependencies
you can 'node demo.js' to try it out quick, but please open demo.js and read the comments quickly.
##TODO##
FAQs
A Nginx log parser for node.js written in Javascript.
The npm package ginx receives a total of 2 weekly downloads. As such, ginx popularity was classified as not popular.
We found that ginx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.