
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.
mrchimp-cmd
Advanced tools
HTML5 Command Line Terminal
Cmd turns a div into a kind of command line. It is designed to take a string input and return a plain text or HTML response by processing the input using Javascript or by using a remote server via a JSON API. It is designed to be extended and as such only provides a few basic commands (see below).
Cmd was built for Chimpcom (Github).
MIT License
You can get Cmd with bower.
bower install cmd
Make an empty div.
<div id="cmd"></div>
Run some javascript.
var console = new Cmd({
selector: '#cmd'
});
For more examples see example.html
.
Required. (string: '#cmd') Selector for div to use as terminal.
(string: 'Communicating...') Text to display when input is disabled during external processor requests.
(function: noop)
Parameters:
input
The command given by the user.cmd
Reference to the Cmd object.To add extra commands to Cmd, pass a callback function in the options. This function should either return a response object (see below) or undefined
.
If input
is undefined
, the command line will remain disabled until `handleResponse()`` is called.
The value that external_processor
returns defines how Cmd reacts:
true
- Cmd will remain deactivated until your external script calls handleResponse
.false
- unknown_cmd
will be printed to screen.object
- Will be interpreted as a Cmd response object. See below for definition.string
- Will be output to screen.unknown_cmd
will be printed to screen.(boolean: false) If true
, the terminal will allow files to be dropped on it and will post them to file_upload_url
.
(string: 'uploadfile.php') Used when filedrop_enabled
is true
. A URL to post to when files are dropped on the terminal.
(string: 'cmd_history') Command history is stored in Local Storage. Use different ids if using multiple terminals on a page. Or don't and they'll share history. It's up to you.
(string: '') A URL that provides a JSON representation of available remote commands that is used for command name tabcomplete. This is called once at boot time.
(string: '') A URL that provides parameter tabcompletion result when the input is more than one word.
(boolean: false) Enable talk mode by default.
(string: 32) Time between typewriter output keypresses.
(string: 200) Output length longer than this will not use the typewriter effect.
(string: 'Unrecognised command') String to respond with when unable to process a command.
The response object that is passed to handleResponse
can have the following parameters.
console.log()
.Params: (string msg) - Append msg
to the output.
Same as calling the clear
command. Removes all output. Clears the screen. How else can I put it.
Params: (object response) - Called by external_processor
to output a response. See above for response
specification.
Toggle between light-on-dark and dar-on-light styles.
Params: (string new_prompt) - Change the prompt string.
Params: (string input_type) - Changes the type of input used. input_type
should be 'password' (masks input as asterisks), 'textarea' (for large format text) or 'normal' (single line input). (If input_type
is not set, 'normal'
will be used).
Clear the screan. Same as clear
on Unix or cls
on Windows.
The command history that is accessed with the up arrow is stored in the browser's local storage. clearhistory
empties this list.
Toggle between light-on-dark and dark-and-light styles.
Toggle talk mode. When talk mode is enabled, responses will be read aloud.
"Panic button" that silences current speech and empties the talk queue. Talk mode remains enabled.
FAQs
Command line website
We found that mrchimp-cmd 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.