
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

DSH - pronounced dash - is a full featured shell written in JavaScript, which gives you endless possibilities of transforming your app into a shell application. It handles the whole user interaction and you can focus on working with the requested command with your parser.
The terminal window shown above can be implemented with the following snippet:
var shell = require('dsh');
// Add event listener for an command executed
shell.on('exec', function(cmd) {
console.log('Command:', cmd);
});
// Say something
shell.on('open', function() {
this.write("Welcome to DSH\n");
});
shell.on('exit', function() {
this.write("See you...\n");
});
// Set some options
shell.setOptions({
ps: '$ ',
history: '/home/.dsh_history'
});
// Start the shell
shell.open();
Function to open the actual shell
Function to exit the program
Sets the value of an option listed below. key is either an object of multiple option key-value pairs or one value is presented as a key value parameter.
Sets the callback fn on event ev (see below for a full list of available events)
An array of commands, that were entered in the past
A boolean flag if a long running task is still allowed to run. See gps example in the examples folder.
The event is triggered when the shell is opened. This is the right place for your message of the day.
The event is triggered before the program is getting terminated.
The event is triggered for every command submitted. The callback has one parameter, the command itself.
The event is triggered when the user hits ctrl+ (key is any a-z without c for the moment). The callback has one parameter, the key.
Boolean if the exec event should be asynchronous. If it is, the callback has a second argument, the done() callback. See the MySQL client in the examples folder.
The prompt string, which gets prepended of each line. Default is '>> '
Boolean to notify the user of small interaction mistakes by playing the typical beep sound. Default is true.
Boolean if the shell should exit when ctrl-c is invoked. Default is true. Alternative would be to call exit() on your own.
If exitOnCtrlC is false, then ctrl-c can be used to abort the actual writing of a command.
The file path to the history file. Default is null, which means no history file is written
The maximum number of lines getting written back to the history file. Default is null, which means everything is written
Boolean to ignore a command of being written to history twice, if the previous command was the same. Default is false, so every command is written to history
Copyright (c) 2016, Robert Eisele (robert@xarg.org) Dual licensed under the MIT or GPL Version 2 licenses.
FAQs
A shell written in JavaScript
The npm package dsh receives a total of 1 weekly downloads. As such, dsh popularity was classified as not popular.
We found that dsh 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.