1.0.1 โข Published 12 months ago
@pratik242/cloak-js v1.0.1
๐ก๏ธ cloak-js
A powerful JavaScript code protection tool for frontend apps. Obfuscate, lock to domains, inject anti-debug code, and secure logic with WebAssembly. Works with Vite, Next.js, and Parcel.
๐ Features
- ๐ Obfuscate JavaScript (using javascript-obfuscator)
- ๐ Domain lock protection
- ๐ต๏ธโโ๏ธ DevTools detection & self-defending runtime
- ๐งช Tamper detection using SHA-256
- ๐งฉ Optional WebAssembly support for core logic
- ๐งฐ Plugin support for Vite, Parcel, and Next.js
๐ฆ Installation
npm install -g cloak-js๐ป CLI Usage
cloak ./your-app.js --domain yourdomain.com --inject-runtime --tamper-check| Option | Description |
|---|---|
--domain | Lock script to a specific domain |
--inject-runtime | Adds DevTools and debugger detection |
--tamper-check | Injects SHA-256 hash validation |
๐ง Framework Plugins
๐ Vite
import cloakPlugin from 'cloak-js/vite';
export default {
plugins: [cloakPlugin()]
};๐ Next.js
const cloakPlugin = require('cloak-js/next');
module.exports = cloakPlugin({ /* options */ })(nextConfig);๐งช WebAssembly Secure Loader
import { loadSecureWasm } from 'cloak-js/wasm';
const secure = await loadSecureWasm('/secure.wasm');
secure.run();๐ฃ๏ธ Roadmap
- โ Obfuscation CLI
- โ Domain locking
- โ DevTools runtime injection
- โ Tamper check (SHA-256)
- โ WebAssembly loader
- โ Vite, Next.js, Parcel plugins
- โณ Svelte and Astro plugin
- โณ CI/CD integration
๐ License
MIT โ by @pratikacharya1234