nodes-crypter
v1.0.6
Published
A package to encrypt a C++ program to create a script that can decrypt & run as a child process (usage: nodes-crypter ./original keyphrase && node run.js).
Readme
nodes-crypter
A Node.js package to encrypt and run a C++ program using XOR encryption.
Features
- Encrypt any C++ executable file.
- Decrypt and run the encrypted executable file.
Installation
Install the package globally or locally using npm:
npm install -g nodes-crypteror
npm install nodes-crypterUsage
Encrypting and Running a C++ Program
To encrypt a C++ executable file and generate a self-contained run.js script, use the following command:
If you installed globally (-g flag) you do not need to use 'npx' in front.
npx nodes-crypter <input_file> <key>or if you installed globally (-g flag) you do not need to use 'npx' in front.
nodes-crypter <input_file> <key>Example:
nodes-crypter ./hello mysecretkeyThis command encrypts the hello executable and outputs a run.js file containing the encrypted data and the logic to decrypt and execute it using the key mysecretkey.
Running the Generated Script
To decrypt and run the executable, use the following command:
node run.jsCreating a Test C++ Program
To create a simple "Hello, World!" C++ program, follow these steps:
Create a C++ source file
hello.cpp:#include <iostream> int main() { std::cout << "Hello, World!" << std::endl; return 0; }Compile the C++ program:
g++ hello.cpp -o helloEncrypt the executable and generate the
run.jsfile:nodes-crypter ./hello mysecretkeyRun the generated script to decrypt and execute the program:
node run.js
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
LNodesL
