wget https://sachita007.github.io/TestScript/script.js
wget https://sachita007.github.io/TestScript/version.json
This repository provides a way to securely distribute an encrypted Node.js script to users via GitHub. The key001.sh
script helps in the decryption and execution process.
-
Generate a Secret Key: You can generate a strong secret key using OpenSSL:
openssl rand -base64 32
-
Encrypt Your Node.js Script:
openssl enc -aes-256-cbc -in script.js -out script.js.enc -k your_secret_key_here
-
Repository Configuration:
- Place the encrypted file
script.js.enc
in your repository. - Include the
key001.sh
script provided in this repository. - Include a
version.json
for version control.
- Place the encrypted file
-
GitHub Pages:
- Push the necessary files to the
gh-pages
branch for GitHub.
- Push the necessary files to the
-
Set the decryption key:
export key0001=provided_secret_key
-
Download and execute: Using wget (GitHub):
wget -O - https://sachita007.github.io/TestScript/key001.sh | bash