mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Merge branch 'dev'
This commit is contained in:
Vendored
+703
-683
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -28,7 +28,7 @@
|
||||
"escodegen": "1.8.1",
|
||||
"esprima": "3.1.3",
|
||||
"estraverse": "4.2.0",
|
||||
"inversify": "3.0.0-rc.4",
|
||||
"inversify": "3.0.0",
|
||||
"lodash": "4.17.4",
|
||||
"mkdirp": "0.5.1",
|
||||
"reflect-metadata": "0.1.9",
|
||||
@@ -44,10 +44,10 @@
|
||||
"@types/esprima": "2.1.33",
|
||||
"@types/estraverse": "0.0.6",
|
||||
"@types/estree": "0.0.34",
|
||||
"@types/lodash": "4.14.48",
|
||||
"@types/lodash": "4.14.50",
|
||||
"@types/mkdirp": "0.3.29",
|
||||
"@types/mocha": "2.2.37",
|
||||
"@types/node": "6.0.59",
|
||||
"@types/node": "7.0.0",
|
||||
"@types/sinon": "1.16.34",
|
||||
"@types/string-template": "1.0.2",
|
||||
"awesome-typescript-loader": "3.0.0-beta.18",
|
||||
@@ -63,8 +63,8 @@
|
||||
"ts-node": "2.0.0",
|
||||
"tslint": "4.3.1",
|
||||
"tslint-loader": "3.3.0",
|
||||
"typescript": "2.1.4",
|
||||
"webpack": "2.2.0-rc.3",
|
||||
"typescript": "2.1.5",
|
||||
"webpack": "2.2.0-rc.4",
|
||||
"webpack-node-externals": "1.5.4"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
+19
-8
@@ -29,7 +29,7 @@ export class Obfuscator implements IObfuscator {
|
||||
/**
|
||||
* @type {Map<string, NodeTransformers[]>}
|
||||
*/
|
||||
private static readonly nodeControlFlowTransformersMap: Map <string, NodeTransformers[]> = new Map([
|
||||
private static readonly controlFlowTransformersMap: Map <string, NodeTransformers[]> = new Map([
|
||||
[NodeType.BlockStatement, [NodeTransformers.BlockStatementControlFlowTransformer]],
|
||||
[NodeType.FunctionDeclaration, [NodeTransformers.FunctionControlFlowTransformer]],
|
||||
[NodeType.FunctionExpression, [NodeTransformers.FunctionControlFlowTransformer]]
|
||||
@@ -38,7 +38,16 @@ export class Obfuscator implements IObfuscator {
|
||||
/**
|
||||
* @type {Map<string, NodeTransformers[]>}
|
||||
*/
|
||||
private static readonly nodeObfuscatorsMap: Map <string, NodeTransformers[]> = new Map([
|
||||
private static readonly convertingTransformersMap: Map <string, NodeTransformers[]> = new Map([
|
||||
[NodeType.MemberExpression, [NodeTransformers.MemberExpressionTransformer]],
|
||||
[NodeType.MethodDefinition, [NodeTransformers.MethodDefinitionTransformer]],
|
||||
[NodeType.TemplateLiteral, [NodeTransformers.TemplateLiteralTransformer]],
|
||||
]);
|
||||
|
||||
/**
|
||||
* @type {Map<string, NodeTransformers[]>}
|
||||
*/
|
||||
private static readonly obfuscatingTransformersMap: Map <string, NodeTransformers[]> = new Map([
|
||||
[NodeType.ArrowFunctionExpression, [NodeTransformers.FunctionTransformer]],
|
||||
[NodeType.ClassDeclaration, [NodeTransformers.FunctionDeclarationTransformer]],
|
||||
[NodeType.CatchClause, [NodeTransformers.CatchClauseTransformer]],
|
||||
@@ -47,13 +56,10 @@ export class Obfuscator implements IObfuscator {
|
||||
NodeTransformers.FunctionTransformer
|
||||
]],
|
||||
[NodeType.FunctionExpression, [NodeTransformers.FunctionTransformer]],
|
||||
[NodeType.MemberExpression, [NodeTransformers.MemberExpressionTransformer]],
|
||||
[NodeType.MethodDefinition, [NodeTransformers.MethodDefinitionTransformer]],
|
||||
[NodeType.ObjectExpression, [NodeTransformers.ObjectExpressionTransformer]],
|
||||
[NodeType.VariableDeclaration, [NodeTransformers.VariableDeclarationTransformer]],
|
||||
[NodeType.LabeledStatement, [NodeTransformers.LabeledStatementTransformer]],
|
||||
[NodeType.TemplateLiteral, [NodeTransformers.TemplateLiteralTransformer]],
|
||||
[NodeType.Literal, [NodeTransformers.LiteralTransformer]] // should be latest in the chain of obfuscators
|
||||
[NodeType.Literal, [NodeTransformers.LiteralTransformer]]
|
||||
]);
|
||||
|
||||
/**
|
||||
@@ -134,7 +140,7 @@ export class Obfuscator implements IObfuscator {
|
||||
astTree = this.transformAstTree(
|
||||
astTree,
|
||||
VisitorDirection.leave,
|
||||
this.nodeTransformersFactory(Obfuscator.nodeControlFlowTransformersMap)
|
||||
this.nodeTransformersFactory(Obfuscator.controlFlowTransformersMap)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -142,7 +148,12 @@ export class Obfuscator implements IObfuscator {
|
||||
astTree = this.transformAstTree(
|
||||
astTree,
|
||||
VisitorDirection.enter,
|
||||
this.nodeTransformersFactory(Obfuscator.nodeObfuscatorsMap)
|
||||
this.nodeTransformersFactory(
|
||||
new Map([
|
||||
...Obfuscator.convertingTransformersMap,
|
||||
...Obfuscator.obfuscatingTransformersMap
|
||||
])
|
||||
)
|
||||
);
|
||||
|
||||
this.obfuscationEventEmitter.emit(ObfuscationEvents.AfterObfuscation, astTree, stackTraceData);
|
||||
|
||||
@@ -182,12 +182,12 @@ export class JavaScriptObfuscatorCLI {
|
||||
.option(
|
||||
'--domainLock <list>',
|
||||
'Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)',
|
||||
(val: string) => val.split(',')
|
||||
(value: string) => value.split(',')
|
||||
)
|
||||
.option(
|
||||
'--reservedNames <list>',
|
||||
'Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)',
|
||||
(val: string) => val.split(',')
|
||||
(value: string) => value.split(',')
|
||||
)
|
||||
.option(
|
||||
'--rotateStringArray <boolean>', 'Disable rotation of unicode array values during obfuscation',
|
||||
@@ -286,7 +286,10 @@ export class JavaScriptObfuscatorCLI {
|
||||
options.sourceMapFileName || ''
|
||||
);
|
||||
|
||||
options.sourceMapFileName = path.basename(outputSourceMapPath);
|
||||
options = {
|
||||
...options,
|
||||
sourceMapFileName: path.basename(outputSourceMapPath)
|
||||
};
|
||||
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(this.data, options);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ServiceIdentifiers } from './ServiceIdentifiers';
|
||||
|
||||
import { controlFlowTransformersModule } from './modules/node-transformers/ControlFlowTransformersModule';
|
||||
import { customNodesModule } from './modules/custom-nodes/CustomNodesModule';
|
||||
import { obfuscationTransformersModule } from './modules/node-transformers/ObfuscationTransformersModule';
|
||||
import { obfuscatingTransformersModule } from './modules/node-transformers/ObfuscatingTransformersModule';
|
||||
import { nodeTransformersModule } from './modules/node-transformers/NodeTransformersModule';
|
||||
import { stackTraceAnalyzerModule } from './modules/stack-trace-analyzer/StackTraceAnalyzerModule';
|
||||
import { storagesModule } from './modules/storages/StoragesModule';
|
||||
@@ -88,7 +88,7 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
|
||||
this.container.load(customNodesModule);
|
||||
this.container.load(nodeTransformersModule);
|
||||
this.container.load(controlFlowTransformersModule);
|
||||
this.container.load(obfuscationTransformersModule);
|
||||
this.container.load(obfuscatingTransformersModule);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,19 +8,19 @@ import { NodeTransformers } from '../../../enums/container/NodeTransformers';
|
||||
import { FunctionControlFlowTransformer } from '../../../node-transformers/control-flow-transformers/FunctionControlFlowTransformer';
|
||||
|
||||
import { BlockStatementControlFlowTransformer } from '../../../node-transformers/control-flow-transformers/BlockStatementControlFlowTransformer';
|
||||
import { CatchClauseTransformer } from '../../../node-transformers/obfuscation-transformers/CatchClauseTransformer';
|
||||
import { FunctionDeclarationTransformer } from '../../../node-transformers/obfuscation-transformers/FunctionDeclarationTransformer';
|
||||
import { FunctionTransformer } from '../../../node-transformers/obfuscation-transformers/FunctionTransformer';
|
||||
import { LabeledStatementTransformer } from '../../../node-transformers/obfuscation-transformers/LabeledStatementTransformer';
|
||||
import { LiteralTransformer } from '../../../node-transformers/obfuscation-transformers/LiteralTransformer';
|
||||
import { MemberExpressionTransformer } from '../../../node-transformers/obfuscation-transformers/MemberExpressionTransformer';
|
||||
import { MethodDefinitionTransformer } from '../../../node-transformers/obfuscation-transformers/MethodDefinitionTransformer';
|
||||
import { ObjectExpressionTransformer } from '../../../node-transformers/obfuscation-transformers/ObjectExpressionTransformer';
|
||||
import { TemplateLiteralTransformer } from '../../../node-transformers/obfuscation-transformers/TemplateLiteralTransformer';
|
||||
import { VariableDeclarationTransformer } from '../../../node-transformers/obfuscation-transformers/VariableDeclarationTransformer';
|
||||
import { CatchClauseTransformer } from '../../../node-transformers/obfuscating-transformers/CatchClauseTransformer';
|
||||
import { FunctionDeclarationTransformer } from '../../../node-transformers/obfuscating-transformers/FunctionDeclarationTransformer';
|
||||
import { FunctionTransformer } from '../../../node-transformers/obfuscating-transformers/FunctionTransformer';
|
||||
import { LabeledStatementTransformer } from '../../../node-transformers/obfuscating-transformers/LabeledStatementTransformer';
|
||||
import { LiteralTransformer } from '../../../node-transformers/obfuscating-transformers/LiteralTransformer';
|
||||
import { MemberExpressionTransformer } from '../../../node-transformers/converting-transformers/MemberExpressionTransformer';
|
||||
import { MethodDefinitionTransformer } from '../../../node-transformers/converting-transformers/MethodDefinitionTransformer';
|
||||
import { ObjectExpressionTransformer } from '../../../node-transformers/obfuscating-transformers/ObjectExpressionTransformer';
|
||||
import { TemplateLiteralTransformer } from '../../../node-transformers/converting-transformers/TemplateLiteralTransformer';
|
||||
import { VariableDeclarationTransformer } from '../../../node-transformers/obfuscating-transformers/VariableDeclarationTransformer';
|
||||
|
||||
export const nodeTransformersModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
|
||||
// node control flow transformers
|
||||
// control flow transformers
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(BlockStatementControlFlowTransformer)
|
||||
.whenTargetNamed(NodeTransformers.BlockStatementControlFlowTransformer);
|
||||
@@ -29,7 +29,20 @@ export const nodeTransformersModule: interfaces.ContainerModule = new ContainerM
|
||||
.to(FunctionControlFlowTransformer)
|
||||
.whenTargetNamed(NodeTransformers.FunctionControlFlowTransformer);
|
||||
|
||||
// node obfuscators
|
||||
// converting transformers
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(MemberExpressionTransformer)
|
||||
.whenTargetNamed(NodeTransformers.MemberExpressionTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(MethodDefinitionTransformer)
|
||||
.whenTargetNamed(NodeTransformers.MethodDefinitionTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(TemplateLiteralTransformer)
|
||||
.whenTargetNamed(NodeTransformers.TemplateLiteralTransformer);
|
||||
|
||||
// obfuscation transformers
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(CatchClauseTransformer)
|
||||
.whenTargetNamed(NodeTransformers.CatchClauseTransformer);
|
||||
@@ -50,22 +63,10 @@ export const nodeTransformersModule: interfaces.ContainerModule = new ContainerM
|
||||
.to(LiteralTransformer)
|
||||
.whenTargetNamed(NodeTransformers.LiteralTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(MemberExpressionTransformer)
|
||||
.whenTargetNamed(NodeTransformers.MemberExpressionTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(MethodDefinitionTransformer)
|
||||
.whenTargetNamed(NodeTransformers.MethodDefinitionTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(ObjectExpressionTransformer)
|
||||
.whenTargetNamed(NodeTransformers.ObjectExpressionTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(TemplateLiteralTransformer)
|
||||
.whenTargetNamed(NodeTransformers.TemplateLiteralTransformer);
|
||||
|
||||
bind<INodeTransformer>(ServiceIdentifiers.INodeTransformer)
|
||||
.to(VariableDeclarationTransformer)
|
||||
.whenTargetNamed(NodeTransformers.VariableDeclarationTransformer);
|
||||
|
||||
+5
-5
@@ -5,12 +5,12 @@ import { IObfuscationReplacer } from '../../../interfaces/node-transformers/IObf
|
||||
|
||||
import { NodeObfuscatorsReplacers } from '../../../enums/container/NodeObfuscationReplacers';
|
||||
|
||||
import { BooleanLiteralReplacer } from '../../../node-transformers/obfuscation-transformers/replacers/BooleanLiteralReplacer';
|
||||
import { IdentifierReplacer } from '../../../node-transformers/obfuscation-transformers/replacers/IdentifierReplacer';
|
||||
import { NumberLiteralReplacer } from '../../../node-transformers/obfuscation-transformers/replacers/NumberLiteralReplacer';
|
||||
import { StringLiteralReplacer } from '../../../node-transformers/obfuscation-transformers/replacers/StringLiteralReplacer';
|
||||
import { BooleanLiteralReplacer } from '../../../node-transformers/obfuscating-transformers/replacers/BooleanLiteralReplacer';
|
||||
import { IdentifierReplacer } from '../../../node-transformers/obfuscating-transformers/replacers/IdentifierReplacer';
|
||||
import { NumberLiteralReplacer } from '../../../node-transformers/obfuscating-transformers/replacers/NumberLiteralReplacer';
|
||||
import { StringLiteralReplacer } from '../../../node-transformers/obfuscating-transformers/replacers/StringLiteralReplacer';
|
||||
|
||||
export const obfuscationTransformersModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
|
||||
export const obfuscatingTransformersModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
|
||||
bind<IObfuscationReplacer>(ServiceIdentifiers.IObfuscatorReplacer)
|
||||
.to(BooleanLiteralReplacer)
|
||||
.whenTargetNamed(NodeObfuscatorsReplacers.BooleanReplacer);
|
||||
@@ -4,6 +4,7 @@ export const NodeType: any = Utils.strEnumify({
|
||||
ArrayExpression: 'ArrayExpression',
|
||||
ArrowFunctionExpression: 'ArrowFunctionExpression',
|
||||
AssignmentExpression: 'AssignmentExpression',
|
||||
AssignmentPattern: 'AssignmentPattern',
|
||||
BinaryExpression: 'BinaryExpression',
|
||||
BlockStatement: 'BlockStatement',
|
||||
BreakStatement: 'BreakStatement',
|
||||
@@ -22,6 +23,7 @@ export const NodeType: any = Utils.strEnumify({
|
||||
MemberExpression: 'MemberExpression',
|
||||
MethodDefinition: 'MethodDefinition',
|
||||
ObjectExpression: 'ObjectExpression',
|
||||
ObjectPattern: 'ObjectPattern',
|
||||
Program: 'Program',
|
||||
Property: 'Property',
|
||||
ReturnStatement: 'ReturnStatement',
|
||||
|
||||
-11
@@ -4,9 +4,7 @@ import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
import { IOptions } from '../../interfaces/options/IOptions';
|
||||
import { IObfuscationReplacer } from '../../interfaces/node-transformers/IObfuscationReplacer';
|
||||
|
||||
import { NodeObfuscatorsReplacers } from '../../enums/container/NodeObfuscationReplacers';
|
||||
import { NodeType } from '../../enums/NodeType';
|
||||
|
||||
import { AbstractNodeTransformer } from '../AbstractNodeTransformer';
|
||||
@@ -15,21 +13,12 @@ import { Node } from '../../node/Node';
|
||||
@injectable()
|
||||
export class MemberExpressionTransformer extends AbstractNodeTransformer {
|
||||
/**
|
||||
* @type {IObfuscationReplacer}
|
||||
*/
|
||||
private readonly stringLiteralReplacer: IObfuscationReplacer;
|
||||
|
||||
/**
|
||||
* @param replacersFactory
|
||||
* @param options
|
||||
*/
|
||||
constructor (
|
||||
@inject(ServiceIdentifiers.Factory__IObfuscatorReplacer) replacersFactory: (replacer: NodeObfuscatorsReplacers) => IObfuscationReplacer,
|
||||
@inject(ServiceIdentifiers.IOptions) options: IOptions
|
||||
) {
|
||||
super(options);
|
||||
|
||||
this.stringLiteralReplacer = replacersFactory(NodeObfuscatorsReplacers.StringLiteralReplacer);
|
||||
}
|
||||
|
||||
/**
|
||||
-11
@@ -4,9 +4,7 @@ import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
import { IOptions } from '../../interfaces/options/IOptions';
|
||||
import { IObfuscationReplacer } from '../../interfaces/node-transformers/IObfuscationReplacer';
|
||||
|
||||
import { NodeObfuscatorsReplacers } from '../../enums/container/NodeObfuscationReplacers';
|
||||
import { NodeType } from '../../enums/NodeType';
|
||||
|
||||
import { AbstractNodeTransformer } from '../AbstractNodeTransformer';
|
||||
@@ -29,21 +27,12 @@ export class MethodDefinitionTransformer extends AbstractNodeTransformer {
|
||||
private static readonly ignoredNames: string[] = ['constructor'];
|
||||
|
||||
/**
|
||||
* @type {IObfuscationReplacer}
|
||||
*/
|
||||
private readonly stringLiteralReplacer: IObfuscationReplacer;
|
||||
|
||||
/**
|
||||
* @param replacersFactory
|
||||
* @param options
|
||||
*/
|
||||
constructor (
|
||||
@inject(ServiceIdentifiers.Factory__IObfuscatorReplacer) replacersFactory: (replacer: NodeObfuscatorsReplacers) => IObfuscationReplacer,
|
||||
@inject(ServiceIdentifiers.IOptions) options: IOptions
|
||||
) {
|
||||
super(options);
|
||||
|
||||
this.stringLiteralReplacer = replacersFactory(NodeObfuscatorsReplacers.StringLiteralReplacer);
|
||||
}
|
||||
|
||||
/**
|
||||
-12
@@ -4,9 +4,6 @@ import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
import { IOptions } from '../../interfaces/options/IOptions';
|
||||
import { IObfuscationReplacer } from '../../interfaces/node-transformers/IObfuscationReplacer';
|
||||
|
||||
import { NodeObfuscatorsReplacers } from '../../enums/container/NodeObfuscationReplacers';
|
||||
|
||||
import { AbstractNodeTransformer } from '../AbstractNodeTransformer';
|
||||
import { Node } from '../../node/Node';
|
||||
@@ -19,21 +16,12 @@ import { Nodes } from '../../node/Nodes';
|
||||
@injectable()
|
||||
export class TemplateLiteralTransformer extends AbstractNodeTransformer {
|
||||
/**
|
||||
* @type {(replacer: NodeObfuscatorsReplacers) => IObfuscationReplacer}
|
||||
*/
|
||||
private readonly replacersFactory: (replacer: NodeObfuscatorsReplacers) => IObfuscationReplacer;
|
||||
|
||||
/**
|
||||
* @param replacersFactory
|
||||
* @param options
|
||||
*/
|
||||
constructor (
|
||||
@inject(ServiceIdentifiers.Factory__IObfuscatorReplacer) replacersFactory: (replacer: NodeObfuscatorsReplacers) => IObfuscationReplacer,
|
||||
@inject(ServiceIdentifiers.IOptions) options: IOptions
|
||||
) {
|
||||
super(options);
|
||||
|
||||
this.replacersFactory = replacersFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
+16
-2
@@ -61,9 +61,23 @@ export class FunctionTransformer extends AbstractNodeTransformer {
|
||||
private storeFunctionParams (functionNode: ESTree.Function, nodeIdentifier: number): void {
|
||||
functionNode.params
|
||||
.forEach((paramsNode: ESTree.Node) => {
|
||||
if (Node.isIdentifierNode(paramsNode)) {
|
||||
this.identifierReplacer.storeNames(paramsNode.name, nodeIdentifier);
|
||||
if (Node.isObjectPatternNode(paramsNode)) {
|
||||
return estraverse.VisitorOption.Skip;
|
||||
}
|
||||
|
||||
estraverse.traverse(paramsNode, {
|
||||
enter: (node: ESTree.Node): any => {
|
||||
if (Node.isAssignmentPatternNode(node) && Node.isIdentifierNode(node.left)) {
|
||||
this.identifierReplacer.storeNames(node.left.name, nodeIdentifier);
|
||||
|
||||
return estraverse.VisitorOption.Skip;
|
||||
}
|
||||
|
||||
if (Node.isIdentifierNode(node)) {
|
||||
this.identifierReplacer.storeNames(node.name, nodeIdentifier);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+4
-4
@@ -37,7 +37,7 @@ export class ObjectExpressionTransformer extends AbstractNodeTransformer {
|
||||
* @param node
|
||||
* @returns {ESTree.Literal}
|
||||
*/
|
||||
private static obfuscateLiteralPropertyKey (node: ESTree.Literal): ESTree.Literal {
|
||||
private static transformLiteralPropertyKey (node: ESTree.Literal): ESTree.Literal {
|
||||
if (typeof node.value === 'string' && !node['x-verbatim-property']) {
|
||||
node['x-verbatim-property'] = {
|
||||
content : `'${Utils.stringToUnicodeEscapeSequence(node.value)}'`,
|
||||
@@ -52,7 +52,7 @@ export class ObjectExpressionTransformer extends AbstractNodeTransformer {
|
||||
* @param node
|
||||
* @returns {ESTree.Literal}
|
||||
*/
|
||||
private static obfuscateIdentifierPropertyKey (node: ESTree.Identifier): ESTree.Literal {
|
||||
private static transformIdentifierPropertyKey (node: ESTree.Identifier): ESTree.Literal {
|
||||
return {
|
||||
type: NodeType.Literal,
|
||||
value: node.name,
|
||||
@@ -76,9 +76,9 @@ export class ObjectExpressionTransformer extends AbstractNodeTransformer {
|
||||
}
|
||||
|
||||
if (Node.isLiteralNode(property.key)) {
|
||||
property.key = ObjectExpressionTransformer.obfuscateLiteralPropertyKey(property.key);
|
||||
property.key = ObjectExpressionTransformer.transformLiteralPropertyKey(property.key);
|
||||
} else if (Node.isIdentifierNode(property.key)) {
|
||||
property.key = ObjectExpressionTransformer.obfuscateIdentifierPropertyKey(property.key);
|
||||
property.key = ObjectExpressionTransformer.transformIdentifierPropertyKey(property.key);
|
||||
}
|
||||
});
|
||||
|
||||
+6
-2
@@ -83,9 +83,13 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
|
||||
private storeVariableNames (variableDeclarationNode: ESTree.VariableDeclaration, nodeIdentifier: number): void {
|
||||
variableDeclarationNode.declarations
|
||||
.forEach((declarationNode: ESTree.VariableDeclarator) => {
|
||||
if (Node.isIdentifierNode(declarationNode.id)) {
|
||||
this.identifierReplacer.storeNames(declarationNode.id.name, nodeIdentifier);
|
||||
if (Node.isObjectPatternNode(declarationNode.id)) {
|
||||
return estraverse.VisitorOption.Skip;
|
||||
}
|
||||
|
||||
NodeUtils.typedTraverse(declarationNode.id, NodeType.Identifier, {
|
||||
enter: (node: ESTree.Identifier) => this.identifierReplacer.storeNames(node.name, nodeIdentifier)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,6 +13,14 @@ export class Node {
|
||||
return node.type === NodeType.ArrowFunctionExpression;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
public static isAssignmentPatternNode (node: ESTree.Node): node is ESTree.AssignmentPattern {
|
||||
return node.type === NodeType.AssignmentPattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param node
|
||||
* @returns {boolean}
|
||||
@@ -122,6 +130,14 @@ export class Node {
|
||||
return node.type === NodeType.MemberExpression;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
public static isObjectPatternNode (node: ESTree.Node): node is ESTree.ObjectPattern {
|
||||
return node.type === NodeType.ObjectPattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param node
|
||||
* @returns {boolean}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import { readFileAsString } from '../../../helpers/readFileAsString';
|
||||
import { JavaScriptObfuscator } from '../../../../src/JavaScriptObfuscator';
|
||||
|
||||
describe('ConsoleOutputDisableExpressionNode', () => {
|
||||
const regExp = /(_0x([a-f0-9]){4,6}\['(\\x[a-f0-9]*)*'\]\['(\\x[a-f0-9]*)*'\] *= *_0x([a-f0-9]){4,6};){4}/;
|
||||
const regExp = /(_0x([a-f0-9]){4,6}\['(\\x[a-f0-9]*)*'\]\['(\\x[a-f0-9]*)*'\] *= *_0x([a-f0-9]){4,6};){7}/u;
|
||||
|
||||
it('should correctly append `ConsoleOutputDisableExpressionNode` custom node into the obfuscated code if `disableConsoleOutput` option is set', () => {
|
||||
let obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { IObfuscationResult } from '../../../../../src/interfaces/IObfuscationResult';
|
||||
|
||||
import { NO_CUSTOM_NODES_PRESET } from '../../../../../src/options/presets/NoCustomNodes';
|
||||
|
||||
import { readFileAsString } from '../../../../helpers/readFileAsString';
|
||||
|
||||
import { JavaScriptObfuscator } from '../../../../../src/JavaScriptObfuscator';
|
||||
|
||||
describe('FunctionTransformer', () => {
|
||||
describe('identifiers transformation inside `FunctionDeclaration` and `FunctionExpression` node body', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/input.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
it('should correct transform both function parameter identifier and function body identifier with same name', () => {
|
||||
const functionParamIdentifierMatch: RegExpMatchArray|null = obfuscatedCode
|
||||
.match(/var _0x[a-f0-9]{4,6} *= *function *\((_0x[a-f0-9]{4,6})\) *\{/);
|
||||
const functionBodyIdentifierMatch: RegExpMatchArray|null = obfuscatedCode
|
||||
.match(/console\['\\x6c\\x6f\\x67'\]\((_0x[a-f0-9]{4,6})\)/);
|
||||
|
||||
const functionParamIdentifierName: string = (<RegExpMatchArray>functionParamIdentifierMatch)[1];
|
||||
const functionBodyIdentifierName: string = (<RegExpMatchArray>functionBodyIdentifierMatch)[1];
|
||||
|
||||
assert.equal(functionParamIdentifierName, functionBodyIdentifierName);
|
||||
});
|
||||
|
||||
it('shouldn\'t transform other variables in function body', () => {
|
||||
assert.equal(/variable *= *0x6;/.test(obfuscatedCode), true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('object pattern as parameter', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/object-pattern-as-parameter.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
it('shouldn\'t transform function parameter object pattern identifier', () => {
|
||||
const functionParameterMatch: RegExp = /function *\(\{ *bar *\}\) *\{/;
|
||||
const functionBodyMatch: RegExp = /return *bar;/;
|
||||
|
||||
assert.match(obfuscatedCode, functionParameterMatch);
|
||||
assert.match(obfuscatedCode, functionBodyMatch);
|
||||
});
|
||||
});
|
||||
|
||||
describe('assignment pattern as parameter', () => {
|
||||
describe('literal as right value', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/assignment-pattern-as-parameter-1.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
it('should transform function parameter assignment pattern identifier', () => {
|
||||
const functionParameterMatch: RegExp = /function *\(_0x[a-f0-9]{4,6} *= *0x1\) *\{/;
|
||||
const functionBodyMatch: RegExp = /return *_0x[a-f0-9]{4,6};/;
|
||||
|
||||
assert.match(obfuscatedCode, functionParameterMatch);
|
||||
assert.match(obfuscatedCode, functionBodyMatch);
|
||||
});
|
||||
});
|
||||
|
||||
describe('identifier as right value', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/assignment-pattern-as-parameter-2.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
const variableDeclarationMatch: RegExp = /var *(_0x[a-f0-9]{4,6}) *= *0x1;/;
|
||||
const functionParameterMatch: RegExp = /function *\((_0x[a-f0-9]{4,6}) *= *(_0x[a-f0-9]{4,6})\) *\{/;
|
||||
const functionBodyMatch: RegExp = /return *(_0x[a-f0-9]{4,6});/;
|
||||
|
||||
const variableDeclarationIdentifierName: string = obfuscatedCode.match(variableDeclarationMatch)![1];
|
||||
const functionParameterIdentifierName: string = obfuscatedCode.match(functionParameterMatch)![1];
|
||||
const functionDefaultParameterIdentifierName: string = obfuscatedCode.match(functionParameterMatch)![2];
|
||||
|
||||
const functionBodyIdentifierName: string = obfuscatedCode.match(functionBodyMatch)![1];
|
||||
|
||||
it('should transform function parameter assignment pattern identifier', () => {
|
||||
assert.match(obfuscatedCode, variableDeclarationMatch);
|
||||
assert.match(obfuscatedCode, functionParameterMatch);
|
||||
assert.match(obfuscatedCode, functionBodyMatch);
|
||||
});
|
||||
|
||||
it('should keep same names for identifier in variable declaration and default value identifier of function parameter', () => {
|
||||
assert.equal(variableDeclarationIdentifierName, functionDefaultParameterIdentifierName);
|
||||
});
|
||||
|
||||
it('should keep same names for identifiers in function params and function body', () => {
|
||||
assert.equal(functionParameterIdentifierName, functionBodyIdentifierName);
|
||||
});
|
||||
});
|
||||
|
||||
describe('identifier as right value', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/assignment-pattern-as-parameter-3.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
const variableDeclarationMatch: RegExp = /var *(_0x[a-f0-9]{4,6}) *= *0x1;/;
|
||||
const functionParameterMatch: RegExp = /function *\((_0x[a-f0-9]{4,6}), *(_0x[a-f0-9]{4,6}) *= *(_0x[a-f0-9]{4,6})\) *\{/;
|
||||
const functionBodyMatch: RegExp = /return *(_0x[a-f0-9]{4,6}) *\+ *(_0x[a-f0-9]{4,6});/;
|
||||
|
||||
const variableDeclarationIdentifierName: string = obfuscatedCode.match(variableDeclarationMatch)![1];
|
||||
const functionParameterIdentifierName: string = obfuscatedCode.match(functionParameterMatch)![1];
|
||||
const functionDefaultParameterIdentifierName1: string = obfuscatedCode.match(functionParameterMatch)![2];
|
||||
const functionDefaultParameterIdentifierName2: string = obfuscatedCode.match(functionParameterMatch)![3];
|
||||
|
||||
const functionBodyIdentifierName1: string = obfuscatedCode.match(functionBodyMatch)![1];
|
||||
const functionBodyIdentifierName2: string = obfuscatedCode.match(functionBodyMatch)![2];
|
||||
|
||||
it('should transform function parameter assignment pattern identifier', () => {
|
||||
assert.match(obfuscatedCode, variableDeclarationMatch);
|
||||
assert.match(obfuscatedCode, functionParameterMatch);
|
||||
assert.match(obfuscatedCode, functionBodyMatch);
|
||||
});
|
||||
|
||||
it('shouldn\'t keep same names variable declaration identifier and function parameters identifiers', () => {
|
||||
assert.notEqual(variableDeclarationIdentifierName, functionParameterIdentifierName);
|
||||
assert.notEqual(variableDeclarationIdentifierName, functionDefaultParameterIdentifierName1);
|
||||
assert.notEqual(variableDeclarationIdentifierName, functionDefaultParameterIdentifierName2);
|
||||
});
|
||||
|
||||
it('should keep same names for identifier in first function parameter and default value identifier of second function parameter', () => {
|
||||
assert.equal(functionParameterIdentifierName, functionDefaultParameterIdentifierName2);
|
||||
});
|
||||
|
||||
it('should keep same names for identifiers in function params and function body', () => {
|
||||
assert.equal(functionParameterIdentifierName, functionBodyIdentifierName1);
|
||||
assert.equal(functionDefaultParameterIdentifierName1, functionBodyIdentifierName2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('array pattern as parameter', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/array-pattern-as-parameter.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
const functionParameterMatch: RegExp = /function *\(\[(_0x[a-f0-9]{4,6}), *(_0x[a-f0-9]{4,6})\]\) *\{/;
|
||||
const functionBodyMatch: RegExp = /return *(_0x[a-f0-9]{4,6}) *\+ *(_0x[a-f0-9]{4,6});/;
|
||||
|
||||
const arrayPatternIdentifierName1: string = obfuscatedCode.match(functionParameterMatch)![1];
|
||||
const arrayPatternIdentifierName2: string = obfuscatedCode.match(functionParameterMatch)![2];
|
||||
const functionBodyIdentifierName1: string = obfuscatedCode.match(functionBodyMatch)![1];
|
||||
const functionBodyIdentifierName2: string = obfuscatedCode.match(functionBodyMatch)![2];
|
||||
|
||||
it('should keep same names for identifiers in function parameter array pattern and function body', () => {
|
||||
assert.equal(arrayPatternIdentifierName1, functionBodyIdentifierName1);
|
||||
assert.equal(arrayPatternIdentifierName2, functionBodyIdentifierName2);
|
||||
});
|
||||
});
|
||||
});
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
(function () {
|
||||
var test = function ([foo, bar]) {
|
||||
return foo + bar;
|
||||
}
|
||||
})();
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
(function () {
|
||||
var test = function (bar = 1) {
|
||||
return bar;
|
||||
}
|
||||
})();
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
(function () {
|
||||
var foo = 1;
|
||||
var test = function (bar = foo) {
|
||||
return bar;
|
||||
}
|
||||
})();
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
(function () {
|
||||
var foo = 1;
|
||||
var test = function (foo, bar = foo) {
|
||||
return foo + bar;
|
||||
}
|
||||
})();
|
||||
+30
-2
@@ -200,11 +200,39 @@ describe('VariableDeclarationTransformer', () => {
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
it('shouldn\'t transform object pattern variable declarator', () => {
|
||||
const objectPatternVariableDeclarator: RegExp = /var *\{ *bar *\} *= *\{ *'\\x62\\x61\\x72' *: *'\\x66\\x6f\\x6f' *\};/;
|
||||
const objectPatternVariableDeclaratorMatch: RegExp = /var *\{ *bar *\} *= *\{ *'\\x62\\x61\\x72' *: *'\\x66\\x6f\\x6f' *\};/;
|
||||
const variableUsageMatch: RegExp = /console\['\\x6c\\x6f\\x67'\]\(bar\);/;
|
||||
|
||||
assert.match(obfuscatedCode, objectPatternVariableDeclarator);
|
||||
assert.match(obfuscatedCode, objectPatternVariableDeclaratorMatch);
|
||||
assert.match(obfuscatedCode, variableUsageMatch);
|
||||
});
|
||||
});
|
||||
|
||||
describe('array pattern as variable declarator', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/array-pattern.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
const objectPatternVariableDeclaratorMatch: RegExp = /var *\[ *(_0x([a-f0-9]){4,6}), *(_0x([a-f0-9]){4,6}) *\] *= *\[0x1, *0x2\];/;
|
||||
const variableUsageMatch: RegExp = /console\['\\x6c\\x6f\\x67'\]\((_0x([a-f0-9]){4,6}), *(_0x([a-f0-9]){4,6})\);/;
|
||||
|
||||
const objectPatternIdentifierName1: string = obfuscatedCode.match(objectPatternVariableDeclaratorMatch)![1];
|
||||
const objectPatternIdentifierName2: string = obfuscatedCode.match(objectPatternVariableDeclaratorMatch)![2];
|
||||
const identifierName1: string = obfuscatedCode.match(variableUsageMatch)![1];
|
||||
const identifierName2: string = obfuscatedCode.match(variableUsageMatch)![2];
|
||||
|
||||
it('should transform array pattern variable declarator', () => {
|
||||
assert.match(obfuscatedCode, objectPatternVariableDeclaratorMatch);
|
||||
assert.match(obfuscatedCode, variableUsageMatch);
|
||||
});
|
||||
|
||||
it('should keep same identifier names same for identifiers in variable declaration and after variable declaration', () => {
|
||||
assert.equal(objectPatternIdentifierName1, identifierName1);
|
||||
assert.equal(objectPatternIdentifierName2, identifierName2);
|
||||
});
|
||||
});
|
||||
});
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
function foo () {
|
||||
var [bar, baz] = [1, 2];
|
||||
|
||||
console.log(bar, baz);
|
||||
}
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
(function () {
|
||||
var { bar } = { bar: 'foo' };
|
||||
|
||||
console.log(bar);
|
||||
})();
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { IObfuscationResult } from '../../../../../src/interfaces/IObfuscationResult';
|
||||
|
||||
import { NO_CUSTOM_NODES_PRESET } from '../../../../../src/options/presets/NoCustomNodes';
|
||||
|
||||
import { readFileAsString } from '../../../../helpers/readFileAsString';
|
||||
|
||||
import { JavaScriptObfuscator } from '../../../../../src/JavaScriptObfuscator';
|
||||
|
||||
describe('FunctionTransformer', () => {
|
||||
describe('identifiers transformation inside `FunctionDeclaration` and `FunctionExpression` node body', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/input.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
it('should correct transform both function parameter identifier and function body identifier with same name', () => {
|
||||
const functionParamIdentifierMatch: RegExpMatchArray|null = obfuscatedCode
|
||||
.match(/var _0x[a-f0-9]{4,6} *= *function *\((_0x[a-f0-9]{4,6})\) *\{/);
|
||||
const functionBodyIdentifierMatch: RegExpMatchArray|null = obfuscatedCode
|
||||
.match(/console\['\\x6c\\x6f\\x67'\]\((_0x[a-f0-9]{4,6})\)/);
|
||||
|
||||
const functionParamIdentifierName: string = (<RegExpMatchArray>functionParamIdentifierMatch)[1];
|
||||
const functionBodyIdentifierName: string = (<RegExpMatchArray>functionBodyIdentifierMatch)[1];
|
||||
|
||||
assert.equal(functionParamIdentifierName, functionBodyIdentifierName);
|
||||
});
|
||||
|
||||
it('shouldn\'t transform other variables in function body', () => {
|
||||
assert.equal(/variable *= *0x6;/.test(obfuscatedCode), true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('object pattern as parameter', () => {
|
||||
const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
|
||||
readFileAsString(__dirname + '/fixtures/object-pattern-as-parameter.js'),
|
||||
{
|
||||
...NO_CUSTOM_NODES_PRESET
|
||||
}
|
||||
);
|
||||
const obfuscatedCode: string = obfuscationResult.getObfuscatedCode();
|
||||
|
||||
it('shouldn\'t transform function parameter object pattern identifier', () => {
|
||||
const functionParameterMatch: RegExp = /function *\(\{ *bar *\}\) *\{/;
|
||||
const functionBodyMatch: RegExp = /return *bar;/;
|
||||
|
||||
assert.match(obfuscatedCode, functionParameterMatch);
|
||||
assert.match(obfuscatedCode, functionBodyMatch);
|
||||
});
|
||||
});
|
||||
});
|
||||
+10
-10
@@ -35,16 +35,16 @@ import './functional-tests/node-transformers/control-flow-transformers/function-
|
||||
import './functional-tests/node-transformers/control-flow-transformers/control-flow-replacers/binary-expression-control-flow-replacer/BinaryExpressionControlFlowReplacer.spec';
|
||||
import './functional-tests/node-transformers/control-flow-transformers/control-flow-replacers/call-expression-control-flow-replacer/CallExpressionControlFlowReplacer.spec';
|
||||
import './functional-tests/node-transformers/control-flow-transformers/control-flow-replacers/logical-expression-control-flow-replacer/LogicalExpressionControlFlowReplacer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/catch-clause-transformer/CatchClauseTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/function-declaration-transformer/FunctionDeclarationTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/function-transformer/FunctionTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/labeled-statement-transformer/LabeledStatementTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/literal-transformer/LiteralTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/member-expression-transformer/MemberExpressionTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/method-definition-transformer/MethodDefinitionTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/object-expression-transformer/ObjectExpressionTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/template-literal-transformer/TemplateLiteralTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscation-transformers/variable-declaration-transformer/VariableDeclarationTransformer.spec';
|
||||
import './functional-tests/node-transformers/converting-transformers/member-expression-transformer/MemberExpressionTransformer.spec';
|
||||
import './functional-tests/node-transformers/converting-transformers/method-definition-transformer/MethodDefinitionTransformer.spec';
|
||||
import './functional-tests/node-transformers/converting-transformers/template-literal-transformer/TemplateLiteralTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/catch-clause-transformer/CatchClauseTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/function-declaration-transformer/FunctionDeclarationTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/function-transformer/FunctionTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/labeled-statement-transformer/LabeledStatementTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/literal-transformer/LiteralTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/object-expression-transformer/ObjectExpressionTransformer.spec';
|
||||
import './functional-tests/node-transformers/obfuscating-transformers/variable-declaration-transformer/VariableDeclarationTransformer.spec';
|
||||
import './functional-tests/stack-trace-analyzer/stack-trace-analyzer/StackTraceAnalyzer.spec';
|
||||
import './functional-tests/templates/custom-nodes/domain-lock-nodes/DomainLockNodeTemplate.spec';
|
||||
import './functional-tests/templates/custom-nodes/string-array-nodes/StringArrayCallsWrapperNodeTemplate.spec';
|
||||
|
||||
Reference in New Issue
Block a user