Skip to content

Swp-dev/JavascriptArmor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSArmor

Advanced JavaScript Obfuscator for protecting source code.

npm downloads stars license


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 jsarmor

Quick Start

Obfuscate a JavaScript file:

jsarmor gen <main file>
Ex: jsarmor gen index.js

Output will be generated in:

dist/obf.js

Run the protected file normally with Node.js.

node dist/obf.js

Demo

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

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

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.

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

License

MIT License


Built for developers who want to protect JavaScript code.

Releases

No releases published

Packages

 
 
 

Contributors