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).
npm install nodes-crypterA Node.js package to encrypt and run a C++ program using XOR encryption.
- Encrypt any C++ executable file.
- Decrypt and run the encrypted executable file.
Install the package globally or locally using npm:
```
npm install -g nodes-crypter
or
``
npm install nodes-crypter
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
or if you installed globally (-g flag) you do not need to use 'npx' in front.
``
nodes-crypter
Example:
``
nodes-crypter ./hello mysecretkey
This 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.
To decrypt and run the executable, use the following command:
``
node run.js
To create a simple "Hello, World!" C++ program, follow these steps:
1. Create a C++ source file hello.cpp:
`
#include
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
`
2. Compile the C++ program:
``
g++ hello.cpp -o hello
3. Encrypt the executable and generate the run.js file:
``
nodes-crypter ./hello mysecretkey
4. Run the generated script to decrypt and execute the program:
```
node run.js
This project is licensed under the MIT License - see the LICENSE file for details.
LNodesL