js-confuser 2.0.0-alpha.5 → 2.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/.github/workflows/node.js.yml +1 -1
- package/CHANGELOG.md +10 -12
- package/Migration.md +2 -1
- package/README.md +20 -12
- package/dist/transforms/controlFlowFlattening.js +35 -24
- package/dist/transforms/lock/integrity.js +3 -1
- package/dist/transforms/lock/lock.js +1 -1
- package/dist/transforms/pack.js +4 -0
- package/dist/transforms/string/stringConcealing.js +7 -1
- package/package.json +2 -2
- package/src/transforms/controlFlowFlattening.ts +28 -12
- package/src/transforms/flatten.ts +0 -2
- package/src/transforms/lock/integrity.ts +5 -2
- package/src/transforms/lock/lock.ts +1 -8
- package/src/transforms/pack.ts +8 -0
- package/src/transforms/string/stringConcealing.ts +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
# `2.0.0
|
|
2
|
-
2.0 Rewrite
|
|
3
|
-
|
|
4
|
-
**⚠️ Warning: This an alpha release. This version is not stable and the likelihood of encountering bugs is significantly higher.**
|
|
1
|
+
# `2.0.0`
|
|
2
|
+
2.0 Rewrite 🎉
|
|
5
3
|
|
|
6
4
|
### Complete rewrite of JS-Confuser using Babel! 🎉
|
|
7
5
|
|
|
@@ -37,11 +35,11 @@ const options = {
|
|
|
37
35
|
|
|
38
36
|
### 2.0 Changes
|
|
39
37
|
|
|
40
|
-
- Added [Custom String Encoding](https://
|
|
38
|
+
- Added [Custom String Encoding](https://js-confuser.com/docs/options/customStringEncodings) and [Custom Lock Code](https://js-confuser.com/docs/options/customLocks) options
|
|
41
39
|
|
|
42
|
-
- Added `Rename Labels` [Learn more here](https://
|
|
40
|
+
- Added `Rename Labels` [Learn more here](https://js-confuser.com/docs/options/renamelabels#rename-labels)
|
|
43
41
|
|
|
44
|
-
- Added `Pack` [Learn more here](https://
|
|
42
|
+
- Added `Pack` [Learn more here](https://js-confuser.com/docs/options/pack#pack)
|
|
45
43
|
|
|
46
44
|
- RGF no longers uses `new Function` instead uses `eval`
|
|
47
45
|
|
|
@@ -71,7 +69,7 @@ const options = {
|
|
|
71
69
|
|
|
72
70
|
- New Comment Syntax
|
|
73
71
|
|
|
74
|
-
- - `/* @js-confuser-var */ "name"` for improved variable mappings
|
|
72
|
+
- - `/* @js-confuser-var */ "name"` for improved variable mappings, such as eval() calls
|
|
75
73
|
|
|
76
74
|
```js
|
|
77
75
|
// Input
|
|
@@ -83,19 +81,19 @@ var zC3PLKu = "Internet User";
|
|
|
83
81
|
eval("console.log(" + "zC3PLKu" + ")");
|
|
84
82
|
```
|
|
85
83
|
|
|
86
|
-
The function `__JS_CONFUSER_VAR__` is
|
|
84
|
+
Note: The function `__JS_CONFUSER_VAR__` is still supported.
|
|
87
85
|
|
|
88
86
|
### JS-Confuser.com Revamp
|
|
89
87
|
|
|
90
88
|
A new UI for [JS-Confuser.com](https://js-confuser.com), featuring an advanced playground and documentation pages.
|
|
91
89
|
|
|
92
|
-
The previous version will remain available
|
|
90
|
+
The previous version will remain available at [old--confuser.netlify.com](https://old--confuser.netlify.app/).
|
|
93
91
|
|
|
94
92
|
**Removed features**
|
|
95
93
|
|
|
96
94
|
- Removed `ES5` option - Use Babel Instead
|
|
97
95
|
|
|
98
|
-
- Removed `Browser Lock` and `OS Lock` - Use [Custom Locks](https://
|
|
96
|
+
- Removed `Browser Lock` and `OS Lock` - Use [Custom Locks](https://js-confuser.com/docs/options/customlocks#custom-locks) instead
|
|
99
97
|
|
|
100
98
|
- Removed `Shuffle`'s Hash option
|
|
101
99
|
|
|
@@ -134,7 +132,7 @@ eval('console.log(' + 'CA1HU0' + ')');
|
|
|
134
132
|
|
|
135
133
|
- Improve `String Compression`
|
|
136
134
|
|
|
137
|
-
- New Web UI sneak peak: https://
|
|
135
|
+
- New Web UI sneak peak: https://js-confuser.com/
|
|
138
136
|
|
|
139
137
|
|
|
140
138
|
# `1.7.2`
|
package/Migration.md
CHANGED
|
@@ -9,6 +9,7 @@ JS-Confuser 2.0 is complete rewrite of the original JS-Confuser created in 2020!
|
|
|
9
9
|
The method `JSConfuser.obfuscate()` resolves to a object now instead of a string. This result object contains a property `code` which is the obfuscated code.
|
|
10
10
|
|
|
11
11
|
```diff
|
|
12
|
+
const JSConfuser = require("js-confuser");
|
|
12
13
|
const sourceCode = `console.log("Hello World")`;
|
|
13
14
|
const options = {
|
|
14
15
|
target: "node",
|
|
@@ -47,7 +48,7 @@ These features have been removed but you can still add these locks using the `lo
|
|
|
47
48
|
// Must be placed in a Block or Switch Case body
|
|
48
49
|
`,
|
|
49
50
|
percentagePerBlock: 0.1, // = 10%
|
|
50
|
-
maxCount:
|
|
51
|
+
maxCount: 25, // Default = 25 - You probably don't want an excessive amount placed
|
|
51
52
|
minCount: 1 // Default = 1 - Ensures this custom lock is placed
|
|
52
53
|
}
|
|
53
54
|
]
|
package/README.md
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
# JS Confuser
|
|
2
2
|
|
|
3
|
-
**⚠️ Warning: This an alpha release. This version is not stable and the likelihood of encountering bugs is significantly higher.**
|
|
4
|
-
|
|
5
3
|
JS-Confuser is a JavaScript obfuscation tool to make your programs _impossible_ to read. [Try the web version](https://js-confuser.com).
|
|
6
4
|
|
|
7
5
|
[](https://npmjs.com/package/js-confuser) [](https://github.com/MichaelXF/js-confuser) [](https://js-confuser.com)
|
|
8
6
|
|
|
7
|
+
## Key features
|
|
8
|
+
|
|
9
|
+
- Variable renaming
|
|
10
|
+
- Control Flow obfuscation
|
|
11
|
+
- String concealing
|
|
12
|
+
- Function obfuscation
|
|
13
|
+
- Locks (domainLock, date)
|
|
14
|
+
- [Detect changes to source code](https://new--confuser.netlify.app/docs/options/integrity#integrity)
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
Get started in the [`JS-Confuser Docs`](https://js-confuser.com/docs/).
|
|
11
19
|
|
|
12
|
-
- [Getting Started](https://
|
|
20
|
+
- [Getting Started](https://js-confuser.com/docs)
|
|
13
21
|
|
|
14
|
-
- - [What is Obfuscation?](https://
|
|
22
|
+
- - [What is Obfuscation?](https://js-confuser.com/docs/getting-started/what-is-obfuscation)
|
|
15
23
|
|
|
16
|
-
- - [Playground](https://
|
|
24
|
+
- - [Playground](https://js-confuser.com/docs/getting-started/playground)
|
|
17
25
|
|
|
18
|
-
- - [Installation](https://
|
|
26
|
+
- - [Installation](https://js-confuser.com/docs/getting-started/installation)
|
|
19
27
|
|
|
20
|
-
- - [Usage](https://
|
|
28
|
+
- - [Usage](https://js-confuser.com/docs/getting-started/usage)
|
|
21
29
|
|
|
22
|
-
- - [FAQ](https://
|
|
30
|
+
- - [FAQ](https://js-confuser.com/docs/getting-started/faq)
|
|
23
31
|
|
|
24
|
-
- [Options](https://
|
|
32
|
+
- [Options](https://js-confuser.com/docs/options)
|
|
25
33
|
|
|
26
|
-
- [Presets](https://
|
|
34
|
+
- [Presets](https://js-confuser.com/docs/presets)
|
|
27
35
|
|
|
28
36
|
## API Usage
|
|
29
37
|
|
|
@@ -61,7 +69,7 @@ JsConfuser.obfuscate(`
|
|
|
61
69
|
})
|
|
62
70
|
|
|
63
71
|
/*
|
|
64
|
-
var AF59rI,ZgbbeaU,WDgj3I,gpR2qG,Ox61sk,pTNPNpX;AF59rI=[60,17,25,416,22,23,83,26,27,28,18,382,66,29,30,31,2,5,33,4,13,16,10,11,24,1,3,15,6,7,8,167,50,9,21,35,12,14,116],ZgbbeaU=AF59rI;for(var TlMIASm=62;TlMIASm;TlMIASm--)ZgbbeaU.unshift(ZgbbeaU.pop());WDgj3I=MBh_HcM("length1charCodeAt1slice1replaĕ1!ğğ1uģģ1<~A8bt#D.RU,~>Ħ~E,ol,ATMnijĵ@rH7+DertŀħDKTtlBhE[ŋ~@q]:k6Z6LHŖ6$*Ŗ7n#j;20AŖ;g3Cn<]'Ŗ<Fna!Cii#ŖAU&0.Eb0;TŖ4ƌĴħ3rƍ)eVMBK\\!Ŗ+=M;Q@;]UaŖž=3&.0Ŗ/M2-WEcYr5ŖD?ƯTqŸb>-Q:c8Ŗ?SF2m2*!WQŖ2)RIJƐ~ž<ƿĴmČuĀ1 (local)").split('1');function pprWr0(ZgbbeaU){var WDgj3I,gpR2qG,Ox61sk,pTNPNpX,TlMIASm,pprWr0,M1ClYmT,kHWl72,xw_ohrD,sT8e3fv,bxd0KVG;WDgj3I=void 0,gpR2qG=void 0,Ox61sk=void 0,pTNPNpX=void 0,TlMIASm=void 0,pprWr0=String,M1ClYmT=CVH25o3(0),kHWl72=255,xw_ohrD=CVH25o3(1),sT8e3fv=CVH25o3(AF59rI[0]),bxd0KVG=CVH25o3(3);for('<~'===ZgbbeaU[sT8e3fv](0,AF59rI[0])&&'~>'===ZgbbeaU[sT8e3fv](-AF59rI[0]),ZgbbeaU=ZgbbeaU[sT8e3fv](AF59rI[0],-AF59rI[0])[bxd0KVG](/s/g,'')[bxd0KVG]('z',CVH25o3(AF59rI[3])),WDgj3I=CVH25o3(AF59rI[1])[sT8e3fv](ZgbbeaU[M1ClYmT]%AF59rI[1]||AF59rI[1]),ZgbbeaU+=WDgj3I,Ox61sk=[],pTNPNpX=0,TlMIASm=ZgbbeaU[M1ClYmT];TlMIASm>pTNPNpX;pTNPNpX+=AF59rI[1])gpR2qG=52200625*(ZgbbeaU[xw_ohrD](pTNPNpX)-AF59rI[2])+614125*(ZgbbeaU[xw_ohrD](pTNPNpX+AF59rI[9])-AF59rI[2])+7225*(ZgbbeaU[xw_ohrD](pTNPNpX+AF59rI[0])-AF59rI[2])+85*(ZgbbeaU[xw_ohrD](pTNPNpX+AF59rI[10])-AF59rI[2])+(ZgbbeaU[xw_ohrD](pTNPNpX+AF59rI[3])-AF59rI[2]),Ox61sk.push(kHWl72&gpR2qG>>AF59rI[8],kHWl72&gpR2qG>>AF59rI[5],kHWl72&gpR2qG>>8,kHWl72&gpR2qG);return function(ZgbbeaU,Ox61sk){for(var WDgj3I=Ox61sk;WDgj3I>0;WDgj3I--)ZgbbeaU.pop()}(Ox61sk,WDgj3I[M1ClYmT]),pprWr0.fromCharCode.apply(pprWr0,Ox61sk)}gpR2qG=[CVH25o3(AF59rI[12]),CVH25o3(AF59rI[13]),CVH25o3(8),CVH25o3(AF59rI[17]),CVH25o3(AF59rI[6]),CVH25o3(AF59rI[7]),CVH25o3(AF59rI[20]),'<~AQO1jBl7V~>',CVH25o3(AF59rI[4]),CVH25o3(AF59rI[21]),CVH25o3(AF59rI[4]),CVH25o3(9),CVH25o3(AF59rI[11]),CVH25o3(AF59rI[5]),CVH25o3(AF59rI[24]),CVH25o3(AF59rI[33]),'<~E%u9/13QC~>',CVH25o3(AF59rI[6]),CVH25o3(AF59rI[7]),CVH25o3(19),CVH25o3(20),CVH25o3(AF59rI[18]),CVH25o3(AF59rI[27]),CVH25o3(AF59rI[28]),CVH25o3(AF59rI[8]),'<~?T9_t1,(IC~>','<~1bpf~>',CVH25o3(AF59rI[25]),CVH25o3(AF59rI[30]),CVH25o3(AF59rI[31]),CVH25o3(14),CVH25o3(AF59rI[8])];function M1ClYmT(AF59rI){return pprWr0(gpR2qG[AF59rI])}function kHWl72(){try{return global}catch(AF59rI){return this}}Ox61sk=kHWl72.call(this);function xw_ohrD(ZgbbeaU){switch(ZgbbeaU){case 608:return Ox61sk[M1ClYmT(0)];case-884:return Ox61sk[CVH25o3(AF59rI[32])];case AF59rI[26]:return Ox61sk[M1ClYmT(AF59rI[9])];case-AF59rI[35]:return Ox61sk[M1ClYmT(2)]}}function sT8e3fv(ZgbbeaU,WDgj3I,gpR2qG){var Ox61sk;Ox61sk=11;while(Ox61sk!=51){var pTNPNpX,TlMIASm,pprWr0,kHWl72;pTNPNpX=Ox61sk*-244+217;switch(pTNPNpX){case-2467:TlMIASm=false,Ox61sk+=37;break;case-4175:kHWl72=WDgj3I==M1ClYmT(AF59rI[10])&&ziPI9L.qzUvJu1[M1ClYmT(4)+M1ClYmT(AF59rI[1])](AF59rI[9])==48?function(...WDgj3I){var gpR2qG;gpR2qG=AF59rI[1];while(gpR2qG!=AF59rI[11]){var Ox61sk;Ox61sk=gpR2qG*41+199;switch(Ox61sk){case 732:return pprWr0[ZgbbeaU].call(this,M1ClYmT(AF59rI[12]));case 404:IZftqI=WDgj3I,gpR2qG+=AF59rI[14]}}}:pprWr0[ZgbbeaU](M1ClYmT(AF59rI[13])),Ox61sk-=AF59rI[10];break;case-11495:pprWr0={[M1ClYmT(AF59rI[14])]:function(ZgbbeaU,WDgj3I,gpR2qG){var Ox61sk;Ox61sk=64;while(Ox61sk!=AF59rI[16]){var pTNPNpX,TlMIASm,pprWr0;pTNPNpX=Ox61sk*AF59rI[15]+144;switch(pTNPNpX){case 10832:TlMIASm=822,Ox61sk+=AF59rI[10];break;case 812:pprWr0[AF59rI[10]]=pprWr0[0],Ox61sk+=47;break;case 8661:while(TlMIASm!=772){var kHWl72;kHWl72=TlMIASm*234+191;switch(kHWl72){case 207515:TlMIASm-=528;break;case 129593:pprWr0[3]=bxd0KVG(AF59rI[15],pprWr0[AF59rI[9]],pprWr0[AF59rI[0]]),pprWr0[AF59rI[9]]=pprWr0[AF59rI[0]],pprWr0[AF59rI[0]]=pprWr0[AF59rI[10]],TlMIASm+=333;break;case 83963:TlMIASm+=bxd0KVG(-AF59rI[29],pprWr0[0]--,AF59rI[9])&&ziPI9L.U1LXDgJ()?195:414;break;case 192539:TlMIASm-=464}}Ox61sk-=AF59rI[16];break;case 10999:[...pprWr0]=IZftqI,pprWr0.length=1,Ox61sk-=AF59rI[38];break;case 6824:return[];case 11333:if(!ZgbbeaU){return WDgj3I(this,gpR2qG)}Ox61sk-=AF59rI[0];break;case 311:return[pprWr0[AF59rI[10]]];case 5822:pprWr0[1]=0,pprWr0[AF59rI[0]]=AF59rI[9],Ox61sk-=AF59rI[37]}}},[M1ClYmT(AF59rI[17])]:function(ZgbbeaU,WDgj3I,gpR2qG){var Ox61sk;Ox61sk=AF59rI[18];while(Ox61sk!=38){var pTNPNpX,TlMIASm,pprWr0;pTNPNpX=Ox61sk*182+-139;switch(pTNPNpX){case 4047:pprWr0[AF59rI[9]]=sT8e3fv(M1ClYmT(AF59rI[6]),M1ClYmT(AF59rI[7])).call([],pprWr0[0]),Ox61sk+=AF59rI[19];break;case 3683:TlMIASm=false,Ox61sk+=21;break;case 7505:[...pprWr0]=IZftqI,Ox61sk-=10;break;case 225:return pprWr0[AF59rI[9]].pop();case 10417:if(TlMIASm){var kHWl72=(ZgbbeaU,WDgj3I,gpR2qG)=>{var Ox61sk;Ox61sk=32;while(Ox61sk!=AF59rI[19]){var pTNPNpX,TlMIASm,pprWr0;pTNPNpX=Ox61sk*38+90;switch(pTNPNpX){case 508:TlMIASm=bxd0KVG(AF59rI[15],M1ClYmT(AF59rI[20]),pprWr0.toUTCString()),Ox61sk+=AF59rI[21];break;case 584:pprWr0.setTime(bxd0KVG(AF59rI[15],pprWr0.getTime(),bxd0KVG(AF59rI[22],bxd0KVG(116,bxd0KVG(AF59rI[22],bxd0KVG(116,gpR2qG,AF59rI[8]),AF59rI[23]),AF59rI[23]),1e3))),Ox61sk-=2;break;case 1040:xw_ohrD(608).cookie=bxd0KVG(AF59rI[15],bxd0KVG(AF59rI[15],bxd0KVG(AF59rI[15],bxd0KVG(AF59rI[15],bxd0KVG(AF59rI[15],ZgbbeaU,M1ClYmT(AF59rI[4])),WDgj3I),M1ClYmT(AF59rI[21])),TlMIASm),M1ClYmT(15)),Ox61sk+=AF59rI[6];break;case 1306:pprWr0=new Date,Ox61sk-=19}}}}Ox61sk-=56;break;case 5685:pprWr0.length=1,Ox61sk-=AF59rI[17]}}}},Ox61sk-=43;break;case-14179:kHWl72=void 0;if(WDgj3I==M1ClYmT(AF59rI[5])&&ziPI9L.VNaV0wv[M1ClYmT(AF59rI[24])+M1ClYmT(18)](AF59rI[6])==AF59rI[16]){IZftqI=[]}Ox61sk-=41;break;case-1003:if(TlMIASm){xw_ohrD(-884).exports=async()=>{var ZgbbeaU;ZgbbeaU=33;while(ZgbbeaU!=AF59rI[7]){var WDgj3I,gpR2qG,Ox61sk;WDgj3I=ZgbbeaU*95+-150;switch(WDgj3I){case 3175:gpR2qG=await(async()=>{var ZgbbeaU;ZgbbeaU=14;while(ZgbbeaU!=AF59rI[13]){var WDgj3I;WDgj3I=ZgbbeaU*100+-59;switch(WDgj3I){case 1341:if(isStandaloneExecutable){return M1ClYmT(19)+M1ClYmT(20)}ZgbbeaU+=AF59rI[6];break;case 2341:if(redactedPath===await resolveLocalredactedPath()){return CVH25o3(AF59rI[36])}ZgbbeaU-=AF59rI[13];break;case 1641:return''}}})(),ZgbbeaU-=AF59rI[25];break;case 2985:Ox61sk=new Set(xw_ohrD(AF59rI[26]).argv.slice(2)),ZgbbeaU-=AF59rI[6];break;case 2035:if(!Ox61sk.has(M1ClYmT(AF59rI[18])+M1ClYmT(AF59rI[27]))){var pTNPNpX;pTNPNpX=AF59rI[14];while(pTNPNpX!=9){var TlMIASm;TlMIASm=pTNPNpX*-204+38;switch(TlMIASm){case-1594:if(bxd0KVG(427,Ox61sk.size,1)){return false}pTNPNpX-=AF59rI[3];break;case-778:if(!Ox61sk.has(M1ClYmT(AF59rI[28]))){return false}pTNPNpX+=AF59rI[1]}}}ZgbbeaU+=AF59rI[20];break;case 800:return true}}}}Ox61sk+=54;break;case-3443:return gpR2qG==M1ClYmT(AF59rI[8])&&ziPI9L.U1LXDgJ()?{QVbrqy9:kHWl72}:kHWl72}}}function bxd0KVG(ZgbbeaU,WDgj3I,gpR2qG){switch(ZgbbeaU){case-AF59rI[34]:return WDgj3I<=gpR2qG;case-AF59rI[29]:return WDgj3I>gpR2qG;case AF59rI[15]:return WDgj3I+gpR2qG;case AF59rI[22]:return WDgj3I*gpR2qG;case 427:return WDgj3I!==gpR2qG}}pTNPNpX=AF59rI[12];while(pTNPNpX!=AF59rI[24]){var kBznIi,sCb8UYh,ziPI9L,IZftqI;kBznIi=pTNPNpX*-55+-214;switch(kBznIi){case-544:sCb8UYh=846,pTNPNpX+=AF59rI[0];break;case-654:ziPI9L={wHDYSl:[],U1LXDgJ:function(){if(!ziPI9L.wHDYSl[0]){ziPI9L.wHDYSl.push(87)}return ziPI9L.wHDYSl.length},VNaV0wv:M1ClYmT(AF59rI[25])+M1ClYmT(AF59rI[30]),qzUvJu1:M1ClYmT(AF59rI[31])+M1ClYmT(AF59rI[32])},pTNPNpX+=AF59rI[33];break;case-1644:IZftqI=[],pTNPNpX-=7;break;case-1259:while(sCb8UYh!=316){var XsBuZX,mgjtps2;XsBuZX=sCb8UYh*229+-125;switch(XsBuZX){case 193609:mgjtps2=AF59rI[9],sCb8UYh-=733;break;case 25752:sCb8UYh+=bxd0KVG(-AF59rI[34],mgjtps2,25)&&ziPI9L.U1LXDgJ()?662:203;break;case 177350:xw_ohrD(-AF59rI[35])[M1ClYmT(AF59rI[36])](mgjtps2,(IZftqI=[mgjtps2],new sT8e3fv(M1ClYmT(AF59rI[37]),void 0,M1ClYmT(AF59rI[38])).QVbrqy9)),sCb8UYh-=569;break;case 47049:mgjtps2++,sCb8UYh-=93}}pTNPNpX-=AF59rI[0]}}function CVH25o3(AF59rI){return WDgj3I[AF59rI]}function MBh_HcM(ZgbbeaU){var WDgj3I,gpR2qG,Ox61sk,pTNPNpX,TlMIASm,pprWr0,M1ClYmT,kHWl72;WDgj3I=void 0,gpR2qG=void 0,Ox61sk=void 0,pTNPNpX={},TlMIASm=ZgbbeaU.split(''),pprWr0=gpR2qG=TlMIASm[0],M1ClYmT=[pprWr0],kHWl72=WDgj3I=256;for(ZgbbeaU=AF59rI[9];ZgbbeaU<TlMIASm.length;ZgbbeaU++)Ox61sk=TlMIASm[ZgbbeaU].charCodeAt(0),Ox61sk=kHWl72>Ox61sk?TlMIASm[ZgbbeaU]:pTNPNpX[Ox61sk]?pTNPNpX[Ox61sk]:gpR2qG+pprWr0,M1ClYmT.push(Ox61sk),pprWr0=Ox61sk.charAt(0),pTNPNpX[WDgj3I]=gpR2qG+pprWr0,WDgj3I++,gpR2qG=Ox61sk;return M1ClYmT.join('')}
|
|
72
|
+
Function("tZzJOP","var iSDaP3,MyrZnn,PugOol,zlitc1Y,NqvmoV,w01dEg,PEGf2Ir,wQdUIp,YwPLty,BNOmOCh,CHDWybv,MsWp2Eg,q5kdT5,tDyAgBo,Nmc7b1;const WydP2H=[\"length\",0x2,0x0,0x1,\"c\",0x3e,null,0x20,\"a\",0x100,0x6,0x3,0x8,0x10,0x4,\"undefined\",\"LZString\",0x25,\"h\",0xe2,0x8d,0x34,0x5,\"f\",0xf5,0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x4f,0xf1,0x31,0xc1,0x80,void 0x0,\"d\",\"b\",0x7f,0x1f,0x3f,0xc,0xc7,0x12,0xbd,0xc9,0x9d,0x48,\"i\",\"g\",0x1fff,0x77,0x15,0x84,0x24,0x9,\"e\",0x63,0x64,0x22,0xaa,0xfa,0x65,0x66,0x67,0x68,0x69,0xcf,0x6a,0x6b,0xe9,0xf2,0xd4,0xd8,0x6c,0x6d,0x28,0xa,0x8a,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x85,0x86,0x87,0x88,0x89,0x8b,0x8c,0x8e,0x8f,0x90,0x91,\"8\",0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xab,0xac,0xad,0xae,0xaf,0xc4,0x40,0xed,0xb0,0xe8,0xb1,0xb2,0xb3,0xb4,0xbf,0xb6,0xb5,0xb7,0xea,0xf6,0xb8,0x53,0xb9,\"t\",!0x1,0xba,0xbb,0xbc,0xbe,0xc0,0xc2,0xc3,0xc5,0xc6,0x4d,0xc8,0xca,0xcb,0xcc,0xcd,0x19];Fj4SwuY(YVrVbv(be5E4W),YVrVbv(g7PNjlU),YVrVbv(Hxpsdj_),YVrVbv(putCzy));function YVrVbv(MyrZnn,PugOol=WydP2H[0x3]){Object.defineProperty(MyrZnn,WydP2H[0x0],{value:PugOol,configurable:WydP2H[0x9f]});return MyrZnn}Fj4SwuY(iSDaP3=function(...MyrZnn){Fj4SwuY(MyrZnn[WydP2H[0x0]]=WydP2H[0x2],YVrVbv(PEGf2Ir,WydP2H[0x1]));var PugOol=String.fromCharCode,zlitc1Y=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",NqvmoV=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\",w01dEg={};function PEGf2Ir(...MyrZnn){var PugOol,zlitc1Y;function*NqvmoV(zlitc1Y,NqvmoV,PEGf2Ir,wQdUIp,YwPLty={r78IiA:{}}){while(zlitc1Y+NqvmoV+PEGf2Ir+wQdUIp!==0x1e)with(YwPLty.Vohu0Q||YwPLty)switch(zlitc1Y+NqvmoV+PEGf2Ir+wQdUIp){case 0x5f:case 0xef:Fj4SwuY(YwPLty.r78IiA.FpCHxeU=-0x4,MyrZnn[WydP2H[0x0]]=WydP2H[zlitc1Y+0x10]);if(!w01dEg[MyrZnn[WydP2H[0x2]]]){Fj4SwuY(YwPLty.Vohu0Q=YwPLty.r78IiA,zlitc1Y+=-0xb1,NqvmoV+=0x7b,PEGf2Ir+=-0x4c,wQdUIp+=0x4a);break}else{Fj4SwuY(YwPLty.Vohu0Q=YwPLty.r78IiA,zlitc1Y+=-0x28,NqvmoV+=0x11b,PEGf2Ir+=-0x152,wQdUIp+=0x4a);break}case YwPLty.r78IiA.FpCHxeU+0x4e:return PugOol=!0x0,w01dEg[MyrZnn[WydP2H[0x2]]][MyrZnn[WydP2H[PEGf2Ir+0xda]]];case-0x93:case 0x27:case 0x2a:w01dEg[MyrZnn[WydP2H[zlitc1Y+0xc2]]]={};for(MyrZnn[WydP2H[zlitc1Y+0xc1]]=WydP2H[0x2];MyrZnn[WydP2H[0x1]]<MyrZnn[WydP2H[0x2]].length;MyrZnn[WydP2H[PEGf2Ir+-0x2e]]++)w01dEg[MyrZnn[WydP2H[zlitc1Y+0xc2]]][MyrZnn[WydP2H[PEGf2Ir+-0x2d]].charAt(MyrZnn[WydP2H[0x1]])]=MyrZnn[WydP2H[NqvmoV+-0x5b]];Fj4SwuY(YwPLty.Vohu0Q=YwPLty.r78IiA,zlitc1Y+=0x89,NqvmoV+=0xa0,PEGf2Ir+=-0x106);break;case YwPLty.r78IiA.FpCHxeU+0x14:Fj4SwuY(YwPLty.Vohu0Q=YwPLty.r78IiA,zlitc1Y+=-0xd2,NqvmoV+=0x169,PEGf2Ir+=-0x15d,wQdUIp+=0x100);break;case NqvmoV- -0xff:Fj4SwuY(YwPLty.Vohu0Q=YwPLty.IjdvHE,zlitc1Y+=-0x6e,NqvmoV+=0x1c,PEGf2Ir+=-0xeb,wQdUIp+=0xd8);break;default:Fj4SwuY(YwPLty.Vohu0Q=YwPLty.UUeBR2,zlitc1Y+=-0x1e,NqvmoV+=-0xc6,PEGf2Ir+=0xca,wQdUIp+=-0x6b);break;case YwPLty.r78IiA.FpCHxeU+0x64:Fj4SwuY(YwPLty.Vohu0Q=YwPLty.dcYkgZ6,zlitc1Y+=-0x6e,NqvmoV+=0x44,PEGf2Ir+=-0x66,wQdUIp+=0x8f);break;case YwPLty.r78IiA.FpCHxeU+0x10:Fj4SwuY(YwPLty.r78IiA.FpCHxeU=0x1c,YwPLty.Vohu0Q=YwPLty.r78IiA,zlitc1Y+=-0xbe,NqvmoV+=0x169,PEGf2Ir+=-0x15d,wQdUIp+=0xf0);break}}Fj4SwuY(PugOol=void 0x0,zlitc1Y=NqvmoV(-0xf,-0x1f,0x7b,0x12).next().value);if(PugOol){return zlitc1Y}}MyrZnn[WydP2H[0x4]]={compressToBase64:YVrVbv(function(...PugOol){var NqvmoV,w01dEg;function*PEGf2Ir(w01dEg,PEGf2Ir,wQdUIp,YwPLty={UeCEL4_:{}}){while(w01dEg+PEGf2Ir+wQdUIp!==-0x8a)with(YwPLty.GpihL4o||YwPLty)switch(w01dEg+PEGf2Ir+wQdUIp){case YwPLty.UeCEL4_.uWtqTC+-0xe6:PugOol[WydP2H[0x5]]=MyrZnn[WydP2H[0x4]]._compress(PugOol[WydP2H[w01dEg+-0x36]],WydP2H[0xa],YVrVbv(function(...w01dEg){w01dEg[WydP2H[0x0]]=WydP2H[0x3];return zlitc1Y.charAt(w01dEg[WydP2H[0x2]])}));switch(PugOol[WydP2H[0x5]].length%WydP2H[0xe]){default:case WydP2H[0x2]:return NqvmoV=!0x0,PugOol[WydP2H[0x5]];case WydP2H[0x3]:return NqvmoV=!0x0,PugOol[WydP2H[0x5]]+\"===\";case WydP2H[0x1]:return NqvmoV=!0x0,PugOol[WydP2H[w01dEg+-0x33]]+\"==\";case WydP2H[w01dEg+-0x2d]:return NqvmoV=!0x0,PugOol[WydP2H[PEGf2Ir+-0x60]]+\"=\"}Fj4SwuY(YwPLty.GpihL4o=YwPLty.g4B1IWG,PEGf2Ir+=-0xfd,wQdUIp+=0xae);break;case 0xac:case 0x37:Fj4SwuY(YwPLty.GpihL4o=YwPLty.UeCEL4_,w01dEg+=-0x3e,PEGf2Ir+=-0xeb,wQdUIp+=0xe);break;case 0x1c:case 0xf4:Fj4SwuY([YwPLty.UeCEL4_.aKWU7u,YwPLty.UeCEL4_.uWtqTC,YwPLty.UeCEL4_.nF1ngYQ]=[-0xa4,0xab,-0x5],PugOol[WydP2H[PEGf2Ir+-0x49]]=WydP2H[0x3]);if(WydP2H[PEGf2Ir+-0x43]==PugOol[WydP2H[PEGf2Ir+-0x47]])return NqvmoV=!0x0,\"\";Fj4SwuY(YwPLty.GpihL4o=YwPLty.UeCEL4_,w01dEg+=-0x45,PEGf2Ir+=0x1c,wQdUIp+=-0x2e);break;case w01dEg-0x10f:case-0x5:case-0x1e:Fj4SwuY(YwPLty.GpihL4o=YwPLty.UeCEL4_,w01dEg+=-0x68,PEGf2Ir+=0x85,wQdUIp+=0x17);break;default:Fj4SwuY([YwPLty.UeCEL4_.aKWU7u,YwPLty.UeCEL4_.uWtqTC,YwPLty.UeCEL4_.nF1ngYQ]=[-0x54,0xf5,-0x19],YwPLty.GpihL4o=YwPLty.pMZ3Cz,w01dEg+=0x84,PEGf2Ir+=0x9,wQdUIp+=-0x126);break;case w01dEg- -0x26:Fj4SwuY(YwPLty.GpihL4o=YwPLty.TbtugV,w01dEg+=0x9a,PEGf2Ir+=0x69,wQdUIp+=-0xf0);break;case 0x91:case 0x0:case YwPLty.UeCEL4_.nF1ngYQ+-0x55:Fj4SwuY(YwPLty.GpihL4o=YwPLty.oBcZJzn,w01dEg+=-0x62,PEGf2Ir+=0x1e3,wQdUIp+=-0x10b);break}}Fj4SwuY(NqvmoV=void 0x0,w01dEg=PEGf2Ir(0x7d,0x49,-0xaa).next().value);if(NqvmoV){return w01dEg}}),decompressFromBase64:YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];return WydP2H[0x6]==PugOol[WydP2H[0x2]]?\"\":\"\"==PugOol[WydP2H[0x2]]?WydP2H[0x6]:MyrZnn[WydP2H[0x4]]._decompress(PugOol[WydP2H[0x2]].length,WydP2H[0x7],function(MyrZnn){return PEGf2Ir(zlitc1Y,PugOol[WydP2H[0x2]].charAt(MyrZnn))})}),compressToUTF16:function(NqvmoV){return WydP2H[0x6]==NqvmoV?\"\":MyrZnn[WydP2H[0x4]]._compress(NqvmoV,WydP2H[0x1d],YVrVbv(function(...NqvmoV){NqvmoV[WydP2H[0x0]]=WydP2H[0x3];return PugOol(NqvmoV[WydP2H[0x2]]+WydP2H[0x7])}))+\" \"},decompressFromUTF16:YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];return WydP2H[0x6]==PugOol[WydP2H[0x2]]?\"\":\"\"==PugOol[WydP2H[0x2]]?WydP2H[0x6]:MyrZnn[WydP2H[0x4]]._decompress(PugOol[WydP2H[0x2]].length,0x4000,YVrVbv(function(...MyrZnn){MyrZnn[WydP2H[0x0]]=WydP2H[0x3];return PugOol[WydP2H[0x2]].charCodeAt(MyrZnn[WydP2H[0x2]])-WydP2H[0x7]}))}),compressToUint8Array:YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];for(var wQdUIp=MyrZnn[WydP2H[0x4]].compress(PugOol[WydP2H[0x2]]),YwPLty=new Uint8Array(WydP2H[0x1]*wQdUIp.length),BNOmOCh=WydP2H[0x2],CHDWybv=wQdUIp.length;BNOmOCh<CHDWybv;BNOmOCh++){Fj4SwuY(PugOol[WydP2H[0x8]]=wQdUIp.charCodeAt(BNOmOCh),YwPLty[WydP2H[0x1]*BNOmOCh]=PugOol[WydP2H[0x8]]>>>WydP2H[0xc],YwPLty[WydP2H[0x1]*BNOmOCh+WydP2H[0x3]]=PugOol[WydP2H[0x8]]%WydP2H[0x9])}return YwPLty}),decompressFromUint8Array:YVrVbv(function(...zlitc1Y){zlitc1Y[WydP2H[0x0]]=WydP2H[0x3];if(WydP2H[0x6]==zlitc1Y[WydP2H[0x2]])return MyrZnn[WydP2H[0x4]].decompress(zlitc1Y[WydP2H[0x2]]);for(var wQdUIp=new Array(zlitc1Y[WydP2H[0x2]].length/WydP2H[0x1]),YwPLty=WydP2H[0x2],BNOmOCh=wQdUIp.length;YwPLty<BNOmOCh;YwPLty++)wQdUIp[YwPLty]=WydP2H[0x9]*zlitc1Y[WydP2H[0x2]][WydP2H[0x1]*YwPLty]+zlitc1Y[WydP2H[0x2]][WydP2H[0x1]*YwPLty+WydP2H[0x3]];zlitc1Y[WydP2H[0x3]]=[];return wQdUIp.forEach(YVrVbv(function(...wQdUIp){Fj4SwuY(wQdUIp[WydP2H[0x0]]=WydP2H[0x3],zlitc1Y[WydP2H[0x3]].push(PugOol(wQdUIp[WydP2H[0x2]])))})),MyrZnn[WydP2H[0x4]].decompress(zlitc1Y[WydP2H[0x3]].join(\"\"))}),compressToEncodedURIComponent:YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];return WydP2H[0x6]==PugOol[WydP2H[0x2]]?\"\":MyrZnn[WydP2H[0x4]]._compress(PugOol[WydP2H[0x2]],WydP2H[0xa],YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];return NqvmoV.charAt(PugOol[WydP2H[0x2]])}))}),decompressFromEncodedURIComponent:YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];return WydP2H[0x6]==PugOol[WydP2H[0x2]]?\"\":\"\"==PugOol[WydP2H[0x2]]?WydP2H[0x6]:(PugOol[WydP2H[0x2]]=PugOol[WydP2H[0x2]].replace(/ /g,\"+\"),MyrZnn[WydP2H[0x4]]._decompress(PugOol[WydP2H[0x2]].length,WydP2H[0x7],YVrVbv(function(...MyrZnn){MyrZnn[WydP2H[0x0]]=WydP2H[0x3];return PEGf2Ir(NqvmoV,PugOol[WydP2H[0x2]].charAt(MyrZnn[WydP2H[0x2]]))})))}),compress:function(NqvmoV){return MyrZnn[WydP2H[0x4]]._compress(NqvmoV,WydP2H[0xd],function(MyrZnn){return PugOol(MyrZnn)})},_compress:function(MyrZnn,wQdUIp,YwPLty){if(WydP2H[0x6]==MyrZnn)return\"\";var BNOmOCh,CHDWybv,MsWp2Eg,q5kdT5={},tDyAgBo={},YVrVbv=\"\",putCzy=\"\",Hxpsdj_=\"\",UkVIMy=WydP2H[0x1],g7PNjlU=WydP2H[0xb],RT3qJW_=WydP2H[0x1],qLPG1Tw=[],be5E4W=WydP2H[0x2],GpA0Rz=WydP2H[0x2];for(MsWp2Eg=WydP2H[0x2];MsWp2Eg<MyrZnn.length;MsWp2Eg+=WydP2H[0x3])if(YVrVbv=MyrZnn.charAt(MsWp2Eg),Object.prototype.hasOwnProperty.call(q5kdT5,YVrVbv)||(q5kdT5[YVrVbv]=g7PNjlU++,tDyAgBo[YVrVbv]=!WydP2H[0x2]),putCzy=Hxpsdj_+YVrVbv,Object.prototype.hasOwnProperty.call(q5kdT5,putCzy))Hxpsdj_=putCzy;else{if(Object.prototype.hasOwnProperty.call(tDyAgBo,Hxpsdj_)){if(Hxpsdj_.charCodeAt(WydP2H[0x2])<WydP2H[0x9]){for(BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W<<=WydP2H[0x3],GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++;for(CHDWybv=Hxpsdj_.charCodeAt(WydP2H[0x2]),BNOmOCh=WydP2H[0x2];BNOmOCh<WydP2H[0xc];BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3]}else{for(CHDWybv=WydP2H[0x3],BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv=WydP2H[0x2];for(CHDWybv=Hxpsdj_.charCodeAt(WydP2H[0x2]),BNOmOCh=WydP2H[0x2];BNOmOCh<WydP2H[0xd];BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3]}Fj4SwuY(WydP2H[0x2]==--UkVIMy&&(UkVIMy=Math.pow(WydP2H[0x1],RT3qJW_),RT3qJW_++),delete tDyAgBo[Hxpsdj_])}else for(CHDWybv=q5kdT5[Hxpsdj_],BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3];Fj4SwuY(WydP2H[0x2]==--UkVIMy&&(UkVIMy=Math.pow(WydP2H[0x1],RT3qJW_),RT3qJW_++),q5kdT5[putCzy]=g7PNjlU++,Hxpsdj_=String(YVrVbv))}if(\"\"!==Hxpsdj_){if(Object.prototype.hasOwnProperty.call(tDyAgBo,Hxpsdj_)){if(Hxpsdj_.charCodeAt(WydP2H[0x2])<WydP2H[0x9]){for(BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W<<=WydP2H[0x3],GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++;for(CHDWybv=Hxpsdj_.charCodeAt(WydP2H[0x2]),BNOmOCh=WydP2H[0x2];BNOmOCh<WydP2H[0xc];BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3]}else{for(CHDWybv=WydP2H[0x3],BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv=WydP2H[0x2];for(CHDWybv=Hxpsdj_.charCodeAt(WydP2H[0x2]),BNOmOCh=WydP2H[0x2];BNOmOCh<WydP2H[0xd];BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3]}Fj4SwuY(WydP2H[0x2]==--UkVIMy&&(UkVIMy=Math.pow(WydP2H[0x1],RT3qJW_),RT3qJW_++),delete tDyAgBo[Hxpsdj_])}else for(CHDWybv=q5kdT5[Hxpsdj_],BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3];WydP2H[0x2]==--UkVIMy&&(UkVIMy=Math.pow(WydP2H[0x1],RT3qJW_),RT3qJW_++)}for(CHDWybv=WydP2H[0x1],BNOmOCh=WydP2H[0x2];BNOmOCh<RT3qJW_;BNOmOCh++)be5E4W=be5E4W<<WydP2H[0x3]|WydP2H[0x3]&CHDWybv,GpA0Rz==wQdUIp-WydP2H[0x3]?(GpA0Rz=WydP2H[0x2],qLPG1Tw.push(YwPLty(be5E4W)),be5E4W=WydP2H[0x2]):GpA0Rz++,CHDWybv>>=WydP2H[0x3];for(;;){if(be5E4W<<=WydP2H[0x3],GpA0Rz==wQdUIp-WydP2H[0x3]){qLPG1Tw.push(YwPLty(be5E4W));break}GpA0Rz++}return qLPG1Tw.join(\"\")},decompress:YVrVbv(function(...PugOol){PugOol[WydP2H[0x0]]=WydP2H[0x3];return WydP2H[0x6]==PugOol[WydP2H[0x2]]?\"\":\"\"==PugOol[WydP2H[0x2]]?WydP2H[0x6]:MyrZnn[WydP2H[0x4]]._decompress(PugOol[WydP2H[0x2]].length,0x8000,YVrVbv(function(...MyrZnn){MyrZnn[WydP2H[0x0]]=WydP2H[0x3];return PugOol[WydP2H[0x2]].charCodeAt(MyrZnn[WydP2H[0x2]])}))}),_decompress:function(MyrZnn,wQdUIp,YwPLty){var BNOmOCh,CHDWybv,MsWp2Eg,q5kdT5,tDyAgBo,YVrVbv,putCzy,Hxpsdj_=[],UkVIMy=WydP2H[0xe],g7PNjlU=WydP2H[0xe],RT3qJW_=WydP2H[0xb],qLPG1Tw=\"\",be5E4W=[],GpA0Rz={val:YwPLty(WydP2H[0x2]),position:wQdUIp,index:WydP2H[0x3]};for(BNOmOCh=WydP2H[0x2];BNOmOCh<WydP2H[0xb];BNOmOCh+=WydP2H[0x3])Hxpsdj_[BNOmOCh]=BNOmOCh;for(MsWp2Eg=WydP2H[0x2],tDyAgBo=Math.pow(WydP2H[0x1],WydP2H[0x1]),YVrVbv=WydP2H[0x3];YVrVbv!=tDyAgBo;)q5kdT5=GpA0Rz.val&GpA0Rz.position,GpA0Rz.position>>=WydP2H[0x3],WydP2H[0x2]==GpA0Rz.position&&(GpA0Rz.position=wQdUIp,GpA0Rz.val=YwPLty(GpA0Rz.index++)),MsWp2Eg|=(q5kdT5>WydP2H[0x2]?WydP2H[0x3]:WydP2H[0x2])*YVrVbv,YVrVbv<<=WydP2H[0x3];switch(MsWp2Eg){case WydP2H[0x2]:for(MsWp2Eg=WydP2H[0x2],tDyAgBo=Math.pow(WydP2H[0x1],WydP2H[0xc]),YVrVbv=WydP2H[0x3];YVrVbv!=tDyAgBo;)q5kdT5=GpA0Rz.val&GpA0Rz.position,GpA0Rz.position>>=WydP2H[0x3],WydP2H[0x2]==GpA0Rz.position&&(GpA0Rz.position=wQdUIp,GpA0Rz.val=YwPLty(GpA0Rz.index++)),MsWp2Eg|=(q5kdT5>WydP2H[0x2]?WydP2H[0x3]:WydP2H[0x2])*YVrVbv,YVrVbv<<=WydP2H[0x3];putCzy=PugOol(MsWp2Eg);break;case WydP2H[0x3]:for(MsWp2Eg=WydP2H[0x2],tDyAgBo=Math.pow(WydP2H[0x1],WydP2H[0xd]),YVrVbv=WydP2H[0x3];YVrVbv!=tDyAgBo;)q5kdT5=GpA0Rz.val&GpA0Rz.position,GpA0Rz.position>>=WydP2H[0x3],WydP2H[0x2]==GpA0Rz.position&&(GpA0Rz.position=wQdUIp,GpA0Rz.val=YwPLty(GpA0Rz.index++)),MsWp2Eg|=(q5kdT5>WydP2H[0x2]?WydP2H[0x3]:WydP2H[0x2])*YVrVbv,YVrVbv<<=WydP2H[0x3];putCzy=PugOol(MsWp2Eg);break;case WydP2H[0x1]:return\"\"}for(Hxpsdj_[WydP2H[0xb]]=putCzy,CHDWybv=putCzy,be5E4W.push(putCzy);;){if(GpA0Rz.index>MyrZnn)return\"\";for(MsWp2Eg=WydP2H[0x2],tDyAgBo=Math.pow(WydP2H[0x1],RT3qJW_),YVrVbv=WydP2H[0x3];YVrVbv!=tDyAgBo;)q5kdT5=GpA0Rz.val&GpA0Rz.position,GpA0Rz.position>>=WydP2H[0x3],WydP2H[0x2]==GpA0Rz.position&&(GpA0Rz.position=wQdUIp,GpA0Rz.val=YwPLty(GpA0Rz.index++)),MsWp2Eg|=(q5kdT5>WydP2H[0x2]?WydP2H[0x3]:WydP2H[0x2])*YVrVbv,YVrVbv<<=WydP2H[0x3];switch(putCzy=MsWp2Eg){case WydP2H[0x2]:for(MsWp2Eg=WydP2H[0x2],tDyAgBo=Math.pow(WydP2H[0x1],WydP2H[0xc]),YVrVbv=WydP2H[0x3];YVrVbv!=tDyAgBo;)q5kdT5=GpA0Rz.val&GpA0Rz.position,GpA0Rz.position>>=WydP2H[0x3],WydP2H[0x2]==GpA0Rz.position&&(GpA0Rz.position=wQdUIp,GpA0Rz.val=YwPLty(GpA0Rz.index++)),MsWp2Eg|=(q5kdT5>WydP2H[0x2]?WydP2H[0x3]:WydP2H[0x2])*YVrVbv,YVrVbv<<=WydP2H[0x3];Fj4SwuY(Hxpsdj_[g7PNjlU++]=PugOol(MsWp2Eg),putCzy=g7PNjlU-WydP2H[0x3],UkVIMy--);break;case WydP2H[0x3]:for(MsWp2Eg=WydP2H[0x2],tDyAgBo=Math.pow(WydP2H[0x1],WydP2H[0xd]),YVrVbv=WydP2H[0x3];YVrVbv!=tDyAgBo;)q5kdT5=GpA0Rz.val&GpA0Rz.position,GpA0Rz.position>>=WydP2H[0x3],WydP2H[0x2]==GpA0Rz.position&&(GpA0Rz.position=wQdUIp,GpA0Rz.val=YwPLty(GpA0Rz.index++)),MsWp2Eg|=(q5kdT5>WydP2H[0x2]?WydP2H[0x3]:WydP2H[0x2])*YVrVbv,YVrVbv<<=WydP2H[0x3];Fj4SwuY(Hxpsdj_[g7PNjlU++]=PugOol(MsWp2Eg),putCzy=g7PNjlU-WydP2H[0x3],UkVIMy--);break;case WydP2H[0x1]:return be5E4W.join(\"\")}if(WydP2H[0x2]==UkVIMy&&(UkVIMy=Math.pow(WydP2H[0x1],RT3qJW_),RT3qJW_++),Hxpsdj_[putCzy])qLPG1Tw=Hxpsdj_[putCzy];else{if(putCzy!==g7PNjlU)return WydP2H[0x6];qLPG1Tw=CHDWybv+CHDWybv.charAt(WydP2H[0x2])}Fj4SwuY(be5E4W.push(qLPG1Tw),Hxpsdj_[g7PNjlU++]=CHDWybv+qLPG1Tw.charAt(WydP2H[0x2]),CHDWybv=qLPG1Tw,WydP2H[0x2]==--UkVIMy&&(UkVIMy=Math.pow(WydP2H[0x1],RT3qJW_),RT3qJW_++))}}};return MyrZnn[WydP2H[0x4]]}(),\"function\"==tZzJOP[\"TE0C7CR\"]&&tZzJOP[\"_8iE0h\"].amd?tZzJOP[\"_8iE0h\"](function(){return iSDaP3}):WydP2H[0xf]!=tZzJOP[\"soSW4YC\"]&&WydP2H[0x6]!=tZzJOP[\"pXH_Js\"]?tZzJOP[\"pXH_Js\"].exports=iSDaP3:WydP2H[0xf]!=tZzJOP[\"xOGz1y\"]&&WydP2H[0x6]!=tZzJOP[\"ZQZggA\"]&&tZzJOP[\"ZQZggA\"].module(WydP2H[0x10],[]).factory(WydP2H[0x10],function(){return iSDaP3}),MyrZnn=void 0x0,function(){var PugOol=\"\\u15E1\\u6C29\\u416C\\u0680\\u4B30\\u5823\\u703F<\\u0298\\u0460\\u3CB4\\u03C0\\u0440\\u1EA0\\u04A0\\u1621\\u4E21\\u75F0\\u024D\\u592A\\u0238\\u0800\\u0CC2\\u404Bf\\u09D8\\u08E0\\u0E80\\u0BE0\\u0800\\u0D69\\u447C\\u205B\\u09B4e\\u147A\\xC2|\\u198C\\xC4h8\\u01A4\\u0154\\xDC\\u018D\\u4820\\u5C84\\u0824\\u72A8\\u1026\\u602C\\u202A\\u2021\\u202B\\u11F6\\u6027\\u4031\\u602A\\u6023\\u0821\\u1821\\u52A1\\u4433\\u0EA0\\u0660\\u02C6\\u3024\\u52C04\\u5420\\u4980\\u4032\\u42A0\\u0103\\u5292\\u1823\\u0C20\\u02E8\\u6748]\\u53B3\\u68AE\\u0EE0\\u0409\\u7515\\u422A\\u0520\\u1CB6\\u40A3\\u1468\\u7027\\u0961\\u4421\\u6E20\\u1B55\\u1273\\u1C78\\u29EF\\u7180\\xF0\\u3B31\\u7E11\\u3220\\u375F\\u4CE2\\u4320\\u2635\\u7BC0\\xF4\\xF6\\u62F8\\u7031\\u43DF\\u46E7\\u4946\\u0821\\u4894t\\u61B2\\u3698\\u5820\\u0CE1\\u22CD\\u1019\\u12F4\\u6620\\u17E9\\u4043\\u1CEE\\u3FAF\\u0170\\xA26\\u402D\\u57B9\\u6E97\\u25AA\\u4022\\u5570\\u58C2\\u04B0\\u11A6\\u3D4B\\u4A45\\u21A2\\u25A9\\u4346\\u3890\\u61BC\\u1A36\\u71A6\\u5466\\u2020\\u1A55\\u5880\\u1FC2\\u2319\\u7323\\u0F01\\u232C\\u1064\\u1485 \\u6F13#\\u6FE0\\u0128\\u1967\\u13E3\\u04E2\\u4443\\u4CAB\\u0A58\\u0764\\u1BA2\\u225C\\u0E5C\\u5248\\u4161\\u2932\\u106A\\u6255\\u4E8B\\u0DA1\\u509D\\u618C\\u4064\\u22D5\\u683D\\u1049\\u73A8\\u1994\\u0A48\\u7820\\u1AF8\\u3661\\u2379\\u08E1\\u3627\\u6539\\u0E20\\u37CD\\u1002\\u1D14%\\u5548\\u1254\\u4AF4\\u5FBE\\u7411\\u4E80\\u0223\\u02C4\\u2C94\\u17E3\\u0588\\u42D0\\u1C49\\u6021\\u6A2A\\u0CA6\\u0BC6\\u5027\\u0930\\u0A37\\u79F8\\u1337\\u1FA9\\u74BC\\u25BB\\u1461\\u4CC3\\u1272\\u6172\\u6CDE\\u25A8\\u4322\\u7CFC\\u373F\\u61A5\\u40E3\\u0EBB\\u43E8\\u54A8\\u2738\\u3150\\u2099\\u3CE7\\u2528\\u48C8\\u1D5B\\u01A7\\u108A\\u052B\\u2548\\u289A\\u3626\\u2729\\u56C9\\u2228\\u6501\\u20B8\\u127F\\u4806\\u3C98\\u3BA3\\u7696\\u62C5\\u1137\\u190A\\u7C7A\\u20BE\\u15D2\\u0180\\u2C67\\u2352\\u30B6\\u11A6\\u0BAE\\u5167\\u22C2\\u4B23\\u1254\\u24AA\\u092E\\u7E31\\u0B20\\u472A\\u41C8\\u232F\\u035A\\u62BD\\u0258\\u573B\\u4038\\u03A0\\u42C2\\u513B\\u02E4\\u5439\\u6BD8\\u4124\\u40D0\\u5A38\\u0150\\u23AE\\u0950 ...
|
|
65
73
|
*/
|
|
66
74
|
```
|
|
67
75
|
|
|
@@ -76,21 +76,23 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
76
76
|
var mangleNumericalLiterals = true; // 50 => state + X
|
|
77
77
|
var mangleBooleanLiterals = true; // true => state == X
|
|
78
78
|
var addWithStatement = true; // Disabling not supported yet
|
|
79
|
+
var addGeneratorFunction = true; // Wrap in generator function?
|
|
79
80
|
|
|
80
81
|
var cffPrefix = me.getPlaceholder();
|
|
81
82
|
|
|
82
83
|
// Amount of blocks changed by Control Flow Flattening
|
|
83
84
|
var cffCounter = 0;
|
|
84
|
-
var functionsModified =
|
|
85
|
+
var functionsModified = [];
|
|
85
86
|
function flagFunctionToAvoid(path, reason) {
|
|
86
87
|
var fnOrProgram = (0, _astUtils.getParentFunctionOrProgram)(path);
|
|
87
88
|
fnOrProgram.node[CFF_UNSAFE] = reason;
|
|
88
89
|
}
|
|
89
90
|
return {
|
|
90
91
|
post: function post() {
|
|
91
|
-
functionsModified.
|
|
92
|
+
for (var _i = 0, _functionsModified = functionsModified; _i < _functionsModified.length; _i++) {
|
|
93
|
+
var node = _functionsModified[_i];
|
|
92
94
|
node[_constants.UNSAFE] = true;
|
|
93
|
-
}
|
|
95
|
+
}
|
|
94
96
|
},
|
|
95
97
|
visitor: {
|
|
96
98
|
// Unsafe detection
|
|
@@ -741,7 +743,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
741
743
|
me.changeData.deadCode++;
|
|
742
744
|
}
|
|
743
745
|
};
|
|
744
|
-
for (var
|
|
746
|
+
for (var _i2 = 0; _i2 < cloneChunkCount; _i2++) {
|
|
745
747
|
_loop2();
|
|
746
748
|
}
|
|
747
749
|
}
|
|
@@ -913,17 +915,17 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
913
915
|
var fakeProperty = scopeNameGen.generate();
|
|
914
916
|
assignments.push(t.assignmentExpression("=", (0, _node.deepClone)(withMemberExpression), t.memberExpression((0, _node.deepClone)(scopeVar), t.stringLiteral(fakeProperty), true)));
|
|
915
917
|
}
|
|
916
|
-
for (var
|
|
917
|
-
var oldValue = currentStateValues[
|
|
918
|
-
var newValue = newStateValues[
|
|
918
|
+
for (var _i9 = 0; _i9 < stateVars.length; _i9++) {
|
|
919
|
+
var oldValue = currentStateValues[_i9];
|
|
920
|
+
var newValue = newStateValues[_i9];
|
|
919
921
|
|
|
920
922
|
// console.log(oldValue, newValue);
|
|
921
923
|
if (oldValue === newValue) continue; // No diff needed if the value doesn't change
|
|
922
924
|
|
|
923
|
-
var assignment = t.assignmentExpression("=", (0, _node.deepClone)(stateVars[
|
|
925
|
+
var assignment = t.assignmentExpression("=", (0, _node.deepClone)(stateVars[_i9]), (0, _node.numericLiteral)(newValue));
|
|
924
926
|
if (!isDebug && addRelativeAssignments) {
|
|
925
927
|
// Use diffs to create confusing code
|
|
926
|
-
assignment = t.assignmentExpression("+=", (0, _node.deepClone)(stateVars[
|
|
928
|
+
assignment = t.assignmentExpression("+=", (0, _node.deepClone)(stateVars[_i9]), (0, _node.numericLiteral)(newValue - oldValue));
|
|
927
929
|
}
|
|
928
930
|
assignments.push(assignment);
|
|
929
931
|
}
|
|
@@ -962,8 +964,8 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
962
964
|
var mainScope = basicBlocks.get(startLabel).scopeManager;
|
|
963
965
|
var predicateNumbers = new Map();
|
|
964
966
|
var predicateNumberCount = isDebug || !addPredicateTests ? 0 : (0, _randomUtils.getRandomInteger)(1, 4);
|
|
965
|
-
for (var
|
|
966
|
-
var name = mainScope.getNewName(me.getPlaceholder("predicate_" +
|
|
967
|
+
for (var _i3 = 0; _i3 < predicateNumberCount; _i3++) {
|
|
968
|
+
var name = mainScope.getNewName(me.getPlaceholder("predicate_" + _i3));
|
|
967
969
|
var number = (0, _randomUtils.getRandomInteger)(-250, 250);
|
|
968
970
|
predicateNumbers.set(name, number);
|
|
969
971
|
}
|
|
@@ -984,7 +986,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
984
986
|
|
|
985
987
|
// Add random assignments to impossible blocks
|
|
986
988
|
var fakeAssignmentCount = (0, _randomUtils.getRandomInteger)(1, 3);
|
|
987
|
-
for (var
|
|
989
|
+
for (var _i4 = 0; _i4 < fakeAssignmentCount; _i4++) {
|
|
988
990
|
var impossibleBlock = (0, _randomUtils.choice)(getImpossibleBasicBlocks());
|
|
989
991
|
if (impossibleBlock) {
|
|
990
992
|
var _impossibleBlock$body;
|
|
@@ -1018,7 +1020,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
1018
1020
|
(0, _randomUtils.shuffle)(blocks);
|
|
1019
1021
|
}
|
|
1020
1022
|
var _loop3 = function _loop3() {
|
|
1021
|
-
var block = _blocks[
|
|
1023
|
+
var block = _blocks[_i5];
|
|
1022
1024
|
if (block.label === endLabel) {
|
|
1023
1025
|
// ok(block.body.length === 0);
|
|
1024
1026
|
return 1; // continue
|
|
@@ -1083,19 +1085,19 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
1083
1085
|
if (!isDebug && addFakeTests && (0, _randomUtils.chance)(50)) {
|
|
1084
1086
|
// Add fake tests
|
|
1085
1087
|
var fakeTestCount = (0, _randomUtils.getRandomInteger)(1, 3);
|
|
1086
|
-
for (var
|
|
1088
|
+
for (var _i6 = 0; _i6 < fakeTestCount; _i6++) {
|
|
1087
1089
|
tests.push((0, _node.numericLiteral)(stateIntGen.generate()));
|
|
1088
1090
|
}
|
|
1089
1091
|
(0, _randomUtils.shuffle)(tests);
|
|
1090
1092
|
}
|
|
1091
1093
|
var lastTest = tests.pop();
|
|
1092
|
-
for (var
|
|
1093
|
-
var _test = _tests[
|
|
1094
|
+
for (var _i7 = 0, _tests = tests; _i7 < _tests.length; _i7++) {
|
|
1095
|
+
var _test = _tests[_i7];
|
|
1094
1096
|
switchCases.push(t.switchCase(_test, []));
|
|
1095
1097
|
}
|
|
1096
1098
|
switchCases.push(t.switchCase(lastTest, block.thisPath.node.body));
|
|
1097
1099
|
};
|
|
1098
|
-
for (var
|
|
1100
|
+
for (var _i5 = 0, _blocks = blocks; _i5 < _blocks.length; _i5++) {
|
|
1099
1101
|
if (_loop3()) continue;
|
|
1100
1102
|
}
|
|
1101
1103
|
if (!isDebug && addFakeTests) {
|
|
@@ -1125,8 +1127,8 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
1125
1127
|
var parametersNames = parameters.map(function (id) {
|
|
1126
1128
|
return id.name;
|
|
1127
1129
|
});
|
|
1128
|
-
for (var
|
|
1129
|
-
var _functionExpressions$ = _slicedToArray(_functionExpressions[
|
|
1130
|
+
for (var _i8 = 0, _functionExpressions = functionExpressions; _i8 < _functionExpressions.length; _i8++) {
|
|
1131
|
+
var _functionExpressions$ = _slicedToArray(_functionExpressions[_i8], 4),
|
|
1130
1132
|
originalFnName = _functionExpressions$[0],
|
|
1131
1133
|
fnLabel = _functionExpressions$[1],
|
|
1132
1134
|
basicBlock = _functionExpressions$[2],
|
|
@@ -1164,7 +1166,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
1164
1166
|
}
|
|
1165
1167
|
usedArgVar = true;
|
|
1166
1168
|
Object.assign(fn, new _template["default"]("\n (function (...".concat(argumentsRestName, "){\n ").concat(isDebug ? "\"Calling ".concat(originalFnName, ", Label: ").concat(fnLabel, "\";") : "", "\n return {callExpression}\n })\n \n ")).expression({
|
|
1167
|
-
callExpression:
|
|
1169
|
+
callExpression: createCallExpression(argumentsNodes)
|
|
1168
1170
|
}));
|
|
1169
1171
|
}
|
|
1170
1172
|
var startProgramObjectExpression = basicBlocks.get(startLabel).scopeManager.getObjectExpression(startLabel);
|
|
@@ -1180,13 +1182,22 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
1180
1182
|
if (!usedArgVar) {
|
|
1181
1183
|
mainParameters.pop();
|
|
1182
1184
|
}
|
|
1183
|
-
var mainFnDeclaration = t.functionDeclaration((0, _node.deepClone)(mainFnName), parameters, t.blockStatement([whileStatement]));
|
|
1185
|
+
var mainFnDeclaration = t.functionDeclaration((0, _node.deepClone)(mainFnName), parameters, t.blockStatement([whileStatement]), addGeneratorFunction);
|
|
1184
1186
|
|
|
1185
1187
|
// The main function is always called with same number of arguments
|
|
1186
1188
|
mainFnDeclaration[_constants.PREDICTABLE] = true;
|
|
1187
|
-
|
|
1189
|
+
function createCallExpression(argumentNodes) {
|
|
1190
|
+
var callExpression = t.callExpression((0, _node.deepClone)(mainFnName), argumentNodes);
|
|
1191
|
+
if (!addGeneratorFunction) {
|
|
1192
|
+
return callExpression;
|
|
1193
|
+
}
|
|
1194
|
+
return new _template["default"]("\n ({callExpression})[\"next\"]()[\"value\"];\n ").expression({
|
|
1195
|
+
callExpression: callExpression
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
var startProgramExpression = createCallExpression(startStateValues.map(function (stateValue) {
|
|
1188
1199
|
return (0, _node.numericLiteral)(stateValue);
|
|
1189
|
-
}))
|
|
1200
|
+
}));
|
|
1190
1201
|
var _resultVar = withIdentifier("result");
|
|
1191
1202
|
var isTopLevel = blockPath.isProgram();
|
|
1192
1203
|
var allowReturns = !isTopLevel && blockPath.find(function (p) {
|
|
@@ -1203,7 +1214,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
1203
1214
|
}
|
|
1204
1215
|
});
|
|
1205
1216
|
blockPath.node.body = [].concat(prependNodes, [mainFnDeclaration], _toConsumableArray(startProgramStatements));
|
|
1206
|
-
functionsModified.
|
|
1217
|
+
functionsModified.push(programOrFunctionPath.node);
|
|
1207
1218
|
|
|
1208
1219
|
// Reset all bindings here
|
|
1209
1220
|
blockPath.scope.bindings = Object.create(null);
|
|
@@ -68,8 +68,10 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
68
68
|
|
|
69
69
|
// me.log(codeTrimmed, hashCode);
|
|
70
70
|
me.changeData.functions++;
|
|
71
|
-
|
|
71
|
+
var hashName = nameGen.generate();
|
|
72
|
+
funcDecPath.node.body = t.blockStatement(new _template["default"]("\n var {hashName} = ".concat(selfCacheString, " || (").concat(selfCacheString, " = ").concat(obfuscatedHashFnName, "(").concat(newFunctionDeclaration.id.name, ", ").concat(seed, "));\n if({hashName} === ").concat(hashCode, ") {\n {originalBody}\n } else {\n {countermeasures} \n }\n ")).compile({
|
|
72
73
|
originalBody: funcDecPath.node.body.body,
|
|
74
|
+
hashName: hashName,
|
|
73
75
|
countermeasures: function countermeasures() {
|
|
74
76
|
return me.globalState.lock.createCountermeasuresCode();
|
|
75
77
|
}
|
|
@@ -79,7 +79,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
79
79
|
}
|
|
80
80
|
if (me.options.lock.selfDefending) {
|
|
81
81
|
me.options.lock.customLocks.push({
|
|
82
|
-
code: "\n (\n function(){\n // Breaks any code formatter\n var namedFunction = function(){\n const test = function(){\n const regExp=new RegExp('\\n');\n return regExp['test'](namedFunction)\n };\n\n if(test()) {\n {countermeasures}\n }\n }\n\n
|
|
82
|
+
code: "\n (\n function(){\n // Breaks any code formatter\n var namedFunction = function(){\n const test = function(){\n const regExp= new RegExp('\\n');\n return regExp['test'](namedFunction)\n };\n\n if(test()) {\n {countermeasures}\n }\n }\n\n return namedFunction();\n }\n )();\n ",
|
|
83
83
|
percentagePerBlock: 0.5
|
|
84
84
|
});
|
|
85
85
|
}
|
package/dist/transforms/pack.js
CHANGED
|
@@ -64,6 +64,10 @@ function pack(_ref) {
|
|
|
64
64
|
// Ensure bindings are removed -> variable becomes a global -> added to mappings object
|
|
65
65
|
path.scope.crawl();
|
|
66
66
|
},
|
|
67
|
+
// TODO: Add support for export statements
|
|
68
|
+
"ExportNamedDeclaration|ExportDefaultDeclaration|ExportAllDeclaration": function ExportNamedDeclarationExportDefaultDeclarationExportAllDeclaration(path) {
|
|
69
|
+
me.error("Export statements are not supported in packed code.");
|
|
70
|
+
},
|
|
67
71
|
Program: function Program(path) {
|
|
68
72
|
path.scope.crawl();
|
|
69
73
|
},
|
|
@@ -37,6 +37,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
37
37
|
var blocks = [];
|
|
38
38
|
var stringMap = new Map();
|
|
39
39
|
var stringArrayName = me.getPlaceholder() + "_array";
|
|
40
|
+
var stringArrayCacheName = me.getPlaceholder() + "_cache";
|
|
40
41
|
var encodingImplementations = Object.create(null);
|
|
41
42
|
var availableStringEncodings = me.options.customStringEncodings;
|
|
42
43
|
|
|
@@ -185,6 +186,11 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
185
186
|
(0, _astUtils.prependProgram)(programPath, t.variableDeclaration("var", [t.variableDeclarator(t.identifier(stringArrayName), t.arrayExpression(Array.from(stringMap.keys()).map(function (x) {
|
|
186
187
|
return t.stringLiteral(x);
|
|
187
188
|
})))]));
|
|
189
|
+
|
|
190
|
+
// Create the string cache
|
|
191
|
+
(0, _astUtils.prependProgram)(programPath, new _template["default"]("\n var {stringArrayCacheName} = {};\n ").single({
|
|
192
|
+
stringArrayCacheName: stringArrayCacheName
|
|
193
|
+
}));
|
|
188
194
|
for (var _i = 0, _blocks = blocks; _i < _blocks.length; _i++) {
|
|
189
195
|
var block = _blocks[_i];
|
|
190
196
|
var _ref2 = block.node[STRING_CONCEALING],
|
|
@@ -200,7 +206,7 @@ var _default = exports["default"] = function _default(_ref) {
|
|
|
200
206
|
});
|
|
201
207
|
|
|
202
208
|
// The main function to get the string value
|
|
203
|
-
var retrieveFunctionDeclaration = new _template["default"]("\n function ".concat(fnName, "(index) {\n return ").concat(decodeFnName, "(").concat(stringArrayName, "[index]);\n }\n ")).addSymbols(_constants.NO_REMOVE).single();
|
|
209
|
+
var retrieveFunctionDeclaration = new _template["default"]("\n function ".concat(fnName, "(index) {\n if (typeof ").concat(stringArrayCacheName, "[index] === 'undefined') {\n return ").concat(stringArrayCacheName, "[index] = ").concat(decodeFnName, "(").concat(stringArrayName, "[index]);\n }\n return ").concat(stringArrayCacheName, "[index];\n }\n ")).addSymbols(_constants.NO_REMOVE).single();
|
|
204
210
|
(0, _astUtils.prepend)(block, [].concat(_toConsumableArray(decoder), [retrieveFunctionDeclaration]));
|
|
205
211
|
}
|
|
206
212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-confuser",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "JavaScript Obfuscation Tool.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://js-confuser.com",
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
57
|
+
"node": ">=18.0.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -69,13 +69,14 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
69
69
|
const mangleNumericalLiterals = true; // 50 => state + X
|
|
70
70
|
const mangleBooleanLiterals = true; // true => state == X
|
|
71
71
|
const addWithStatement = true; // Disabling not supported yet
|
|
72
|
+
const addGeneratorFunction = true; // Wrap in generator function?
|
|
72
73
|
|
|
73
74
|
const cffPrefix = me.getPlaceholder();
|
|
74
75
|
|
|
75
76
|
// Amount of blocks changed by Control Flow Flattening
|
|
76
77
|
let cffCounter = 0;
|
|
77
78
|
|
|
78
|
-
const functionsModified
|
|
79
|
+
const functionsModified: t.Node[] = [];
|
|
79
80
|
|
|
80
81
|
function flagFunctionToAvoid(path: NodePath, reason: string) {
|
|
81
82
|
var fnOrProgram = getParentFunctionOrProgram(path);
|
|
@@ -85,9 +86,9 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
85
86
|
|
|
86
87
|
return {
|
|
87
88
|
post: () => {
|
|
88
|
-
|
|
89
|
+
for (var node of functionsModified) {
|
|
89
90
|
(node as NodeSymbol)[UNSAFE] = true;
|
|
90
|
-
}
|
|
91
|
+
}
|
|
91
92
|
},
|
|
92
93
|
|
|
93
94
|
visitor: {
|
|
@@ -1572,10 +1573,7 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
1572
1573
|
})
|
|
1573
1574
|
|
|
1574
1575
|
`).expression({
|
|
1575
|
-
callExpression:
|
|
1576
|
-
deepClone(mainFnName),
|
|
1577
|
-
argumentsNodes
|
|
1578
|
-
),
|
|
1576
|
+
callExpression: createCallExpression(argumentsNodes),
|
|
1579
1577
|
})
|
|
1580
1578
|
);
|
|
1581
1579
|
}
|
|
@@ -1607,15 +1605,33 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
1607
1605
|
const mainFnDeclaration = t.functionDeclaration(
|
|
1608
1606
|
deepClone(mainFnName),
|
|
1609
1607
|
parameters,
|
|
1610
|
-
t.blockStatement([whileStatement])
|
|
1608
|
+
t.blockStatement([whileStatement]),
|
|
1609
|
+
addGeneratorFunction
|
|
1611
1610
|
);
|
|
1612
1611
|
|
|
1613
1612
|
// The main function is always called with same number of arguments
|
|
1614
1613
|
(mainFnDeclaration as NodeSymbol)[PREDICTABLE] = true;
|
|
1615
1614
|
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1615
|
+
function createCallExpression(argumentNodes: t.Expression[]) {
|
|
1616
|
+
const callExpression = t.callExpression(
|
|
1617
|
+
deepClone(mainFnName),
|
|
1618
|
+
argumentNodes
|
|
1619
|
+
);
|
|
1620
|
+
|
|
1621
|
+
if (!addGeneratorFunction) {
|
|
1622
|
+
return callExpression;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
return new Template(`
|
|
1626
|
+
({callExpression})["next"]()["value"];
|
|
1627
|
+
`).expression<t.CallExpression>({
|
|
1628
|
+
callExpression: callExpression,
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
var startProgramExpression = createCallExpression(
|
|
1633
|
+
startStateValues.map((stateValue) => numericLiteral(stateValue))
|
|
1634
|
+
);
|
|
1619
1635
|
|
|
1620
1636
|
const resultVar = withIdentifier("result");
|
|
1621
1637
|
|
|
@@ -1648,7 +1664,7 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
1648
1664
|
...startProgramStatements,
|
|
1649
1665
|
];
|
|
1650
1666
|
|
|
1651
|
-
functionsModified.
|
|
1667
|
+
functionsModified.push(programOrFunctionPath.node);
|
|
1652
1668
|
|
|
1653
1669
|
// Reset all bindings here
|
|
1654
1670
|
blockPath.scope.bindings = Object.create(null);
|
|
@@ -17,8 +17,6 @@ import {
|
|
|
17
17
|
computeFunctionLength,
|
|
18
18
|
isVariableFunctionIdentifier,
|
|
19
19
|
} from "../utils/function-utils";
|
|
20
|
-
import { ok } from "assert";
|
|
21
|
-
import { Scope } from "@babel/traverse";
|
|
22
20
|
import { NameGen } from "../utils/NameGen";
|
|
23
21
|
|
|
24
22
|
export default ({ Plugin }: PluginArg): PluginObject => {
|
|
@@ -91,16 +91,19 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
91
91
|
// me.log(codeTrimmed, hashCode);
|
|
92
92
|
me.changeData.functions++;
|
|
93
93
|
|
|
94
|
+
const hashName = nameGen.generate();
|
|
95
|
+
|
|
94
96
|
funcDecPath.node.body = t.blockStatement(
|
|
95
97
|
new Template(`
|
|
96
|
-
var
|
|
97
|
-
if(
|
|
98
|
+
var {hashName} = ${selfCacheString} || (${selfCacheString} = ${obfuscatedHashFnName}(${newFunctionDeclaration.id.name}, ${seed}));
|
|
99
|
+
if({hashName} === ${hashCode}) {
|
|
98
100
|
{originalBody}
|
|
99
101
|
} else {
|
|
100
102
|
{countermeasures}
|
|
101
103
|
}
|
|
102
104
|
`).compile({
|
|
103
105
|
originalBody: funcDecPath.node.body.body,
|
|
106
|
+
hashName,
|
|
104
107
|
countermeasures: () =>
|
|
105
108
|
me.globalState.lock.createCountermeasuresCode(),
|
|
106
109
|
}),
|
|
@@ -107,7 +107,7 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
107
107
|
// Breaks any code formatter
|
|
108
108
|
var namedFunction = function(){
|
|
109
109
|
const test = function(){
|
|
110
|
-
const regExp=new RegExp('\\n');
|
|
110
|
+
const regExp= new RegExp('\\n');
|
|
111
111
|
return regExp['test'](namedFunction)
|
|
112
112
|
};
|
|
113
113
|
|
|
@@ -116,13 +116,6 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
// Prepack Breaker
|
|
120
|
-
if(Math.random() > 1) {
|
|
121
|
-
while(true) {
|
|
122
|
-
console.log("Prepack Breaker");
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
119
|
return namedFunction();
|
|
127
120
|
}
|
|
128
121
|
)();
|
package/src/transforms/pack.ts
CHANGED
|
@@ -60,6 +60,14 @@ export default function pack({ Plugin }: PluginArg): PluginObject {
|
|
|
60
60
|
// Ensure bindings are removed -> variable becomes a global -> added to mappings object
|
|
61
61
|
path.scope.crawl();
|
|
62
62
|
},
|
|
63
|
+
|
|
64
|
+
// TODO: Add support for export statements
|
|
65
|
+
"ExportNamedDeclaration|ExportDefaultDeclaration|ExportAllDeclaration"(
|
|
66
|
+
path
|
|
67
|
+
) {
|
|
68
|
+
me.error("Export statements are not supported in packed code.");
|
|
69
|
+
},
|
|
70
|
+
|
|
63
71
|
Program(path) {
|
|
64
72
|
path.scope.crawl();
|
|
65
73
|
},
|
|
@@ -45,6 +45,7 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
45
45
|
const blocks: NodePath<t.Block>[] = [];
|
|
46
46
|
const stringMap = new Map<string, number>();
|
|
47
47
|
const stringArrayName = me.getPlaceholder() + "_array";
|
|
48
|
+
const stringArrayCacheName = me.getPlaceholder() + "_cache";
|
|
48
49
|
|
|
49
50
|
let encodingImplementations: { [identity: string]: CustomStringEncoding } =
|
|
50
51
|
Object.create(null);
|
|
@@ -263,6 +264,16 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
263
264
|
])
|
|
264
265
|
);
|
|
265
266
|
|
|
267
|
+
// Create the string cache
|
|
268
|
+
prependProgram(
|
|
269
|
+
programPath,
|
|
270
|
+
new Template(`
|
|
271
|
+
var {stringArrayCacheName} = {};
|
|
272
|
+
`).single({
|
|
273
|
+
stringArrayCacheName,
|
|
274
|
+
})
|
|
275
|
+
);
|
|
276
|
+
|
|
266
277
|
for (var block of blocks) {
|
|
267
278
|
const { encodingImplementation, fnName } = (
|
|
268
279
|
block.node as NodeStringConcealing
|
|
@@ -283,7 +294,10 @@ export default ({ Plugin }: PluginArg): PluginObject => {
|
|
|
283
294
|
// The main function to get the string value
|
|
284
295
|
const retrieveFunctionDeclaration = new Template(`
|
|
285
296
|
function ${fnName}(index) {
|
|
286
|
-
|
|
297
|
+
if (typeof ${stringArrayCacheName}[index] === 'undefined') {
|
|
298
|
+
return ${stringArrayCacheName}[index] = ${decodeFnName}(${stringArrayName}[index]);
|
|
299
|
+
}
|
|
300
|
+
return ${stringArrayCacheName}[index];
|
|
287
301
|
}
|
|
288
302
|
`)
|
|
289
303
|
.addSymbols(NO_REMOVE)
|