Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
shelljs-plugin-inspect
Advanced tools
A ShellJS plugin to add custom REPL
inspection for ShellJS output. This turns hard-to-read ShellString
objects
into nicely formatted text (resembling what the actual unix commands would
output).
$ npm install --save shelljs
$ npm install --save shelljs-plugin-inspect
Tip: If you want to use this plugin (and more REPL goodies), check out my project n_shell to get a REPL with ShellJS loaded by default!
Here's what ShellJS looks like by default in the REPL:
> // Before this plugin: hard-to-read ShellString objects
> shell.cat('file1.txt');
{ [String: 'These are the file contents\nAnd they\'re printed out nicely!\n']
stdout:'These are the file contents\nAnd they\'re printed out nicely!\n',
stderr: null,
code: 0,
cat: [Function: bound ],
head: [Function: bound ],
tail: [Function: bound ],
to: [Function: bound ],
toEnd: [Function: bound ],
sed: [Function: bound ],
sort: [Function: bound ],
uniq: [Function: bound ],
grep: [Function: bound ],
exec: [Function: bound ] }
After:
> // After this plugin: nicely formatted text!
> require('shelljs-plugin-inspect');
> shell.cat('file.txt');
These are the file contents
And they're printed out nicely!
> shell.ls();
file.txt
otherfile.txt
...
> shell.pwd();
path/to/current/directory
If you're interested in taking a look at the current state of the ShellJS plugin API, take a look at index.js. This has helpful comments explaining the necessary boilerplate for writing a plugin. For an example usage of the plugin, take a look at test/test.js.
FAQs
Add a .inspect method to ShellJS objects for REPL use
The npm package shelljs-plugin-inspect receives a total of 0 weekly downloads. As such, shelljs-plugin-inspect popularity was classified as not popular.
We found that shelljs-plugin-inspect 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.