A package to encrypt and decrypt & run a C++ program
npm install cpp-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.
- Handles large files efficiently using buffers.
Install the package globally or locally using npm:
```
npm install -g cpp-crypter
or
``
npm install cpp-crypter
To encrypt a C++ executable file, use the encrypt command:
``
npx cpp-crypter encrypt
Example:
``
npx cpp-crypter encrypt ./hello ./hello.enc mysecretkey
This command encrypts the hello executable and outputs the encrypted file as hello.enc using the key mysecretkey.
To decrypt and run the encrypted executable file, use the main script index.js:
``
node index.js
Example:
``
node index.js ./hello.enc mysecretkey
This command decrypts the hello.enc file using the key mysecretkey and runs the decrypted executable.
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:
``
npx cpp-crypter encrypt ./hello ./hello.enc mysecretkey
4. Decrypt and run the executable:
```
node index.js ./hello.enc mysecretkey
This project is licensed under the MIT License - see the LICENSE file for details.
LNodesL