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.
A tiny npm module for saving Base64 encoded images that are part of data URLs to your file system. This is useful for saving images that have been uploaded to the browser via FileReader.readAsDataUrl()
.
npm i ba64 -S
var ba64 = require("ba64"),
data_url = "data:image/jpeg;base64,[Base64 encoded image goes here]";
// Save the image synchronously.
ba64.writeImageSync("myimage", data_url); // Saves myimage.jpeg.
// Or save the image asynchronously.
ba64.writeImage("myimage", data_url, function(err){
if (err) throw err;
console.log("Image saved successfully");
// do stuff
});
# ba64.writeImage(path/to/file_name, data_url, callback)
Asynchronously saves the Base64 encoded image to the file system. file_name
should not include the file extension; ba64 will do that for you.
# ba64.writeImageSync(path/to/file_name, data_url)
Synchronously saves the Base64 encoded image to the file system. file_name
should not include the file extension; ba64 will do that for you.
# ba64.getExt(data_url)
Returns the file extension of the Base64 encoded image.
# ba64.getBa64Img(data_url)
Returns the Base64 encoded image without the data:
scheme prefix.
FAQs
A small npm module for saving base 64 encoded images to your file system.
The npm package ba64 receives a total of 294 weekly downloads. As such, ba64 popularity was classified as not popular.
We found that ba64 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.