Swp-dev/JavascriptArmor
Advanced JavaScript obfuscator CLI for protecting source code from reverse engineering. | js obf, node obf, nodejs obf
JSArmor
Advanced JavaScript Obfuscator for protecting source code.
Overview
JSArmor is a lightweight JavaScript obfuscator designed to protect source code from reverse engineering.
It transforms readable JavaScript into a more complex and difficult-to-analyze form while preserving runtime behavior.
The goal of JSArmor is to provide simple CLI usage with strong code protection techniques.
The idea for this project was taken from Pyarmor
Features
- String encryption
- Variable and function renaming
- Control flow obfuscation
- Dead code injection
- Unicode encoding
- Anti-debugging protection
- Self-defending runtime
These techniques increase the difficulty of reverse engineering and static analysis.
Installation
Install globally using npm.
npm install jsarmorQuick Start
Obfuscate a JavaScript file:
jsarmor gen <main file> --user <your name>
Ex: jsarmor gen index.js --user SwpOutput will be generated in:
dist/obf.js
Run the protected file normally with Node.js.
node dist/obf.jsDemo
Before Obfuscation
function greet(name) {
const message = "Hello " + name
console.log(message)
}
greet("world")After Obfuscation
(function(_0x2a41c2,_0x3e8f7a){
const _0x5f3b=['log','Hello','world']
(function(_0x11b2c3,_0x58e0f1){
while(!![]){
try{
const _0x12c8d9=parseInt(_0x11b2c3())+parseInt(_0x11b2c3())
if(_0x12c8d9===_0x58e0f1)break
else _0x5f3b.push(_0x5f3b.shift())
}catch(_0x1c7b45){
_0x5f3b.push(_0x5f3b.shift())
}}
})(function(){return _0x5f3b.shift()},0x1234)
console[_0x5f3b[0]](_0x5f3b[1]+' '+_0x5f3b[2])
})()Project Structure Version 1.7
jsarmor
├ cli/
│ └ index.js
├ core/
│ ├ antidebug.js
│ ├ antivm.js
│ ├ beautifyGuard.js
│ ├ controlflow.js
│ ├ deadcode.js
│ ├ junkcode.js
│ ├ parser.js
│ ├ rc4.js
│ ├ renamer.js
│ ├ runtime.js
│ ├ selfdefend.js
│ ├ stringArray.js
│ ├ stringRuntime.js
│ ├ unicode.js
│ └ unicodeIdentifier.js
└ utils/
├ random.js
└ waternark.js
Roadmap
Version 2 (unlock at ⭐ 15 stars)
Planned features:
- Multiple obfuscation levels (low / medium / high)
- Stronger string encryption
- CLI output customization
- Improved dead code generation
Version 3 (unlock at ⭐ 100 stars)
Planned advanced protection:
- JavaScript VM-based obfuscation
- Advanced anti-debugging techniques
- Anti-tamper protection
- Runtime integrity checks
- Code virtualization
- Web Dashboard
Contributing
Contributions are welcome.
You can help by:
- Reporting bugs
- Suggesting new obfuscation techniques
- Improving performance
- Opening pull requests
Support
If you encounter issues or have questions:
Open an issue on GitHub in here.
🌐 Contact me
License
JSARMOR LICENSE
Built for developers who want to protect JavaScript code.
