stencyption
Version:
Military-grade JavaScript encryption with AES-256-GCM, polymorphic obfuscation, and anti-debugging protection. Each file gets unique encryption keys embedded in heavily obfuscated code.
116 lines (77 loc) • 2.92 kB
Markdown
# Stencyption - JavaScript Code Encryption
Advanced JavaScript code encryption tool that protects your source code while keeping it executable.
## Installation
```bash
npm link
```
After linking, you can use the `stencyption` command globally.
## Quick Start
### 1. Encrypt a file
```bash
stencyption encrypt myfile.js
```
This creates `myfile.encrypted.js`
### 2. Run encrypted file
```bash
node myfile.encrypted.js
```
## Usage Examples
```bash
# Encrypt with custom output name
stencyption encrypt app.js -o protected.js
# Encrypt files with relative imports
stencyption encrypt bot/login/login.js -o bot/login/login.encrypted.js
# Encrypt complex projects
stencyption encrypt src/index.js -o dist/index.encrypted.js
```
## Features
✅ **Global context preservation** - Works with files that use global variables (NEW in v1.0.10!)
✅ **Complete file encryption** - Encrypts entire source code as-is
✅ **Relative imports** - Works with `require("./local/module")`
✅ **npm packages** - Works with axios, crypto, cheerio, lodash, etc.
✅ **AES-256 encryption** - Military-grade encryption
✅ **5-layer obfuscation** - Advanced code protection
✅ **Zero performance overhead** - Fast execution
## Programmatic Usage
Use the provided `encrypt.js` script or create your own:
```javascript
const fs = require('fs');
const { Encryptor } = require('./src/index.js');
// Read your source code
const sourceCode = fs.readFileSync('myfile.js', 'utf8');
// Encrypt it
const encrypted = Encryptor.encrypt(sourceCode);
// Save encrypted version
fs.writeFileSync('myfile.encrypted.js', encrypted, 'utf8');
console.log('✅ Encryption complete!');
```
## What Gets Encrypted
The tool encrypts your **entire JavaScript file** including:
- All imports and requires (both relative and npm packages)
- All variables, functions, and classes
- All code logic and algorithms
- Comments and code structure
Nothing becomes undefined - everything is preserved exactly as you wrote it.
## Fixed Issues
### v1.0.10 (Latest)
✅ **Global context preservation** - Files using `global.utils`, `global.GoatBot`, etc. now work correctly
✅ **Large file encryption** - login.js and utils.js type files encrypt without errors
### v1.0.5
✅ **Relative imports now work** - `require("./logger/log.js")` works perfectly
✅ **No more undefined errors** - Properties like `.hex`, `.toString()` work correctly
✅ **Complete file encryption** - No missing imports or variables
✅ **Proper path resolution** - Encrypted files execute from correct directory
## CLI Commands
```bash
# Show help
stencyption help
# Encrypt a file
stencyption encrypt <input-file> [-o <output-file>]
```
## Requirements
- Node.js 14 or higher
- stencyption package linked (or installed) to run encrypted files
## Version
**1.0.10** - Latest version with global context preservation fix
## License
ISC