- Mode : Predefined four encryption modes: low obfuscation, medium obfuscation, high obfuscation and custom parameters. Different obfuscation degree and parameters have different influence on performance.
- Open File : Open js file , Supported file character encodings isUTF-8.
In the custom parameters, you can enter the user-defined JSON parameters to control
the underlying details of obfuscation. Please confirm that the correct configuration
format is maintained, and test the obfuscated code to ensure work correctly.
See the following table for some core parameters,Complete parameter listDocumentation.
Typical usage of custom parameters:
By setting domainLock and domainLockRedirectUrl parameters, encrypted JS files are prohibited from running in unauthorized domain name websites, so as to prevent others from copying your code.
By setting debugProtection related parameters, it is forbidden for others to debug your JS code in the developer debugging tool mode.
Setting the selfDefending parameter will make the obfuscated code unavailable after beautification, thus increasing the difficulty of understanding the obfuscated code.
Core Parameter List
|compact||boolean||true||Compact code output on one line.|
|controlFlowFlattening||boolean||false||Enables code control flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.|
|controlFlowFlatteningThreshold||number||0.75||Min: 0 Max: 1.The probability that the controlFlowFlattening transformation will be applied to any given node.|
|deadCodeInjection||boolean||false||With this option, random blocks of dead code will be added to the obfuscated code.|
|deadCodeInjectionThreshold||number||0.4||Min: 0 Max: 1. Allows to set percentage of nodes that will affected by deadCodeInjection.|
|debugProtection||boolean||false||This option makes it almost impossible to use the debugger function of the Developer Tools (both on WebKit-based and Mozilla Firefox).|
|debugProtectionInterval||number||0||If set, an interval in milliseconds is used to force the debug mode on the Console tab, making it harder to use other features of the Developer Tools. Works if debugProtection is enabled. Recommended value is between 2000 and 4000 milliseconds.|
|disableConsoleOutput||boolean||false||Disables the use of console.log, console.info, console.error, console.warn, console.debug, console.exception and console.trace by replacing them with empty functions. This makes the use of the debugger harder.|
|domainLock||string||||Allows to run the obfuscated source code only on specific domains and/or sub-domains. This makes really hard for someone to just copy and paste your source code and run it elsewhere. If the source code isn't run on the domains specified by this option, the browser will be redirected to a passed to the domainLockRedirectUrl option URL.|
|domainLockRedirectUrl||string||about:blank||Allows the browser to be redirected to a passed URL if the source code isn't run on the domains specified by domainLock.|
|renameGlobals||boolean||false||Enables obfuscation of global variable and function names with declaration.This option can break your code. Enable it only if you know what it does!|
|target||string||browser||Allows to set target environment for obfuscated code.Available values:browser,browser-no-eval,node. Currently output code for browser and node targets is identical, but some browser-specific options are not allowed to use with node target. Output code for browser-no-eval target is not using eval.|
|unicodeEscapeSequence||boolean||false||Allows to enable/disable string conversion to unicode escape sequence. Unicode escape sequence increases code size greatly and strings easily can be reverted to their original view. Recommended to enable this option only for small source code.|