
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
files-from-path
Advanced tools
Match provided glob paths to file objects with readable stream
# install it as a dependency
$ npm i files-from-path
import filesFromPath from 'files-from-path'
for await (const f of filesFromPath(`path/to/somewhere`)) {
console.log(f)
// { name: '/path/to/me', stream: [Function: stream] }
}
The following parameters can be provided to filesFromPath
.
Name | Type | Description |
---|---|---|
paths | `Iterable | AsyncIterable |
[options] | object | options |
[options.hidden] | boolean | Include .dot files in matched paths |
[options.ignore] | string[] | Glob paths to ignore |
[options.followSymlinks] | boolean | follow symlinks |
[options.preserveMode] | boolean | preserve mode |
[options.mode] | number | mode to use - if preserveMode is true this will be ignored |
[options.preserveMtime] | boolean | preserve mtime |
It yields
file like objects in the form of { name: String, stream: AsyncIterator<Buffer> }
FAQs
Expand paths to file-like objects with name, readable stream and size.
The npm package files-from-path receives a total of 11,943 weekly downloads. As such, files-from-path popularity was classified as popular.
We found that files-from-path demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.