-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathobfuscator.js
59 lines (59 loc) · 1.83 KB
/
obfuscator.js
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
// Obfuscator doc:
// https://github.com/javascript-obfuscator/javascript-obfuscator#javascript-obfuscator-options
module.exports = {
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
// NOTE: disable debugProtection for testing in console
debugProtection: true,
debugProtectionInterval: 4000,
disableConsoleOutput: true,
// NOTE: add domains to work only specified domains
// e.g. example.com, sub.example.com
domainLock: [],
domainLockRedirectUrl: "about:blank",
forceTransformStrings: [],
identifierNamesCache: null,
identifierNamesGenerator: "mangled-shuffled",
identifiersDictionary: [],
identifiersPrefix: "",
ignoreImports: false,
inputFileName: "",
log: true,
numbersToExpressions: true,
renameGlobals: false,
renameProperties: true,
renamePropertiesMode: "safe",
// NOTE: dirty fix to make BotD work with obfuscator
reservedNames: ["sent", "trys"],
reservedStrings: [],
seed: 0,
selfDefending: true,
simplify: true,
sourceMap: false,
sourceMapBaseUrl: "",
sourceMapFileName: "",
sourceMapMode: "separate",
sourceMapSourcesMode: "sources-content",
// NOTE: disable splitStrings if "Maximum call stack size exceeded"
splitStrings: true,
splitStringsChunkLength: 35,
stringArray: true,
stringArrayCallsTransform: true,
stringArrayCallsTransformThreshold: 1,
stringArrayEncoding: ["base64", "rc4"],
stringArrayIndexesType: ["hexadecimal-number"],
stringArrayIndexShift: true,
stringArrayRotate: true,
stringArrayShuffle: true,
stringArrayWrappersCount: 6,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersParametersMaxCount: 6,
stringArrayWrappersType: "function",
stringArrayThreshold: 1,
target: "browser",
transformObjectKeys: true,
unicodeEscapeSequence: false,
};