
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
anyfileparser
Advanced tools
Node.JS library that can parse text from any kind of file, eg. text, image, pdf, office files.
Node.JS library that can parse text from any kind of file, eg. text, image, pdf, office files.
npm i anyfileparser
Usage
const anyFileParser = require('anyfileparser');
anyFileParser.parseFile("/path/to/file", function(data){
// "data" string in the callback here is the text parsed from the file passed in the first argument above
console.log(data)
})
Optionally change decompression location for office Files at persionalised locations for environments with restricted write access
const anyFileParser = require('anyfileparser');
// Default decompress location for office Files is "officeDist" in the directory where Node is started.
// Put this file before parseOffice method to take effect.
anyFileParser.setDecompressionLocation("/tmp"); // New decompression location would be "/tmp/officeDist"
// P.S.: Setting location on a Windows environment with '\' heirarchy requires to be entered twice '\\'
anyFileParser.setDecompressionLocation("C:\\tmp"); // New decompression location would be "C:\tmp\officeDist"
anyFileParser.parseFile("/path/to/file", function(data){
// "data" string in the callback here is the text parsed from the file passed in the first argument above
console.log(data)
})
Example
const anyFileParser = require('anyfileparser');
anyFileParser.parseFile("C:\\files\\myText.docx", function(data){
var newText = data + "look, I can parse any file"
callSomeOtherFunction(newText);
})
// Using relative path for file is also fine
anyFileParser.parseFile("files/myWorkSheet.ods", function(data){
var newText = data + "look, I can parse any file"
callSomeOtherFunction(newText);
})
FAQs
Node.JS library that can parse text from any kind of file, eg. text, image, pdf, office files.
The npm package anyfileparser receives a total of 0 weekly downloads. As such, anyfileparser popularity was classified as not popular.
We found that anyfileparser 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.