
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
restful interface to a filesystem
npm install rest-fs
to install
npm start
starts fileserver on port 3000
npm test
runs various file and folder test
npm start
starts server on port 3000 of your entire system
LOG=true
for access log
DEBUG=*
for debug info
app = require('express')();
restfs = require('rest-fs')
restfs(app);
app.listen(3000)
To use programmatically, pass in the app into restfs and it will add the routes. you can attach a function to modifyOut to manipulate file output. the function has one argument which is the full filepath and should return path to return
list contents of directory
optional
?recursive = list recursively default false
returns: list of full file or folder paths (trailing slash tells if dir)
res.body = [ { "fullDirPath" }, ... ]
returns contents of file
if dir, redirect to dir path
optional
?encoding = default utf8
returns: res.body = { "file content" }
creates or overwrites file
creates dir if it does not exist.
renames or moves file if newPath exists
optional
body.newpath = if exist, move/rename file to this location.
body.clobber = if true will overwrite dest files (default false)
body.mkdirp = if true will create path to new location (default false)
body.mode = permissions of file (defaults: file 438(0666) dir 511(0777))
body.encoding = default utf8
optional for stream
query.clobber = overwrite if exist
query.mode = permissions of file (defaults: file 438(0666) dir 511(0777))
query.encoding = default utf8
returns: modified resource. (trailing slash tells if dir)
req.body = { "fullFileOrDirPath" }
creates file
optional
body.mode = permissions of file (438 default 0666 octal)
body.encoding = default utf8
returns: modified resource (trailing slash tells if dir)
req.body = { "fullFilePath" }
deletes folder
if file returns error
returns:
req.body = {}
deletes file
if folder returns error
returns:
req.body = {}
FAQs
restful fileserver
The npm package rest-fs receives a total of 7 weekly downloads. As such, rest-fs popularity was classified as not popular.
We found that rest-fs 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.