javascript-obfuscator 2.19.1 → 3.0.0
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 +7 -0
- package/README.md +28 -28
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cli.js +1 -1
- package/dist/index.cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/typings/src/enums/node/NodeType.d.ts +1 -0
- package/typings/src/enums/node-transformers/preparing-transformers/obfuscating-guards/ObfuscatingGuard.d.ts +1 -1
- package/typings/src/interfaces/options/IOptions.d.ts +3 -3
- package/typings/src/node/NodeGuards.d.ts +1 -0
- package/typings/src/node-transformers/preparing-transformers/obfuscating-guards/{IgnoredRequireImportObfuscatingGuard.d.ts → IgnoredImportObfuscatingGuard.d.ts} +3 -1
- package/typings/src/options/Options.d.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
|
|
3
|
+
v3.0.0
|
|
4
|
+
---
|
|
5
|
+
* **Breaking change:** `ignoreRequireImports` option renamed to `ignoreImports`
|
|
6
|
+
* **Breaking change:** `rotateStringArray` option renamed to `stringArrayRotate`
|
|
7
|
+
* **Breaking change:** `shuffleStringArray` option renamed to `stringArrayShuffle`
|
|
8
|
+
* `ignoreImports` now ignores `dynamic` imports in addition to `require` imports
|
|
9
|
+
|
|
3
10
|
v2.19.1
|
|
4
11
|
---
|
|
5
12
|
* Updated `@javascript-obfuscator/escodegen` with fixed parenthesis of `default export` IIFE
|
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ var obfuscationResult = JavaScriptObfuscator.obfuscate(
|
|
|
112
112
|
controlFlowFlatteningThreshold: 1,
|
|
113
113
|
numbersToExpressions: true,
|
|
114
114
|
simplify: true,
|
|
115
|
-
|
|
115
|
+
stringArrayShuffle: true,
|
|
116
116
|
splitStrings: true,
|
|
117
117
|
stringArrayThreshold: 1
|
|
118
118
|
}
|
|
@@ -368,10 +368,8 @@ Following options are available for the JS Obfuscator:
|
|
|
368
368
|
renamePropertiesMode: 'safe',
|
|
369
369
|
reservedNames: [],
|
|
370
370
|
reservedStrings: [],
|
|
371
|
-
rotateStringArray: true,
|
|
372
371
|
seed: 0,
|
|
373
372
|
selfDefending: false,
|
|
374
|
-
shuffleStringArray: true,
|
|
375
373
|
simplify: true,
|
|
376
374
|
sourceMap: false,
|
|
377
375
|
sourceMapBaseUrl: '',
|
|
@@ -386,6 +384,8 @@ Following options are available for the JS Obfuscator:
|
|
|
386
384
|
],
|
|
387
385
|
stringArrayEncoding: [],
|
|
388
386
|
stringArrayIndexShift: true,
|
|
387
|
+
stringArrayRotate: true,
|
|
388
|
+
stringArrayShuffle: true,
|
|
389
389
|
stringArrayWrappersCount: 1,
|
|
390
390
|
stringArrayWrappersChainedCalls: true,
|
|
391
391
|
stringArrayWrappersParametersMaxCount: 2,
|
|
@@ -421,7 +421,7 @@ Following options are available for the JS Obfuscator:
|
|
|
421
421
|
--identifier-names-generator <string> [dictionary, hexadecimal, mangled, mangled-shuffled]
|
|
422
422
|
--identifiers-dictionary '<list>' (comma separated)
|
|
423
423
|
--identifiers-prefix <string>
|
|
424
|
-
--ignore-
|
|
424
|
+
--ignore-imports <boolean>
|
|
425
425
|
--log <boolean>
|
|
426
426
|
--numbers-to-expressions <boolean>
|
|
427
427
|
--options-preset <string> [default, low-obfuscation, medium-obfuscation, high-obfuscation]
|
|
@@ -430,10 +430,8 @@ Following options are available for the JS Obfuscator:
|
|
|
430
430
|
--rename-properties-mode <string> [safe, unsafe]
|
|
431
431
|
--reserved-names '<list>' (comma separated)
|
|
432
432
|
--reserved-strings '<list>' (comma separated)
|
|
433
|
-
--rotate-string-array <boolean>
|
|
434
433
|
--seed <string|number>
|
|
435
434
|
--self-defending <boolean>
|
|
436
|
-
--shuffle-string-array <boolean>
|
|
437
435
|
--simplify <boolean>
|
|
438
436
|
--source-map <boolean>
|
|
439
437
|
--source-map-base-url <string>
|
|
@@ -446,6 +444,8 @@ Following options are available for the JS Obfuscator:
|
|
|
446
444
|
--string-array-indexes-type '<list>' (comma separated) [hexadecimal-number, hexadecimal-numeric-string]
|
|
447
445
|
--string-array-encoding '<list>' (comma separated) [none, base64, rc4]
|
|
448
446
|
--string-array-index-shift <boolean>
|
|
447
|
+
--string-array-rotate <boolean>
|
|
448
|
+
--string-array-shuffle <boolean>
|
|
449
449
|
--string-array-wrappers-count <number>
|
|
450
450
|
--string-array-wrappers-chained-calls <boolean>
|
|
451
451
|
--string-array-wrappers-parameters-max-count <number>
|
|
@@ -968,13 +968,6 @@ Example:
|
|
|
968
968
|
}
|
|
969
969
|
```
|
|
970
970
|
|
|
971
|
-
### `rotateStringArray`
|
|
972
|
-
Type: `boolean` Default: `true`
|
|
973
|
-
|
|
974
|
-
##### :warning: [`stringArray`](#stringarray) must be enabled
|
|
975
|
-
|
|
976
|
-
Shift the `stringArray` array by a fixed and random (generated at the code obfuscation) places. This makes it harder to match the order of the removed strings to their original place.
|
|
977
|
-
|
|
978
971
|
### `seed`
|
|
979
972
|
Type: `string|number` Default: `0`
|
|
980
973
|
|
|
@@ -990,13 +983,6 @@ Type: `boolean` Default: `false`
|
|
|
990
983
|
|
|
991
984
|
This option makes the output code resilient against formatting and variable renaming. If one tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore, making it harder to understand and modify it.
|
|
992
985
|
|
|
993
|
-
### `shuffleStringArray`
|
|
994
|
-
Type: `boolean` Default: `true`
|
|
995
|
-
|
|
996
|
-
##### :warning: [`stringArray`](#stringarray) must be enabled
|
|
997
|
-
|
|
998
|
-
Randomly shuffles the `stringArray` array items.
|
|
999
|
-
|
|
1000
986
|
### `simplify`
|
|
1001
987
|
Type: `boolean` Default: `true`
|
|
1002
988
|
|
|
@@ -1163,6 +1149,20 @@ Type: `boolean` Default: `true`
|
|
|
1163
1149
|
|
|
1164
1150
|
Enables additional index shift for all string array calls
|
|
1165
1151
|
|
|
1152
|
+
### `stringArrayRotate`
|
|
1153
|
+
Type: `boolean` Default: `true`
|
|
1154
|
+
|
|
1155
|
+
##### :warning: [`stringArray`](#stringarray) must be enabled
|
|
1156
|
+
|
|
1157
|
+
Shift the `stringArray` array by a fixed and random (generated at the code obfuscation) places. This makes it harder to match the order of the removed strings to their original place.
|
|
1158
|
+
|
|
1159
|
+
### `stringArrayShuffle`
|
|
1160
|
+
Type: `boolean` Default: `true`
|
|
1161
|
+
|
|
1162
|
+
##### :warning: [`stringArray`](#stringarray) must be enabled
|
|
1163
|
+
|
|
1164
|
+
Randomly shuffles the `stringArray` array items.
|
|
1165
|
+
|
|
1166
1166
|
### `stringArrayWrappersCount`
|
|
1167
1167
|
Type: `number` Default: `1`
|
|
1168
1168
|
|
|
@@ -1435,15 +1435,15 @@ Performance will 50-100% slower than without obfuscation
|
|
|
1435
1435
|
log: false,
|
|
1436
1436
|
numbersToExpressions: true,
|
|
1437
1437
|
renameGlobals: false,
|
|
1438
|
-
rotateStringArray: true,
|
|
1439
1438
|
selfDefending: true,
|
|
1440
|
-
shuffleStringArray: true,
|
|
1441
1439
|
simplify: true,
|
|
1442
1440
|
splitStrings: true,
|
|
1443
1441
|
splitStringsChunkLength: 5,
|
|
1444
1442
|
stringArray: true,
|
|
1445
1443
|
stringArrayEncoding: ['rc4'],
|
|
1446
1444
|
stringArrayIndexShift: true,
|
|
1445
|
+
stringArrayRotate: true,
|
|
1446
|
+
stringArrayShuffle: true,
|
|
1447
1447
|
stringArrayWrappersCount: 5,
|
|
1448
1448
|
stringArrayWrappersChainedCalls: true,
|
|
1449
1449
|
stringArrayWrappersParametersMaxCount: 5,
|
|
@@ -1472,15 +1472,15 @@ Performance will 30-35% slower than without obfuscation
|
|
|
1472
1472
|
log: false,
|
|
1473
1473
|
numbersToExpressions: true,
|
|
1474
1474
|
renameGlobals: false,
|
|
1475
|
-
rotateStringArray: true,
|
|
1476
1475
|
selfDefending: true,
|
|
1477
|
-
shuffleStringArray: true,
|
|
1478
1476
|
simplify: true,
|
|
1479
1477
|
splitStrings: true,
|
|
1480
1478
|
splitStringsChunkLength: 10,
|
|
1481
1479
|
stringArray: true,
|
|
1482
1480
|
stringArrayEncoding: ['base64'],
|
|
1483
1481
|
stringArrayIndexShift: true,
|
|
1482
|
+
stringArrayRotate: true,
|
|
1483
|
+
stringArrayShuffle: true,
|
|
1484
1484
|
stringArrayWrappersCount: 2,
|
|
1485
1485
|
stringArrayWrappersChainedCalls: true,
|
|
1486
1486
|
stringArrayWrappersParametersMaxCount: 4,
|
|
@@ -1507,14 +1507,14 @@ Performance will slightly slower than without obfuscation
|
|
|
1507
1507
|
log: false,
|
|
1508
1508
|
numbersToExpressions: false,
|
|
1509
1509
|
renameGlobals: false,
|
|
1510
|
-
rotateStringArray: true,
|
|
1511
1510
|
selfDefending: true,
|
|
1512
|
-
shuffleStringArray: true,
|
|
1513
1511
|
simplify: true,
|
|
1514
1512
|
splitStrings: false,
|
|
1515
1513
|
stringArray: true,
|
|
1516
1514
|
stringArrayEncoding: [],
|
|
1517
1515
|
stringArrayIndexShift: true,
|
|
1516
|
+
stringArrayRotate: true,
|
|
1517
|
+
stringArrayShuffle: true,
|
|
1518
1518
|
stringArrayWrappersCount: 1,
|
|
1519
1519
|
stringArrayWrappersChainedCalls: true,
|
|
1520
1520
|
stringArrayWrappersParametersMaxCount: 2,
|
|
@@ -1538,14 +1538,14 @@ Performance will slightly slower than without obfuscation
|
|
|
1538
1538
|
log: false,
|
|
1539
1539
|
numbersToExpressions: false,
|
|
1540
1540
|
renameGlobals: false,
|
|
1541
|
-
rotateStringArray: true,
|
|
1542
1541
|
selfDefending: false,
|
|
1543
|
-
shuffleStringArray: true,
|
|
1544
1542
|
simplify: true,
|
|
1545
1543
|
splitStrings: false,
|
|
1546
1544
|
stringArray: true,
|
|
1547
1545
|
stringArrayEncoding: [],
|
|
1548
1546
|
stringArrayIndexShift: true,
|
|
1547
|
+
stringArrayRotate: true,
|
|
1548
|
+
stringArrayShuffle: true,
|
|
1549
1549
|
stringArrayWrappersCount: 1,
|
|
1550
1550
|
stringArrayWrappersChainedCalls: true,
|
|
1551
1551
|
stringArrayWrappersParametersMaxCount: 2,
|