New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

cpp-crypter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpp-crypter - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+49
bin/cpp-crypter.js
#!/usr/bin/env node
const { exec } = require('child_process');
const args = process.argv.slice(2);
if (args.length === 0) {
console.error('No command provided. Use "encrypt" or "decrypt".');
process.exit(1);
}
const command = args[0];
switch (command) {
case 'encrypt':
exec('node ./bin/encrypt.js', (error, stdout, stderr) => {
if (error) {
console.error(`Error executing encrypt: ${error.message}`);
return;
}
if (stderr) {
console.error(`Error output from encrypt: ${stderr}`);
return;
}
console.log(stdout);
});
break;
case 'decrypt':
exec('node ./bin/decrypt.js', (error, stdout, stderr) => {
if (error) {
console.error(`Error executing decrypt: ${error.message}`);
return;
}
if (stderr) {
console.error(`Error output from decrypt: ${stderr}`);
return;
}
console.log(stdout);
if (stderr) {
console.error(`Error output from decrypt: ${stderr}`);
return;
}
console.log(stdout);
});
break;
default:
console.error(`Unknown command: ${command}. Use "encrypt" or "decrypt".`);
process.exit(1);
}
+2
-2
{
"name": "cpp-crypter",
"version": "1.0.2",
"description": "A package to encrypt and run a C++ program",
"version": "1.0.3",
"description": "A package to encrypt and decrypt & run a C++ program",
"main": "index.js",

@@ -6,0 +6,0 @@ "bin": {