javascript-obfuscator 3.2.0 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +63 -4
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.LICENSE.txt +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cli.js +1 -1
- package/dist/index.cli.js.LICENSE.txt +1 -1
- package/dist/index.cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
- package/typings/src/constants/ReservedIdentifierNames.d.ts +1 -0
- package/typings/src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.d.ts +1 -1
- package/typings/src/interfaces/node-transformers/simplifying-transformers/IIteratedStatementsSimplifyData.d.ts +1 -0
- package/typings/src/node/NodeGuards.d.ts +1 -1
- package/typings/src/node-transformers/control-flow-transformers/StringArrayControlFlowTransformer.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
|
|
3
|
+
v3.2.4
|
|
4
|
+
---
|
|
5
|
+
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1052
|
|
6
|
+
|
|
7
|
+
v3.2.3
|
|
8
|
+
---
|
|
9
|
+
* Fixed missing transformation of string array calls in some cases
|
|
10
|
+
* Fixed generation of reserved identifier names like `Map` or `Set` for `mangled` and `mangled-shuffled` identifier names generators
|
|
11
|
+
|
|
12
|
+
v3.2.2
|
|
13
|
+
---
|
|
14
|
+
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1039
|
|
15
|
+
|
|
16
|
+
v3.2.1
|
|
17
|
+
---
|
|
18
|
+
* Updated copyright
|
|
19
|
+
|
|
3
20
|
v3.2.0
|
|
4
21
|
---
|
|
5
22
|
* **New options**: `stringArrayCallsTransform` and `stringArrayCallsTransformThreshold`
|
package/README.md
CHANGED
|
@@ -1102,11 +1102,71 @@ Type: `boolean` Default: `true`
|
|
|
1102
1102
|
Removes string literals and place them in a special array. For instance, the string `"Hello World"` in `var m = "Hello World";` will be replaced with something like `var m = _0x12c456[0x1];`
|
|
1103
1103
|
|
|
1104
1104
|
### `stringArrayCallsTransform`
|
|
1105
|
-
Type: `boolean` Default: `
|
|
1105
|
+
Type: `boolean` Default: `false`
|
|
1106
1106
|
|
|
1107
1107
|
##### :warning: [`stringArray`](#stringarray) option must be enabled
|
|
1108
1108
|
|
|
1109
|
-
Enables the transformation of calls to the [`stringArray`](#stringarray). All arguments of these calls may be extracted to different object depending on [`stringArrayCallsTransformThreshold`](#stringarraycallstransformthreshold) value.
|
|
1109
|
+
Enables the transformation of calls to the [`stringArray`](#stringarray). All arguments of these calls may be extracted to a different object depending on [`stringArrayCallsTransformThreshold`](#stringarraycallstransformthreshold) value.
|
|
1110
|
+
So it makes it even harder to automatically find calls to the string array.
|
|
1111
|
+
|
|
1112
|
+
Example:
|
|
1113
|
+
```
|
|
1114
|
+
function foo() {
|
|
1115
|
+
var k = {
|
|
1116
|
+
c: 0x2f2,
|
|
1117
|
+
d: '0x396',
|
|
1118
|
+
e: '0x397',
|
|
1119
|
+
f: '0x39a',
|
|
1120
|
+
g: '0x39d',
|
|
1121
|
+
h: 0x398,
|
|
1122
|
+
l: 0x394,
|
|
1123
|
+
m: '0x39b',
|
|
1124
|
+
n: '0x39f',
|
|
1125
|
+
o: 0x395,
|
|
1126
|
+
p: 0x395,
|
|
1127
|
+
q: 0x399,
|
|
1128
|
+
r: '0x399'
|
|
1129
|
+
};
|
|
1130
|
+
var c = i(k.d, k.e);
|
|
1131
|
+
var d = i(k.f, k.g);
|
|
1132
|
+
var e = i(k.h, k.l);
|
|
1133
|
+
var f = i(k.m, k.n);
|
|
1134
|
+
function i(c, d) {
|
|
1135
|
+
return b(c - k.c, d);
|
|
1136
|
+
}
|
|
1137
|
+
var g = i(k.o, k.p);
|
|
1138
|
+
var h = i(k.q, k.r);
|
|
1139
|
+
}
|
|
1140
|
+
function j(c, d) {
|
|
1141
|
+
var l = { c: 0x14b };
|
|
1142
|
+
return b(c - -l.c, d);
|
|
1143
|
+
}
|
|
1144
|
+
console[j(-'0xa6', -'0xa6')](foo());
|
|
1145
|
+
function b(c, d) {
|
|
1146
|
+
var e = a();
|
|
1147
|
+
b = function (f, g) {
|
|
1148
|
+
f = f - 0xa3;
|
|
1149
|
+
var h = e[f];
|
|
1150
|
+
return h;
|
|
1151
|
+
};
|
|
1152
|
+
return b(c, d);
|
|
1153
|
+
}
|
|
1154
|
+
function a() {
|
|
1155
|
+
var m = [
|
|
1156
|
+
'string5',
|
|
1157
|
+
'string1',
|
|
1158
|
+
'log',
|
|
1159
|
+
'string3',
|
|
1160
|
+
'string6',
|
|
1161
|
+
'string2',
|
|
1162
|
+
'string4'
|
|
1163
|
+
];
|
|
1164
|
+
a = function () {
|
|
1165
|
+
return m;
|
|
1166
|
+
};
|
|
1167
|
+
return a();
|
|
1168
|
+
}
|
|
1169
|
+
```
|
|
1110
1170
|
|
|
1111
1171
|
### `stringArrayCallsTransformThreshold`
|
|
1112
1172
|
Type: `number` Default: `0.5`
|
|
@@ -1458,7 +1518,6 @@ The performance will be much slower than without obfuscation
|
|
|
1458
1518
|
splitStrings: true,
|
|
1459
1519
|
splitStringsChunkLength: 5,
|
|
1460
1520
|
stringArray: true,
|
|
1461
|
-
stringArray: true,
|
|
1462
1521
|
stringArrayCallsTransform: true,
|
|
1463
1522
|
stringArrayEncoding: ['rc4'],
|
|
1464
1523
|
stringArrayIndexShift: true,
|
|
@@ -1671,7 +1730,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
|
|
|
1671
1730
|
## License
|
|
1672
1731
|
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator?ref=badge_large)
|
|
1673
1732
|
|
|
1674
|
-
Copyright (C) 2016-
|
|
1733
|
+
Copyright (C) 2016-2022 [Timofey Kachalov](http://github.com/sanex3339).
|
|
1675
1734
|
|
|
1676
1735
|
Redistribution and use in source and binary forms, with or without
|
|
1677
1736
|
modification, are permitted provided that the following conditions are met:
|