Advanced JavaScript Obfuscator for protecting source code.
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
- 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.
Install globally using npm.
npm install jsarmorObfuscate a JavaScript file:
jsarmor gen <main file>
Ex: jsarmor gen index.jsOutput will be generated in:
dist/obf.js
Run the protected file normally with Node.js.
node dist/obf.jsfunction greet(name) {
const message = "Hello " + name
console.log(message)
}
greet("world")(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])
})()jsarmor
├ cli/
│ └ index.js
├ core/
│ ├ antidebug.js
│ ├ beautifyGuard.js
│ ├ controlflow.js
│ ├ deadcode.js
│ ├ junkcode.js
│ ├ parser.js
│ ├ rc4.js
│ ├ renamer.js
│ ├ runtime.js
│ ├ selfdefend.js
│ ├ stringArray.js
│ └ unicode.js
└ utils/
└ random.js
Planned features:
- Multiple obfuscation levels (low / medium / high)
- Stronger string encryption
- CLI output customization
- Improved dead code generation
Planned advanced protection:
- JavaScript VM-based obfuscation
- Advanced anti-debugging techniques
- Anti-tamper protection
- Runtime integrity checks
- Code virtualization
- Web Dashboard
Contributions are welcome.
You can help by:
- Reporting bugs
- Suggesting new obfuscation techniques
- Improving performance
- Opening pull requests
If you encounter issues or have questions:
Open an issue on GitHub in here.
For direct contact:
Link Bio
https://eboy.asia/p.n
GitHub
https://github.com/Swp-dev/JavascriptArmor
Follow me on the tiktok
https://tiktok.com/@niemtinthatxaxi
MIT License
Built for developers who want to protect JavaScript code.