Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Argler is a simple module that parses a whole command line string into individual arguments
that can be passed to modules (such as minimist) that expect process.argv
-like argument array on input.
var argler = require('argler');
// 'one two three' -> [ 'one', 'two', 'three' ]
var args = argler('one two three');
console.dir(args);
// say -n 7 "this is a single argument"' -> [ 'say', '-n', '7', 'this is a single argument' ]
var args = argler('say -n 7 "this is a single argument"');
console.dir(args);
// 'say Hello\\ world!' -> [ 'say', 'Hello world!' ]
var args = argler('say Hello\\ world!');
console.dir(args);
var argler = require('argler');
var minimist = require('minimist');
// with minimist, you can do this:
var args = minimist(argler('get --retries 3 "document 1.txt"'));
console.dir(args);
// you might want to force all arguments (but not options) to be strings:
var args = minimist(argler('echo 1 2 3 4'), { string: ['_'] });
console.dir(args);
// parsing a command line into a command, arguments and options:
var args = argler('open sftp.nuane.com -P 22');
var cmd = args.shift();
var options = minimist(args, { string: ['_'] });
args = options._;
delete options._;
console.log(cmd);
console.dir(args);
console.dir(options);
$ npm install argler
FAQs
Parses a raw command line into arguments
We found that argler 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.