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.
appendable-cli-menu
Advanced tools
Show a menu in the terminal were you can continuously append items
A Node.js module to show a menu in the terminal. Items in the menu can be added continuously and the user can choose any available item at any time.
npm install appendable-cli-menu
In this example we use the bonjour/zeroconf protocol to look for http servers on the local network. We add them to the menu as they are discovered and let the user choose one:
var bonjour = require('bonjour')()
var menu = require('appendable-cli-menu')
var servers = menu('Select an HTTP server', function (server) {
// stop looking when the user have selected an option
browser.stop()
console.log('You selected %s (host: %s)', server.name, server.value)
})
var browser = bonjour.find({ type: 'http' }, function (service) {
servers.add({ name: service.name, value: service.host })
})
The above call the menu()
will show en empty menu to the user:
? Select an HTTP server (waiting...)
The subsequent calls to the servers.add()
will add new options to the
menu as they become available:
? Select an HTTP server (use arrow keys)
> mafintosh
feross
watson
The user can choose an item from the menu at any time. When he does, the
callback provided to menu()
will be called.
MIT
FAQs
Show a menu in the terminal were you can continuously append items
We found that appendable-cli-menu 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.