New option: stringArrayIndexesType accepts an array of types of string array call indexes

This commit is contained in:
sanex
2020-11-15 12:05:34 +03:00
parent 63bbd97254
commit ed7fbc5bef
33 changed files with 390 additions and 176 deletions
+8
View File
@@ -30,6 +30,7 @@ import { Logger } from '../logger/Logger';
import { ObfuscatedCodeWriter } from './utils/ObfuscatedCodeWriter';
import { SourceCodeReader } from './utils/SourceCodeReader';
import { Utils } from '../utils/Utils';
import { StringArrayIndexesType } from '../enums/node-transformers/string-array-transformers/StringArrayIndexesType';
export class JavaScriptObfuscatorCLI implements IInitializable {
/**
@@ -350,6 +351,13 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
`Default: ${StringArrayEncoding.None}`,
ArraySanitizer
)
.option(
'--string-array-indexes-type <list> (comma separated, without whitespaces)',
'Encodes each string in strings array using base64 or rc4 (this option can slow down your code speed). ' +
`Values: ${CLIUtils.stringifyOptionAvailableValues(StringArrayIndexesType)}. ` +
`Default: ${StringArrayIndexesType.HexadecimalNumber}`,
ArraySanitizer
)
.option(
'--string-array-index-shift <boolean>',
'Enables additional index shift for all string array calls',