|
@@ -200,42 +200,42 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
|
|
'Name of js / json config file'
|
|
'Name of js / json config file'
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--controlFlowFlattening <boolean>',
|
|
|
|
|
|
+ '--control-flow-flattening <boolean>',
|
|
'Enables control flow flattening',
|
|
'Enables control flow flattening',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--controlFlowFlatteningThreshold <number>',
|
|
|
|
|
|
+ '--control-flow-flattening-threshold <number>',
|
|
'The probability that the control flow flattening transformation will be applied to the node',
|
|
'The probability that the control flow flattening transformation will be applied to the node',
|
|
parseFloat
|
|
parseFloat
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--deadCodeInjection <boolean>',
|
|
|
|
|
|
+ '--dead-code-injection <boolean>',
|
|
'Enables dead code injection',
|
|
'Enables dead code injection',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--deadCodeInjectionThreshold <number>',
|
|
|
|
|
|
+ '--dead-code-injection-threshold <number>',
|
|
'The probability that the dead code injection transformation will be applied to the node',
|
|
'The probability that the dead code injection transformation will be applied to the node',
|
|
parseFloat
|
|
parseFloat
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--debugProtection <boolean>',
|
|
|
|
|
|
+ '--debug-protection <boolean>',
|
|
'Disable browser Debug panel (can cause DevTools enabled browser freeze)',
|
|
'Disable browser Debug panel (can cause DevTools enabled browser freeze)',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--debugProtectionInterval <boolean>',
|
|
|
|
|
|
+ '--debug-protection-interval <boolean>',
|
|
'Disable browser Debug panel even after page was loaded (can cause DevTools enabled browser freeze)',
|
|
'Disable browser Debug panel even after page was loaded (can cause DevTools enabled browser freeze)',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--disableConsoleOutput <boolean>',
|
|
|
|
|
|
+ '--disable-console-output <boolean>',
|
|
'Allow console.log, console.info, console.error and console.warn messages output into browser console',
|
|
'Allow console.log, console.info, console.error and console.warn messages output into browser console',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--domainLock <list> (comma separated, without whitespaces)',
|
|
|
|
|
|
+ '--domain-lock <list> (comma separated, without whitespaces)',
|
|
'Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)',
|
|
'Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)',
|
|
ArraySanitizer
|
|
ArraySanitizer
|
|
)
|
|
)
|
|
@@ -248,16 +248,16 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--reservedNames <list> (comma separated, without whitespaces)',
|
|
|
|
|
|
+ '--reserved-names <list> (comma separated, without whitespaces)',
|
|
'Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)',
|
|
'Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)',
|
|
ArraySanitizer
|
|
ArraySanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--renameGlobals <boolean>', 'Allows to enable obfuscation of global variable and function names with declaration.',
|
|
|
|
|
|
+ '--rename-globals <boolean>', 'Allows to enable obfuscation of global variable and function names with declaration.',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--rotateStringArray <boolean>', 'Disable rotation of unicode array values during obfuscation',
|
|
|
|
|
|
+ '--rotate-string-array <boolean>', 'Disable rotation of unicode array values during obfuscation',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
@@ -266,40 +266,40 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
|
|
parseFloat
|
|
parseFloat
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--selfDefending <boolean>',
|
|
|
|
|
|
+ '--self-defending <boolean>',
|
|
'Disables self-defending for obfuscated code',
|
|
'Disables self-defending for obfuscated code',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--sourceMap <boolean>',
|
|
|
|
|
|
+ '--source-map <boolean>',
|
|
'Enables source map generation',
|
|
'Enables source map generation',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--sourceMapBaseUrl <string>',
|
|
|
|
- 'Sets base url to the source map import url when `--sourceMapMode=separate`'
|
|
|
|
|
|
+ '--source-map-base-url <string>',
|
|
|
|
+ 'Sets base url to the source map import url when `--source-map-mode=separate`'
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--sourceMapFileName <string>',
|
|
|
|
- 'Sets file name for output source map when `--sourceMapMode=separate`'
|
|
|
|
|
|
+ '--source-map-file-name <string>',
|
|
|
|
+ 'Sets file name for output source map when `--source-map-mode=separate`'
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--sourceMapMode <string> [inline, separate]',
|
|
|
|
|
|
+ '--source-map-mode <string> [inline, separate]',
|
|
'Specify source map output mode',
|
|
'Specify source map output mode',
|
|
SourceMapModeSanitizer
|
|
SourceMapModeSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--stringArray <boolean>',
|
|
|
|
|
|
+ '--string-array <boolean>',
|
|
'Disables gathering of all literal strings into an array and replacing every literal string with an array call',
|
|
'Disables gathering of all literal strings into an array and replacing every literal string with an array call',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--stringArrayEncoding <boolean|string> [true, false, base64, rc4]',
|
|
|
|
|
|
+ '--string-array-encoding <boolean|string> [true, false, base64, rc4]',
|
|
'Encodes all strings in strings array using base64 or rc4 (this option can slow down your code speed',
|
|
'Encodes all strings in strings array using base64 or rc4 (this option can slow down your code speed',
|
|
StringArrayEncodingSanitizer
|
|
StringArrayEncodingSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--stringArrayThreshold <number>',
|
|
|
|
|
|
+ '--string-array-threshold <number>',
|
|
'The probability that the literal string will be inserted into stringArray (Default: 0.8, Min: 0, Max: 1)',
|
|
'The probability that the literal string will be inserted into stringArray (Default: 0.8, Min: 0, Max: 1)',
|
|
parseFloat
|
|
parseFloat
|
|
)
|
|
)
|
|
@@ -309,7 +309,7 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
|
|
ObfuscationTargetSanitizer
|
|
ObfuscationTargetSanitizer
|
|
)
|
|
)
|
|
.option(
|
|
.option(
|
|
- '--unicodeEscapeSequence <boolean>',
|
|
|
|
|
|
+ '--unicode-escape-sequence <boolean>',
|
|
'Allows to enable/disable string conversion to unicode escape sequence',
|
|
'Allows to enable/disable string conversion to unicode escape sequence',
|
|
BooleanSanitizer
|
|
BooleanSanitizer
|
|
)
|
|
)
|
|
@@ -319,9 +319,9 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
|
|
private configureHelp (): void {
|
|
private configureHelp (): void {
|
|
this.commands.on('--help', () => {
|
|
this.commands.on('--help', () => {
|
|
console.log(' Examples:\n');
|
|
console.log(' Examples:\n');
|
|
- console.log(' %> javascript-obfuscator input_file_name.js --compact true --selfDefending false');
|
|
|
|
- console.log(' %> javascript-obfuscator input_file_name.js --output output_file_name.js --compact true --selfDefending false');
|
|
|
|
- console.log(' %> javascript-obfuscator input_directory_name --compact true --selfDefending false');
|
|
|
|
|
|
+ console.log(' %> javascript-obfuscator input_file_name.js --compact true --self-defending false');
|
|
|
|
+ console.log(' %> javascript-obfuscator input_file_name.js --output output_file_name.js --compact true --self-defending false');
|
|
|
|
+ console.log(' %> javascript-obfuscator input_directory_name --compact true --self-defending false');
|
|
console.log('');
|
|
console.log('');
|
|
});
|
|
});
|
|
}
|
|
}
|