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.
Create your REPL by slotting REPL files and functionality into your import folder.
Firstly install the module via npm:
npm install repl8
Then require it into your application:
var repl8 = require('repl8');
We simply call the .start
function and pass it in an options object:
repl8.start({
src: __dirname + '/import', // This is required to tell repl8 where to load in our logic
ignoreUndefined: true,
prompt: 'repl8> '
});
The options object takes the same options as the original nodejs .repl function, with the addition of the src
option which points to where we will import our REPL commands.
http://nodejs.org/api/repl.html#repl_repl_start_options
Create a file in your import
folder with the name of your command. In this example, we will create one called loop.js
This will immediately give our repl the command loop
.
Now inside loop.js
, lets make give it some functionality.
module.exports = function (max) {
for (i = 0; i < max; i++)
{
console.log("woo " + i);
}
}
Now restart our REPL and call our new loop
function:
repl8> loop(3)
woo 0
woo 1
woo 2
FAQs
Automatically generate your REPL commands by writing logic files
The npm package repl8 receives a total of 0 weekly downloads. As such, repl8 popularity was classified as not popular.
We found that repl8 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.