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.
@andrewbranch/untar.js
Advanced tools
Here's a simple pure-javascript implementation of untar (it's mostly taken verbatim from Jeff Schiller's bitjs, but no longer in a webworker— though ironically I'm making this in order to stick it back in a webworker, but I digress).
Here's a basic usage, it seems to work alright.
var untar = require('untar.js');
var fs = require('fs');
var file = fs.readFileSync(__dirname + '/' + 'test.tar');
untar.untar(file).forEach(function(file){
console.log(file.filename, file.fileData.length);
})
It's also possible to combine this with pako
in order to decode tarballs
var untar = require('untar.js')
var pako = require('pako')
var fs = require('fs')
var unzipped = pako.inflate(fs.readFileSync(__dirname + '/' + 'with-5.0.0.tgz'));
untar.untar(unzipped).map(function(file){
console.log(file.filename)
})
It's pretty minimal as far as APIs go, it exposes a single method untar
which can be passed an ArrayBuffer. It returns a list of TarLocalFile
objects. The important fields are size
, filename
, and fileData
.
FAQs
untar salvaged from bitjs
We found that @andrewbranch/untar.js 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.