A zero-dependency Node.js package to download, decrypt, and run programs from URLs using XOR encryption.
- Download any executable program from a URL
- Decrypt and run programs directly (no intermediate files)
- Direct execution: Downloads, decrypts, and runs programs in one command
- Silent by default: No console output unless using --debugflag
- Cross-platform: Works on Windows, macOS, and Linux
- Argument passing: Pass command-line arguments to the downloaded program
- Automatic cleanup: Temporary files are automatically removed after execution
- Zero dependencies: Uses only native Node.js modules
- Prepare workflow: Encrypt local binaries for secure distribution to upload elsewhere, and download to your other machines using the same package.
Install the package globally or locally using npm:
npm install -g nodes-http-loader
or
npm install nodes-http-loader
- 
Download and run a program directly: nodes-http-loader https://example.com/program mysecretkey 
- 
Prepare a local binary: nodes-http-loader prepare ./myapp mysecretkey # Upload prepared.bin to your server nodes-http-loader https://yourserver.com/prepared.bin mysecretkey
- 
Run with arguments: nodes-http-loader https://example.com/program mysecretkey arg1 arg2 
To download a program from a URL, decrypt it, and run it directly, use the following command:
If you installed globally (-g flag) you do not need to use 'npx' in front.
npx nodes-http-loader <url> <key> [args...]
npx nodes-http-loader --debug <url> <key> [args...]  # With debug output
or if you installed globally (-g flag) you do not need to use 'npx' in front.
nodes-http-loader <url> <key> [args...]
nodes-http-loader --debug <url> <key> [args...]  # With debug output
Examples:
nodes-http-loader https://github.com/user/repo/releases/download/v1.0.0/app mysecretkey
nodes-http-loader https://example.com/program mykey
nodes-http-loader https://example.com/program mykey arg1 arg2 "argument with spaces"
nodes-http-loader --debug https://example.com/program mykey  # Show debug output
This command downloads the program from the URL, decrypts it, and runs it directly without creating any intermediate files.
Note: All downloaded files are expected to be encrypted. Use the prepare command to encrypt local binaries before uploading them.
To prepare a local binary file for HTTP distribution, use the prepare command:
nodes-http-loader prepare <binary> <key> [output]
Examples:
nodes-http-loader prepare ./myapp mysecretkey
nodes-http-loader prepare ./myapp mysecretkey encrypted-app.bin
This command encrypts your local binary file and creates an encrypted version that you can upload to your web server. The output file is ready for HTTP distribution.
Workflow:
- Prepare your binary: nodes-http-loader prepare ./myapp mysecretkey
- Upload the generated prepared.binto your web server
- Run directly: nodes-http-loader https://yourserver.com/prepared.bin mysecretkey
The program is downloaded, decrypted, and executed directly without creating any intermediate files. You can pass arguments to the downloaded program:
nodes-http-loader https://example.com/program mysecretkey arg1 arg2
The execution is completely self-contained and requires only Node.js to run.
- Direct execution: Download and run programs from GitHub releases in one command
- CDN distribution: Execute programs from CDNs or file hosting services
- Secure distribution: Control access to your programs through encryption keys
- Offline preparation: Encrypt your binaries locally and upload them to your server
- Version management: Easily update programs by uploading new encrypted versions
- Remote deployment: Deploy and run programs without local installation
- Argument passing: Pass command-line arguments to remote programs
- Encryption: The downloaded program is encrypted using XOR encryption with your provided key
- Key Security: The key is provided at runtime - no persistent files are created
- Trust: Only use this tool with trusted URLs and programs
- Cleanup: The temporary decrypted file is automatically cleaned up after execution
- Zero dependencies: Uses only native Node.js modules
- Cross-platform: Works on Windows, macOS, and Linux with proper file permissions
"spawn ENOEXEC" Error:
- This usually means the downloaded file is not executable or corrupted
- Ensure you're using the correct key for the encrypted file.
- Make sure the file was properly encrypted with the preparecommand
File Not Found:
- Check that the URL is accessible and returns the correct file
- Verify the file exists on the server
Permission Denied:
- On Unix-like systems, the script automatically sets execute permissions
- On Windows, ensure the file is a valid executable
Network Issues:
- The tool has a 360-second (6 minutes) timeout for downloads
- Check your internet connection and firewall settings
- Test with a simple file:
# Create a test file echo '#!/bin/bash\necho "Hello World!"' > test.sh chmod +x test.sh # Prepare it nodes-http-loader prepare test.sh mykey # Test locally (upload prepared.bin to a server first) nodes-http-loader https://yourserver.com/prepared.bin mykey 
This project is licensed under the MIT License - see the LICENSE file for details.
LNodesL