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

nodes-crypter

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodes-crypter

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).

latest
npmnpm
Version
1.0.6
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

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-crypter

or

npm install nodes-crypter

Usage

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 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.

Running the Generated Script

To decrypt and run the executable, use the following command:

node run.js

Creating 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 hello
    
  • Encrypt the executable and generate the run.js file:

    nodes-crypter ./hello mysecretkey
    
  • Run 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

FAQs

Package last updated on 27 May 2024

Did you know?

Socket

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.

Install

Related posts