Change Log
obfuscateMultiple
methodobfuscateMultiple
to obfuscation of multiple source codesmangled
identifier names generator logicselfDefending
helper logicsuper
call--output
logic. Now --output
value can describe if it's a file or a directory path. Check README.md for more infonode
target for sourceMap*
optionsimport.meta
support. Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/505target: 'node'
will cause a validation erroridentifierNamesGenerator: 'mangled
speedtransformObjectKeys
runtime errorsMaximum call stack size exceeded
error on large strings when splitString
option is enabledawesome-typescript-loader
on ts-loader
shuffleStringArray
randomly shuffles string array itemsespree
on acorn
TypeError: Assignment to constant variable
when auto-detection of kind of variables is inserted const
variables for controlFlowStorage
nodestransformObjectKeys
transformation to cover more casesfor-await-of
statement: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/419mangled
and dictionary
identifier names generatorsidentifierNamesGenerator: dictionary
and debugProtection
optionsseed
option now accepts string
and number
valuesidentifierNamesGenerator
now allows to set new dictionary
identifier names generatoridentifiersDictionary
sets identifiers dictionary for identifierNamesGenerator: dictionary
optionThanks to our contributors!
reservedNames
optionThanks to our contributors!
splitStrings
option now correctly works with transformObjectKeys
optionTransformersRunner
rework to support topological sort of node transformerssplitStrings
option now correctly splits strings inside objectssplitStrings
option now affects template literal stringssplitStrings
splits literal strings into chunks with length of splitStringsChunkLength
option valuesplitStringsChunkLength
sets chunk length of splitStrings
optionThanks to our contributors!
Thanks to our contributors!
Thanks to our contributors!
Thanks to our contributors!
reservedStrings
disables transformation of string literals, which being matched by passed RegExp patternsinputFileName
allows to set name of the input file with source code. This name will used internally, for example, for source map generation.domainLock
now will work in SVG.
esprima
on espree
node@4
and node@5
support.extension
value of target
option on browser-no-eval
.reservedName
option. Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/216exclude
allows to exclude specific files or directories from obfuscation.import
and export
declarations.esprima
error messages.identifiersPrefix
sets prefix for all global identifiers.transformObjectKeys
enables object keys transformation and obfuscation.eval
expressions obfuscation.deadCodeInjection
is enabled and identifierNamesGenerator
is set to mangled
.mangle
option was removed.identifierNamesGenerator
allows to set identifier names generator (hexadecimal
or mangled
).kebab-case
format (--disableConsoleOutout
-> --disable-console-output
).mangle
option algorithm without esmangle
; fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/110@license
and @preserve
words won't be removed from obfuscated code.target
allows to set target environment for obfuscated code.es2015
class names.log
enables logging of the information to the console.renameGlobals
allows to enable obfuscation of global variable and function names with declaration.deadCodeInjection
. With this option random blocks of dead code will add to the obfuscated code.deadCodeInjectionThreshold
allows to set percentage of nodes that will affected by deadCodeInjection
.mangle
enables mangling of variable names.--config
allows to set config file with obfuscator options.disableConsoleOutput
option now disabled by default.escapeUnicodeSequence
option now disabled by default.controlFlowFlattening
now affects string literal nodes.rc4
stringArrayEncoding
.escodegen
to escodegen-wallaby
, fixed https://github.com/javascript-obfuscator/javascript-obfuscator/pull/50node@0.10
and node@0.12
support.controlFlowFlattening
allows to enable/disable Control Flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.controlFlowFlatteningThreshold
allows to set percentage of nodes that will affected by controlFlowFlattening
.es2015
support: correct obfuscation of TemplateLiteral
, ArrayPattern
, AssignmentPattern
nodes.npm
to yarn
internally.Cannot read property 'type' of undefined
error, when RandomGeneratorUtils.getMathRandom()
returned incorrect value 1
.node@0.10
and node@0.12
support.npm
to yarn
internally.controlFlowFlattening
allows to enable/disable Control Flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.controlFlowFlatteningThreshold
allows to set percentage of nodes that will affected by controlFlowFlattening
.es2015
support: correct obfuscation of TemplateLiteral
, ArrayPattern
, AssignmentPattern
nodes.selfDefending
option now disabled by default.seed
sets seed for random generator. This is useful for creating repeatable results.disableConsoleOutput
option now replaces console.xxx
functions on empty function instead of infinity loop.unicodeArray
option has been renamed to stringArray
.unicodeArrayThreshold
option has been renamed to stringArrayThreshold
.encodeUnicodeArray
option has been renamed to stringArrayEncoding
and now accepts following values: true|false|'base64'|'rc4'
.wrapUnicodeArrayCalls
was removed and now all calls to stringArray
are always wrapped by special wrapper function.unicodeEscapeSequence
allows to enable/disable strings conversion to unicode escape sequence.domainLock
locks the obfuscated source code so it only runs on specific domains and/or sub-domains.sourceMapBaseUrl
sets base url to the source map import url when sourceMapMode: 'separate'
.selfDefendingNode
or consoleOutputNode
now inserted into deepest stack trace function call.Utils.decToHex
methodobfuscate(sourceCode, options)
returns ObfuscationResult
object instead string
. ObfuscationResult
object contains two public methods: getObfuscatedCode()
and getSourceMap()
.javascript-obfuscator
command. See README.md
for available options.sourceMap
enables source map generation for obfuscated code.sourceMapMode
specifies source map generation mode.