forked from javascript-obfuscator/javascript-obfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomCodeHelpersModule.ts
More file actions
124 lines (99 loc) · 7.26 KB
/
Copy pathCustomCodeHelpersModule.ts
File metadata and controls
124 lines (99 loc) · 7.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import { InversifyContainerFacade } from '../../InversifyContainerFacade';
import { ContainerModule, interfaces } from 'inversify';
import { ServiceIdentifiers } from '../../ServiceIdentifiers';
import { ICustomCodeHelper } from '../../../interfaces/custom-code-helpers/ICustomCodeHelper';
import { ICustomCodeHelperFormatter } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperFormatter';
import { ICustomCodeHelperGroup } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperGroup';
import { ICustomCodeHelperObfuscator } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperObfuscator';
import { CustomCodeHelper } from '../../../enums/custom-code-helpers/CustomCodeHelper';
import { CustomCodeHelperGroup } from '../../../enums/custom-code-helpers/CustomCodeHelperGroup';
import { ConsoleOutputCodeHelperGroup } from '../../../custom-code-helpers/console-output/group/ConsoleOutputCodeHelperGroup';
import { DebugProtectionCodeHelperGroup } from '../../../custom-code-helpers/debug-protection/group/DebugProtectionCodeHelperGroup';
import { DomainLockCustomCodeHelperGroup } from '../../../custom-code-helpers/domain-lock/group/DomainLockCustomCodeHelperGroup';
import { SelfDefendingCodeHelperGroup } from '../../../custom-code-helpers/self-defending/group/SelfDefendingCodeHelperGroup';
import { StringArrayCodeHelperGroup } from '../../../custom-code-helpers/string-array/group/StringArrayCodeHelperGroup';
import { ConsoleOutputDisableCodeHelper } from '../../../custom-code-helpers/console-output/ConsoleOutputDisableCodeHelper';
import { CustomCodeHelperFormatter } from '../../../custom-code-helpers/CustomCodeHelperFormatter';
import { CustomCodeHelperObfuscator } from '../../../custom-code-helpers/CustomCodeHelperObfuscator';
import { DebugProtectionFunctionCallCodeHelper } from '../../../custom-code-helpers/debug-protection/DebugProtectionFunctionCallCodeHelper';
import { DebugProtectionFunctionIntervalCodeHelper } from '../../../custom-code-helpers/debug-protection/DebugProtectionFunctionIntervalCodeHelper';
import { DebugProtectionFunctionCodeHelper } from '../../../custom-code-helpers/debug-protection/DebugProtectionFunctionCodeHelper';
import { DomainLockCodeHelper } from '../../../custom-code-helpers/domain-lock/DomainLockCodeHelper';
import { CallsControllerFunctionCodeHelper } from '../../../custom-code-helpers/calls-controller/CallsControllerFunctionCodeHelper';
import { SelfDefendingCodeHelper } from '../../../custom-code-helpers/self-defending/SelfDefendingCodeHelper';
import { StringArrayCallsWrapperCodeHelper } from '../../../custom-code-helpers/string-array/StringArrayCallsWrapperCodeHelper';
import { StringArrayCallsWrapperBase64CodeHelper } from '../../../custom-code-helpers/string-array/StringArrayCallsWrapperBase64CodeHelper';
import { StringArrayCallsWrapperRc4CodeHelper } from '../../../custom-code-helpers/string-array/StringArrayCallsWrapperRc4CodeHelper';
import { StringArrayCodeHelper } from '../../../custom-code-helpers/string-array/StringArrayCodeHelper';
import { StringArrayRotateFunctionCodeHelper } from '../../../custom-code-helpers/string-array/StringArrayRotateFunctionCodeHelper';
export const customCodeHelpersModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
// custom code helpers
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(ConsoleOutputDisableCodeHelper)
.whenTargetNamed(CustomCodeHelper.ConsoleOutputDisable);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(DebugProtectionFunctionCallCodeHelper)
.whenTargetNamed(CustomCodeHelper.DebugProtectionFunctionCall);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(DebugProtectionFunctionIntervalCodeHelper)
.whenTargetNamed(CustomCodeHelper.DebugProtectionFunctionInterval);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(DebugProtectionFunctionCodeHelper)
.whenTargetNamed(CustomCodeHelper.DebugProtectionFunction);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(DomainLockCodeHelper)
.whenTargetNamed(CustomCodeHelper.DomainLock);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(CallsControllerFunctionCodeHelper)
.whenTargetNamed(CustomCodeHelper.CallsControllerFunction);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(SelfDefendingCodeHelper)
.whenTargetNamed(CustomCodeHelper.SelfDefending);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(StringArrayCallsWrapperCodeHelper)
.whenTargetNamed(CustomCodeHelper.StringArrayCallsWrapper);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(StringArrayCallsWrapperBase64CodeHelper)
.whenTargetNamed(CustomCodeHelper.StringArrayCallsWrapperBase64);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(StringArrayCallsWrapperRc4CodeHelper)
.whenTargetNamed(CustomCodeHelper.StringArrayCallsWrapperRc4);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(StringArrayCodeHelper)
.whenTargetNamed(CustomCodeHelper.StringArray);
bind<ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper)
.to(StringArrayRotateFunctionCodeHelper)
.whenTargetNamed(CustomCodeHelper.StringArrayRotateFunction);
// code helper groups
bind<ICustomCodeHelperGroup>(ServiceIdentifiers.ICustomCodeHelperGroup)
.to(ConsoleOutputCodeHelperGroup)
.whenTargetNamed(CustomCodeHelperGroup.ConsoleOutput);
bind<ICustomCodeHelperGroup>(ServiceIdentifiers.ICustomCodeHelperGroup)
.to(DebugProtectionCodeHelperGroup)
.whenTargetNamed(CustomCodeHelperGroup.DebugProtection);
bind<ICustomCodeHelperGroup>(ServiceIdentifiers.ICustomCodeHelperGroup)
.to(DomainLockCustomCodeHelperGroup)
.whenTargetNamed(CustomCodeHelperGroup.DomainLock);
bind<ICustomCodeHelperGroup>(ServiceIdentifiers.ICustomCodeHelperGroup)
.to(SelfDefendingCodeHelperGroup)
.whenTargetNamed(CustomCodeHelperGroup.SelfDefending);
bind<ICustomCodeHelperGroup>(ServiceIdentifiers.ICustomCodeHelperGroup)
.to(StringArrayCodeHelperGroup)
.whenTargetNamed(CustomCodeHelperGroup.StringArray);
// customCodeHelper factory
bind<ICustomCodeHelper>(ServiceIdentifiers.Factory__ICustomCodeHelper)
.toFactory<ICustomCodeHelper, [CustomCodeHelper]>(InversifyContainerFacade
.getFactory<CustomCodeHelper, ICustomCodeHelper>(ServiceIdentifiers.ICustomCodeHelper));
// customCodeHelperGroup factory
bind<ICustomCodeHelperGroup>(ServiceIdentifiers.Factory__ICustomCodeHelperGroup)
.toFactory<ICustomCodeHelperGroup, [CustomCodeHelperGroup]>(InversifyContainerFacade
.getFactory<CustomCodeHelperGroup, ICustomCodeHelperGroup>(ServiceIdentifiers.ICustomCodeHelperGroup));
// custom code helper formatter
bind<ICustomCodeHelperFormatter>(ServiceIdentifiers.ICustomCodeHelperFormatter)
.to(CustomCodeHelperFormatter)
.inSingletonScope();
// custom code helper obfuscator
bind<ICustomCodeHelperObfuscator>(ServiceIdentifiers.ICustomCodeHelperObfuscator)
.to(CustomCodeHelperObfuscator)
.inSingletonScope();
});