Skip to content

Commit 30e4043

Browse files
authored
Merge pull request #84 from MichaelXF/dev
1.6.0
2 parents df987d8 + 5013a4f commit 30e4043

File tree

84 files changed

+5638
-12554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5638
-12554
lines changed

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [10.x, 12.x, 14.x, 15.x]
18+
node-version: [14.15, 16.10, 18.0]
1919
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2020

2121
steps:
@@ -24,5 +24,5 @@ jobs:
2424
uses: actions/setup-node@v2
2525
with:
2626
node-version: ${{ matrix.node-version }}
27-
- run: npm ci
27+
- run: npm install
2828
- run: npm test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ dist
110110

111111
dev.error.js
112112
dev.input.js
113+
dev.output.js
113114
dev.ts
114115

116+
package-lock.json
117+
115118
Cash.output.js
116119

117120
ES6.output.js

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
# `1.6.0`
2+
Website Redesign + Updates
3+
4+
The website is now redesigned and live at [js-confuser.com](https://wwww.js-confuser.com)!
5+
6+
- Check out the source code for the website here: https://github.com/MichaelXF/js-confuser-website
7+
8+
#### New feature
9+
10+
### `selfDefending`
11+
12+
Prevents the use of code beautifiers or formatters against your code.
13+
14+
[Identical to Obfuscator.io's Self Defending](https://github.com/javascript-obfuscator/javascript-obfuscator#selfdefending)
15+
16+
#### Improvements
17+
18+
- Fixed [#56](https://github.com/MichaelXF/js-confuser/issues/56)
19+
- - Calculator improved to apply to more operators
20+
21+
- ES5 to handle destructuring member expressions
22+
23+
- Improved Control Flow Flattening techniques
24+
25+
- - Outlining expressions
26+
27+
- - Control object to store numbers and strings
28+
29+
- Updated the String concealing encoding algorithm
30+
31+
- Optimizations / Small fixes
32+
133
# `1.5.9`
234
Big update
335

README.md

Lines changed: 143 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# JS Confuser
22

3-
JS-Confuser is a JavaScript obfuscation tool to make your programs _impossible_ to read. [Try the web version](https://master--hungry-shannon-c1ce6b.netlify.app/).
3+
JS-Confuser is a JavaScript obfuscation tool to make your programs _impossible_ to read. [Try the web version](https://js-confuser.com).
44

5-
[![NPM](https://img.shields.io/badge/NPM-%23000000.svg?style=for-the-badge&logo=npm&logoColor=white)](https://npmjs.com/package/js-confuser) [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/MichaelXF/js-confuser) [![Netlify](https://img.shields.io/badge/netlify-%23000000.svg?style=for-the-badge&logo=netlify&logoColor=#00C7B7)](https://master--hungry-shannon-c1ce6b.netlify.app/)
5+
[![NPM](https://img.shields.io/badge/NPM-%23000000.svg?style=for-the-badge&logo=npm&logoColor=white)](https://npmjs.com/package/js-confuser) [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/MichaelXF/js-confuser) [![Netlify](https://img.shields.io/badge/netlify-%23000000.svg?style=for-the-badge&logo=netlify&logoColor=#00C7B7)](https://js-confuser.com)
66

77
## Key features
88

@@ -19,9 +19,9 @@ JS-Confuser comes with three presets built into the obfuscator.
1919

2020
| Preset | Transforms | Performance Reduction | Sample |
2121
| --- | --- | --- | --- |
22-
| High | 21/22 | 98% | [Sample](https://github.com/MichaelXF/js-confuser/blob/master/samples/high.js) |
23-
| Medium | 15/22 | 52% | [Sample](https://github.com/MichaelXF/js-confuser/blob/master/samples/medium.js) |
24-
| Low | 10/22 | 30% | [Sample](https://github.com/MichaelXF/js-confuser/blob/master/samples/low.js) |
22+
| High | 22/25 | 98% | [Sample](https://github.com/MichaelXF/js-confuser/blob/master/samples/high.js) |
23+
| Medium | 19/25 | 52% | [Sample](https://github.com/MichaelXF/js-confuser/blob/master/samples/medium.js) |
24+
| Low | 15/25 | 30% | [Sample](https://github.com/MichaelXF/js-confuser/blob/master/samples/low.js) |
2525

2626
You can extend each preset or all go without them entirely.
2727

@@ -109,7 +109,7 @@ JsConfuser.obfuscate(`<source code>`, {
109109
target: "node",
110110
preset: "high" // | "medium" | "low"
111111
}).then(obfuscated=>{
112-
console.log(obfuscated) // obfuscated is a string
112+
console.log(obfuscated); // obfuscated is a string
113113
})
114114
```
115115

@@ -119,7 +119,7 @@ Remove's whitespace from the final output. Enabled by default. (`true/false`)
119119

120120
### `hexadecimalNumbers`
121121

122-
Uses the hexadecimal representation (`50` -> `0x32`) for numbers. (`true/false`)
122+
Uses the hexadecimal representation for numbers. (`true/false`)
123123

124124
### `minify`
125125

@@ -219,6 +219,131 @@ Use a number to control the percentage from 0 to 1.
219219
- Resilience High
220220
- Cost High
221221

222+
```js
223+
// Input
224+
function countTo(num){
225+
for ( var i = 1; i <= num; i++ ) {
226+
console.log(i);
227+
}
228+
}
229+
230+
var number = 10;
231+
countTo(number); // 1,2,3,4,5,6,7,8,9,10
232+
233+
// Output
234+
var n2DUka,
235+
O7yZ0oU,
236+
mJMdMhJ = -337,
237+
A1Nyvv = -94,
238+
xDwpOk6 = 495,
239+
uKcJl2 = {
240+
TGCpW6t: "log",
241+
qUrjFe: function () {
242+
return xDwpOk6 == (126 > mJMdMhJ ? -16 : 34);
243+
},
244+
YN20IBx: function () {
245+
return (A1Nyvv -= 53);
246+
},
247+
CTW4vwx: -73,
248+
PLzWYDx: function () {
249+
return (O7yZ0oU = [[385, -94, -282], [10]]);
250+
},
251+
bW2FK2: function () {
252+
return (mJMdMhJ *= 2), (mJMdMhJ += 366);
253+
},
254+
AfOoRT: function () {
255+
return xDwpOk6 == xDwpOk6 + 867;
256+
},
257+
KTNMdj: function () {
258+
if (uKcJl2.AfOoRT()) {
259+
typeof ((mJMdMhJ += 0), uKcJl2.Q0I6e4f(), (xDwpOk6 += 0));
260+
return "cobTe8G";
261+
}
262+
typeof (uKcJl2.htRXYx(),
263+
(mJMdMhJ += 59),
264+
(A1Nyvv -= 537),
265+
(xDwpOk6 += uKcJl2.mLuSzZ < mJMdMhJ ? 449 : -33));
266+
return "cobTe8G";
267+
},
268+
};
269+
while (mJMdMhJ + A1Nyvv + xDwpOk6 != 83) {
270+
var yQNDJh = (mJMdMhJ + A1Nyvv + xDwpOk6) * 58 + 54;
271+
switch (yQNDJh) {
272+
case 750:
273+
if (A1Nyvv == 24) {
274+
uKcJl2.FxREGd6();
275+
break;
276+
}
277+
case 1214:
278+
if (uKcJl2.qUrjFe()) {
279+
typeof ((mJMdMhJ *= -8 > xDwpOk6 ? -109 : 2),
280+
(mJMdMhJ += 1168),
281+
(xDwpOk6 += xDwpOk6 - 1290));
282+
break;
283+
}
284+
function _VSsIw() {
285+
var [yQNDJh, _VSsIw] = O7yZ0oU,
286+
[L9B14E] = _VSsIw,
287+
uTyFFb = 322;
288+
while (uTyFFb != 23) {
289+
var cBx3ysg = uTyFFb * 48 - 77;
290+
switch (cBx3ysg) {
291+
case 15379:
292+
var IOoqIZ = 1;
293+
uTyFFb -= 306;
294+
break;
295+
case 691:
296+
uTyFFb += IOoqIZ <= L9B14E ? 976 : 7;
297+
break;
298+
case 47539:
299+
typeof (console[uKcJl2.TGCpW6t](IOoqIZ), (uTyFFb -= 795));
300+
break;
301+
case 9379:
302+
!(IOoqIZ++, (uTyFFb -= 181));
303+
}
304+
}
305+
return ([mJMdMhJ, A1Nyvv, xDwpOk6] = yQNDJh), (n2DUka = void 0);
306+
}
307+
(xDwpOk6 == -73 ? parseInt : _VSsIw)();
308+
break;
309+
case 576:
310+
typeof (mJMdMhJ == -4 ? clearImmediate : void 0,
311+
uKcJl2.bky8kL(),
312+
(xDwpOk6 -= 463));
313+
break;
314+
case 4172:
315+
var L9B14E = 10;
316+
void ((O7yZ0oU = [[385, -94, -282], [10]]),
317+
(mJMdMhJ -= 187),
318+
uKcJl2.YN20IBx(),
319+
(xDwpOk6 += 189));
320+
break;
321+
case 3766:
322+
!((uKcJl2.Fpp8x5 = -167),
323+
(uKcJl2.mLuSzZ = 144),
324+
(uKcJl2.FxREGd6 = function () {
325+
return (mJMdMhJ += uKcJl2.Fpp8x5), (xDwpOk6 += 164);
326+
}),
327+
(uKcJl2.bky8kL = function () {
328+
return (A1Nyvv += 537);
329+
}),
330+
(uKcJl2.Q0I6e4f = function () {
331+
return (A1Nyvv += 0);
332+
}),
333+
(uKcJl2.htRXYx = function () {
334+
return (xDwpOk6 = -82);
335+
}));
336+
var L9B14E = 10;
337+
void (uKcJl2.PLzWYDx(), uKcJl2.bW2FK2(), (xDwpOk6 += uKcJl2.CTW4vwx));
338+
break;
339+
default:
340+
if (uKcJl2.KTNMdj() == "cobTe8G") {
341+
break;
342+
}
343+
}
344+
}
345+
```
346+
222347
### `globalConcealing`
223348

224349
Global Concealing hides global variables being accessed. (`true/false`)
@@ -455,6 +580,16 @@ Set to `true` to use the default set of native functions. (`string[]/true/false`
455580
- Resilience Medium
456581
- Cost Medium
457582

583+
### `lock.selfDefending`
584+
585+
Prevents the use of code beautifiers or formatters against your code.
586+
587+
[Identical to Obfuscator.io's Self Defending](https://github.com/javascript-obfuscator/javascript-obfuscator#selfdefending)
588+
589+
- Potency Low
590+
- Resilience Low
591+
- Cost Low
592+
458593
### `lock.integrity`
459594

460595
Integrity ensures the source code is unchanged. (`true/false/0-1`)
@@ -623,6 +758,7 @@ You must enable locks yourself, and configure them to your needs.
623758
target: "node",
624759
lock: {
625760
integrity: true,
761+
selfDefending: true,
626762
domainLock: ["mywebsite.com"],
627763
osLock: ["windows", "linux"],
628764
browserLock: ["firefox"],

0 commit comments

Comments
 (0)