|
| 1 | +# `2.0.0` |
| 2 | +2.0 Rewrite 🎉 |
| 3 | + |
| 4 | +### Complete rewrite of JS-Confuser using Babel! 🎉 |
| 5 | + |
| 6 | +**⚠️ Breaking changes** |
| 7 | + |
| 8 | +> Check out the [Migration guide](./Migration.md) on how to properly update from 1.X to 2.0. The obfuscation upgrades in 2.0 are worth the small refactoring. |
| 9 | +
|
| 10 | +- Revamped API Interface |
| 11 | + |
| 12 | +- - JSConfuser.obfuscate() resolves to an object |
| 13 | + |
| 14 | +| Property | Type | Description | |
| 15 | +| --- | --- | --- | |
| 16 | +| `code` | `string` | The obfuscated code. | |
| 17 | + |
| 18 | +- Renamed `Stack` to `Variable Masking` |
| 19 | + |
| 20 | +- Added configurable limits to options: |
| 21 | + |
| 22 | +```js |
| 23 | +const options = { |
| 24 | + target: "node", |
| 25 | + |
| 26 | + rgf: { |
| 27 | + value: 0.5, // = 50% of eligible functions |
| 28 | + limit: 10 // Maximum of 10 changes for performance reasons |
| 29 | + }, |
| 30 | + |
| 31 | + // Original format is still valid (No limit applied) |
| 32 | + rgf: 0.5 |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +### 2.0 Changes |
| 37 | + |
| 38 | +- Added [Custom String Encoding](https://js-confuser.com/docs/options/customStringEncodings) and [Custom Lock Code](https://js-confuser.com/docs/options/customLocks) options |
| 39 | + |
| 40 | +- Added `Rename Labels` [Learn more here](https://js-confuser.com/docs/options/renamelabels#rename-labels) |
| 41 | + |
| 42 | +- Added `Pack` [Learn more here](https://js-confuser.com/docs/options/pack#pack) |
| 43 | + |
| 44 | +- RGF no longers uses `new Function` instead uses `eval` |
| 45 | + |
| 46 | +- Improved code transforms! |
| 47 | + |
| 48 | +- Improved `Control Flow Flattening` |
| 49 | + |
| 50 | +- - Obfuscates the [Call Graph](https://en.wikipedia.org/wiki/Call_graph) |
| 51 | + |
| 52 | +- - Now supports lexical bindings (`let`, `const`, `class`) |
| 53 | + |
| 54 | +- - `with () { }` statement obfuscation |
| 55 | + |
| 56 | +- Improved `Minify` |
| 57 | + |
| 58 | +- - Removes unused variables and functions |
| 59 | + |
| 60 | +- Improved `Moved Declaration` ability to move variables as unused function parameters |
| 61 | + |
| 62 | +- Improved `String` transforms |
| 63 | + |
| 64 | +- - [Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) are now obfuscated (First converted into equivalent String Literal) |
| 65 | + |
| 66 | +- - [Regular expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) are now obfuscated (First converted into equivalent RegExp() constructor calls) |
| 67 | + |
| 68 | +- - `String Compression` now uses LZ-string compression ([lz-string](https://www.npmjs.com/package/lz-string)) |
| 69 | + |
| 70 | +- New Comment Syntax |
| 71 | + |
| 72 | +- - `/* @js-confuser-var */ "name"` for improved variable mappings, such as eval() calls |
| 73 | + |
| 74 | +```js |
| 75 | +// Input |
| 76 | +var name = "Internet User"; |
| 77 | +eval( "console.log(" + /* @js-confuser-var */ "name" + ")" ); |
| 78 | + |
| 79 | +// Output |
| 80 | +var zC3PLKu = "Internet User"; |
| 81 | +eval("console.log(" + "zC3PLKu" + ")"); |
| 82 | +``` |
| 83 | + |
| 84 | +Note: The function `__JS_CONFUSER_VAR__` is still supported. |
| 85 | + |
| 86 | +### JS-Confuser.com Revamp |
| 87 | + |
| 88 | +A new UI for [JS-Confuser.com](https://js-confuser.com), featuring an advanced playground and documentation pages. |
| 89 | + |
| 90 | +The previous version will remain available at [old--confuser.netlify.com](https://old--confuser.netlify.app/). |
| 91 | + |
| 92 | +**Removed features** |
| 93 | + |
| 94 | +- Removed `ES5` option - Use Babel Instead |
| 95 | + |
| 96 | +- Removed `Browser Lock` and `OS Lock` - Use [Custom Locks](https://js-confuser.com/docs/options/customlocks#custom-locks) instead |
| 97 | + |
| 98 | +- Removed `Shuffle`'s Hash option |
| 99 | + |
| 100 | +- Removed `Indent` option |
| 101 | + |
| 102 | + |
1 | 103 | # `1.7.3` |
2 | 104 | Tamper Protection |
3 | 105 |
|
@@ -30,7 +132,7 @@ eval('console.log(' + 'CA1HU0' + ')'); |
30 | 132 |
|
31 | 133 | - Improve `String Compression` |
32 | 134 |
|
33 | | -- New Web UI sneak peak: https://new--confuser.netlify.app/ |
| 135 | +- New Web UI sneak peak: https://js-confuser.com/ |
34 | 136 |
|
35 | 137 |
|
36 | 138 | # `1.7.2` |
|
0 commit comments