JS-Confuser provides a wide range of options to customize the obfuscation process. Below is a list of all available options in the obfuscator.
| Option | Description |
|---|---|
| Identifier Generator | Determines how variables are renamed. |
| Rename Variables | Determines if variables should be renamed. |
| Rename Globals | Renames top-level variables, turn this off for web-related scripts. Enabled by default. |
| Rename Labels | Renames labeled control-flow statements, and removes unnecessary labels. Enabled by default. |
| Moved Declarations | Moves variable declarations to the top of the context. |
| Option | Description |
|---|---|
| String Compression | String Compression uses zlib compression algorithm to compress strings. |
| String Concealing | String Concealing involves encoding strings to conceal plain-text values. |
| Custom String Encodings | Custom String Encodings allows you to define your own string encoding/decoding functions. |
| String Encoding | String Encoding transforms a string into an encoded representation. |
| String Splitting | String Splitting splits your strings into multiple expressions. |
| Option | Description |
|---|---|
| Calculator | Creates a calculator function to handle arithmetic and logical expressions. |
| Object Extraction | Extracts object properties into separate variables. |
| Global Concealing | Global Concealing hides global variables being accessed. |
| Shuffle | Shuffles the initial order of arrays. The order is brought back to the original during runtime. |
| Duplicate Literals Removal | Duplicate Literals Removal replaces duplicate literals with a single variable name. |
| Option | Description |
|---|---|
| Control Flow Flattening | Control-flow Flattening hinders program comprehension by creating convoluted switch statements. |
| Dispatcher | Creates a middleman function to process function calls. |
| Opaque Predicates | An Opaque Predicate is a predicate(true/false) that is evaluated at runtime, this can confuse reverse engineers from understanding your code. |
| Dead Code | Randomly injects dead code. |
| AST Scrambler | Semantically changes the AST to bypass automated tools. |
| Option | Description |
|---|---|
| Variable Masking | Local variables are consolidated into a rotating array. |
| Flatten | Brings independent declarations to the highest scope. |
| RGF | RGF (Runtime-Generated-Functions) creates executable code from strings. |
| Option | Description |
|---|---|
| Domain Lock | Ensures the script can only execute on the specified domain. Set the Counter Measures option to control what happens if violated. |
| Start Date | When the program is first able to be used. |
| End Date | When the program is no longer able to be used. |
| Tamper Protection | Tamper Protection safeguards the runtime behavior from being altered by JavaScript pitfalls. |
| Self Defending | Prevents the use of code beautifiers or formatters against your code. |
| Custom Locks | Customize the lock algorithm to your own implementation. |
| Integrity | Integrity ensures the source code is unchanged. |
| Anti Debug | Adds debugger statements throughout the code. |
| Countermeasures | A custom callback function to invoke when a lock is triggered. |
| Option | Description |
|---|---|
| Hexadecimal Numbers | Uses the hexadecimal representation for numbers. |
| Compact | Remove's whitespace from the final output. |
| Minify | Minifies redundant code. |
| Preserve Function Length | Preserves the original function.length property. |