stickcode 3.1.4 → 3.1.6
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/README.md +25 -15
- package/engine/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# StickCode Engine v3.1.
|
|
2
|
+
# StickCode Engine v3.1.6 🚀
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
@@ -23,23 +23,33 @@ npm install stickcode
|
|
|
23
23
|
|
|
24
24
|
```javascript
|
|
25
25
|
const StickCode = require('stickcode');
|
|
26
|
-
function run() {
|
|
27
|
-
try {
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
async function run() {
|
|
28
|
+
try {
|
|
29
|
+
// 1. Initialize with your unique encrypted license payload
|
|
30
|
+
await StickCode.init(process.env.STICKCODE_LICENSE);
|
|
31
31
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
const
|
|
32
|
+
// --- Option A: Standard High-Security Mode ---
|
|
33
|
+
// Automatically uses the latest encryption and compression logic
|
|
34
|
+
const sensitiveData = "Sensitive Corporate Intellectual Property";
|
|
35
|
+
const encryptedBuffer = StickCode.encrypt(sensitiveData);
|
|
35
36
|
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
// --- Option B: Compression-Only Mode (Optimized for short strings) ---
|
|
38
|
+
// Passing 'true' bypasses encryption to save weight on small payloads
|
|
39
|
+
const shortData = "Log: System OK";
|
|
40
|
+
const compressedBuffer = StickCode.encrypt(shortData, true);
|
|
41
|
+
|
|
42
|
+
// 3. Transparent Decryption
|
|
43
|
+
// The engine automatically detects the mode and applies the correct logic
|
|
44
|
+
const originalA = StickCode.decrypt(encryptedBuffer);
|
|
45
|
+
const originalB = StickCode.decrypt(compressedBuffer);
|
|
46
|
+
|
|
47
|
+
console.log("Output A:", originalA);
|
|
48
|
+
console.log("Output B:", originalB);
|
|
49
|
+
|
|
50
|
+
} catch (err) {
|
|
51
|
+
console.error("Security Alert:", err.message);
|
|
52
|
+
}
|
|
43
53
|
}
|
|
44
54
|
run();
|
|
45
55
|
```
|
package/engine/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x1ca77b=a0_0x4192;(function(_0x11d7c4,_0x41d4f9){const _0x439b06=a0_0x4192,_0x36240e=_0x11d7c4();while(!![]){try{const _0x5d5e16=-parseInt(_0x439b06(0x192))/0x1+parseInt(_0x439b06(0x161))/0x2+parseInt(_0x439b06(0x167))/0x3*(-parseInt(_0x439b06(0x15e))/0x4)+-parseInt(_0x439b06(0x189))/0x5+parseInt(_0x439b06(0x15b))/0x6*(-parseInt(_0x439b06(0x190))/0x7)+-parseInt(_0x439b06(0x17d))/0x8+parseInt(_0x439b06(0x16b))/0x9;if(_0x5d5e16===_0x41d4f9)break;else _0x36240e['push'](_0x36240e['shift']());}catch(_0x2d87c0){_0x36240e['push'](_0x36240e['shift']());}}}(a0_0x56cf,0xae68b));const crypto=require(a0_0x1ca77b(0x17e)),zlib=require(a0_0x1ca77b(0x16a)),fs=require('fs'),os=require('os'),path=require(a0_0x1ca77b(0x175)),_x1122x=a0_0x1ca77b(0x177),REG_FILE=path['join'](os[a0_0x1ca77b(0x17b)](),'.stickcode_license'),ALGO=a0_0x1ca77b(0x154);function getMachineId(){const _0x32797e=a0_0x1ca77b;return crypto[_0x32797e(0x17a)]('sha256')['update'](os['hostname']()+os['platform']()+os[_0x32797e(0x16f)]())[_0x32797e(0x18d)](_0x32797e(0x15c));}function verifyLicense(_0x49e0fd){const _0x1d6f42=a0_0x1ca77b;let _0x14abe4;if(typeof _0x49e0fd===_0x1d6f42(0x18c))try{_0x14abe4=JSON[_0x1d6f42(0x15f)](_0x49e0fd);}catch(_0x44a3fe){throw new Error('License\x20input\x20is\x20a\x20string\x20but\x20not\x20a\x20valid\x20JSON');}else _0x14abe4=_0x49e0fd;const {payload:_0x3bd262,signature:_0xa66167}=_0x14abe4;if(!_0x3bd262||!_0xa66167)throw new Error(_0x1d6f42(0x157));const _0x2f8c8f=crypto[_0x1d6f42(0x160)]('SHA256');_0x2f8c8f[_0x1d6f42(0x162)](_0x3bd262);if(!_0x2f8c8f[_0x1d6f42(0x170)](_x1122x,_0xa66167,_0x1d6f42(0x176)))throw new Error(_0x1d6f42(0x184));return JSON[_0x1d6f42(0x15f)](Buffer['from'](_0x3bd262,_0x1d6f42(0x176))[_0x1d6f42(0x187)]());}function loadRegistry(){const _0x1c8c82=a0_0x1ca77b;if(!fs['existsSync'](REG_FILE))return{'devices':[]};try{return JSON['parse'](fs[_0x1c8c82(0x181)](REG_FILE));}catch(_0x250bec){return{'devices':[]};}}function saveRegistry(_0x78f3bf){const _0x1a2c9c=a0_0x1ca77b;fs[_0x1a2c9c(0x188)](REG_FILE,JSON[_0x1a2c9c(0x164)](_0x78f3bf));}const StickCode={'VERSION':5.2,'key':null,'features':[],'init'(_0x388520){const _0x2124c9=a0_0x1ca77b,_0x59c6e8=verifyLicense(_0x388520),_0x27e845=getMachineId();let _0x33b77d=loadRegistry();if(!_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x153)](_0x27e845)){if(_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x155)]>=_0x59c6e8[_0x2124c9(0x18f)]){console[_0x2124c9(0x158)](_0x2124c9(0x186)),console['warn'](_0x2124c9(0x166)+_0x59c6e8[_0x2124c9(0x18f)]+_0x2124c9(0x171));throw new Error(_0x2124c9(0x163));}_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x174)](_0x27e845),saveRegistry(_0x33b77d);}(_0x33b77d['devices'][_0x2124c9(0x155)]>=0xa||_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x155)]===_0x59c6e8['maxDevices'])&&console['log'](_0x2124c9(0x18b)+_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x155)]+'/'+_0x59c6e8[_0x2124c9(0x18f)]),this[_0x2124c9(0x15d)]=_0x59c6e8[_0x2124c9(0x15d)]||[],this[_0x2124c9(0x156)]=crypto[_0x2124c9(0x17a)](_0x2124c9(0x159))[_0x2124c9(0x162)](_0x59c6e8['licenseId']+_0x2124c9(0x16c))[_0x2124c9(0x18d)]();},'_ensureInitialized'(){const _0x1aa8a1=a0_0x1ca77b;if(!this[_0x1aa8a1(0x156)])throw new Error(_0x1aa8a1(0x172));},'_mapToColors'(_0x1b1cf3){const _0x2d4ec3=a0_0x1ca77b,_0x50f1f0=zlib[_0x2d4ec3(0x183)](_0x1b1cf3,{'params':{[zlib['constants']['BROTLI_PARAM_QUALITY']]:0x6}}),_0x190c72=[];for(let _0x566907=0x0;_0x566907<_0x50f1f0[_0x2d4ec3(0x155)];_0x566907+=0x3){_0x190c72['push'](_0x50f1f0[_0x566907]||0x0),_0x190c72[_0x2d4ec3(0x174)](_0x50f1f0[_0x566907+0x1]||0x0),_0x190c72[_0x2d4ec3(0x174)](_0x50f1f0[_0x566907+0x2]||0x0);}return Buffer['from'](_0x190c72);},'_unmapFromColors'(_0x1aa75d){const _0x4274d3=a0_0x1ca77b;for(let _0x2fe9d6=_0x1aa75d[_0x4274d3(0x155)];_0x2fe9d6>0x0;_0x2fe9d6--){try{return zlib[_0x4274d3(0x169)](_0x1aa75d[_0x4274d3(0x180)](0x0,_0x2fe9d6));}catch(_0x50e5c0){}}throw new Error(_0x4274d3(0x168));},'encrypt'(_0x50d28c,_0x255025=0x2){const _0x10f27f=a0_0x1ca77b;this[_0x10f27f(0x185)]();const _0x3e660f=this[_0x10f27f(0x17c)](Buffer['from'](_0x50d28c)),_0x54c46c=crypto[_0x10f27f(0x17f)](0xc),_0x450c3b=crypto['createCipheriv'](ALGO,this[_0x10f27f(0x156)],_0x54c46c),_0x185b7c=Buffer[_0x10f27f(0x178)]([_0x450c3b[_0x10f27f(0x162)](_0x3e660f),_0x450c3b[_0x10f27f(0x15a)]()]),_0x24553c=_0x450c3b[_0x10f27f(0x173)](),_0x3bf601=crypto[_0x10f27f(0x17f)](_0x255025*0x2),_0x2d1758=crypto['randomBytes'](0x5);if(_0x255025===0x2)return Buffer[_0x10f27f(0x178)]([Buffer['from']([_0x255025]),_0x3bf601,_0x54c46c,_0x24553c,_0x185b7c]);else{if(_0x255025===0x3)return Buffer[_0x10f27f(0x178)]([Buffer['from']([_0x255025]),_0x54c46c,_0x2d1758,_0x185b7c,_0x24553c,_0x3bf601]);}throw new Error(_0x10f27f(0x18a)+_0x255025);},'decrypt'(_0x5aa7d3){const _0x3862af=a0_0x1ca77b;this['_ensureInitialized']();const _0x5d85c2=_0x5aa7d3[0x0];let _0x555519,_0x32808d,_0x21a705;switch(_0x5d85c2){case 0x2:{const _0x53c0be=_0x5d85c2*0x2,_0x2d451a=0x1+_0x53c0be;_0x555519=_0x5aa7d3[_0x3862af(0x180)](_0x2d451a,_0x2d451a+0xc),_0x32808d=_0x5aa7d3[_0x3862af(0x180)](_0x2d451a+0xc,_0x2d451a+0x1c),_0x21a705=_0x5aa7d3[_0x3862af(0x180)](_0x2d451a+0x1c);break;}case 0x3:{const _0x381406=_0x5d85c2*0x2,_0x49bb7f=0x1+0xc+0x5+0x10+_0x381406;if(_0x5aa7d3[_0x3862af(0x155)]<_0x49bb7f)throw new Error(_0x3862af(0x18e));_0x555519=_0x5aa7d3['slice'](0x1,0xd),_0x32808d=_0x5aa7d3[_0x3862af(0x180)](_0x5aa7d3[_0x3862af(0x155)]-0x10-_0x381406,_0x5aa7d3[_0x3862af(0x155)]-_0x381406),_0x21a705=_0x5aa7d3[_0x3862af(0x180)](0x12,_0x5aa7d3[_0x3862af(0x155)]-0x10-_0x381406);break;}default:throw new Error(_0x3862af(0x16d)+_0x5d85c2['toString'](0x10)['padStart'](0x2,'0'));}const _0x2a0dc3=crypto[_0x3862af(0x182)](ALGO,this[_0x3862af(0x156)],_0x555519);_0x2a0dc3[_0x3862af(0x191)](_0x32808d);const _0x1b2947=Buffer[_0x3862af(0x178)]([_0x2a0dc3[_0x3862af(0x162)](_0x21a705),_0x2a0dc3[_0x3862af(0x15a)]()]);return _0x5d85c2===0x2||_0x5d85c2===0x3?this[_0x3862af(0x165)](_0x1b2947)[_0x3862af(0x187)]():_0x1b2947[_0x3862af(0x187)]();},'resetDevices'(){saveRegistry({'devices':[]});}};module[a0_0x1ca77b(0x16e)]=StickCode;function a0_0x4192(_0x1ea63e,_0x2fe041){_0x1ea63e=_0x1ea63e-0x153;const _0x56cf25=a0_0x56cf();let _0x419211=_0x56cf25[_0x1ea63e];return _0x419211;}function a0_0x56cf(){const _0x15e666=['string','digest','Payload\x20too\x20short\x20for\x20V3\x20structure','maxDevices','259wwGfHj','setAuthTag','716864sELdty','includes','aes-256-gcm','length','key','Invalid\x20license\x20format:\x20missing\x20payload\x20or\x20signature','warn','sha256','final','11226aLqkQc','hex','features','5246932XPhrER','parse','createVerify','2284638pxKvKR','update','Device\x20limit\x20reached','stringify','_unmapFromColors','Current\x20license\x20allows\x20a\x20maximum\x20of\x20','3suEfrz','Failed\x20to\x20restore\x20data\x20from\x20color\x20map.','brotliDecompressSync','zlib','26876349ryATuz','STATIC_SALT_882','Unsupported\x20payload\x20version:\x200x','exports','arch','verify','\x20devices.','StickCode\x20Error:\x20Security\x20engine\x20not\x20initialized.\x20Please\x20call\x20.init(license)\x20first.','getAuthTag','push','path','base64','-----BEGIN\x20PUBLIC\x20KEY-----\x0aMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bkpTd0NHw8SMK0HGAEj\x0ayJW9fK0/mBXTuyCDL4lkNMReu3tTGECZ5xuS96T5xKRk8ylHzVs+hlSEb4rjpDIS\x0avoYLC+fG3aB8YAz8NZ4jT3FXxa+gKo5IIwlEunt5ppi8PyQetUjtuqboxtKhlj8q\x0aME7D/Ro6BoSVvAdczDQj7JIdj390V3vT8K3/aPXJFl/j+AWwSMGAYLT1tlDwZR2V\x0aiaAfmbKa5PSFZ5Mg77YQ6jbKOplymmwUmFcpIzrY7U6DjRRwPwoBh+4wlDQ8Urid\x0a4kZB8IagfHj/ChRPgY/bBsBw+37krmhB0UUp4M1XezmyXvwKKF4ZK2XGDDrG0TkH\x0abQIDAQAB\x0a-----END\x20PUBLIC\x20KEY-----','concat','devices','createHash','homedir','_mapToColors','7858976NkFKTE','crypto','randomBytes','slice','readFileSync','createDecipheriv','brotliCompressSync','Invalid\x20license\x20signature','_ensureInitialized','\x0a[StickCode\x20Warning]\x20Device\x20limit\x20reached.','toString','writeFileSync','1670025cbzOek','Unsupported\x20encryption\x20version:\x20','[StickCode\x20Info]\x20Active\x20nodes:\x20'];a0_0x56cf=function(){return _0x15e666;};return a0_0x56cf();}
|
|
1
|
+
const a0_0x403b88=a0_0x2b7a;(function(_0x4dd16a,_0x2ad314){const _0x59ff99=a0_0x2b7a,_0x4259fe=_0x4dd16a();while(!![]){try{const _0x9b2f5f=parseInt(_0x59ff99(0xe4))/0x1*(parseInt(_0x59ff99(0xb0))/0x2)+parseInt(_0x59ff99(0xea))/0x3+parseInt(_0x59ff99(0xbe))/0x4*(-parseInt(_0x59ff99(0xdb))/0x5)+parseInt(_0x59ff99(0xc6))/0x6*(-parseInt(_0x59ff99(0xe7))/0x7)+parseInt(_0x59ff99(0xf3))/0x8*(-parseInt(_0x59ff99(0x111))/0x9)+parseInt(_0x59ff99(0xc4))/0xa+parseInt(_0x59ff99(0x104))/0xb;if(_0x9b2f5f===_0x2ad314)break;else _0x4259fe['push'](_0x4259fe['shift']());}catch(_0xbd741){_0x4259fe['push'](_0x4259fe['shift']());}}}(a0_0xe7f9,0x38000));const crypto=require('crypto'),zlib=require(a0_0x403b88(0xae)),fs=require('fs'),https=require(a0_0x403b88(0x10f)),os=require('os'),path=require(a0_0x403b88(0xcf)),dns=require(a0_0x403b88(0xe5));function __checkIntegrity(){const _0x1444e9=a0_0x403b88,_0x22d11b=(function(){let _0x1d0b0a=!![];return function(_0x1dba44,_0x52cd98){const _0x51cfbd=_0x1d0b0a?function(){if(_0x52cd98){const _0xa3c0b3=_0x52cd98['apply'](_0x1dba44,arguments);return _0x52cd98=null,_0xa3c0b3;}}:function(){};return _0x1d0b0a=![],_0x51cfbd;};}()),_0x5a4492=_0x22d11b(this,function(){const _0x48839c=a0_0x2b7a;return _0x5a4492[_0x48839c(0xaf)]()[_0x48839c(0xc3)](_0x48839c(0xbd))[_0x48839c(0xaf)]()[_0x48839c(0xb2)](_0x5a4492)['search']('(((.+)+)+)+$');});_0x5a4492();const _0x4f4996=(function(){let _0x31fead=!![];return function(_0x7aac92,_0x4021be){const _0x1fcdc2=_0x31fead?function(){const _0x4bb5af=a0_0x2b7a;if(_0x4021be){const _0x27c493=_0x4021be[_0x4bb5af(0xb7)](_0x7aac92,arguments);return _0x4021be=null,_0x27c493;}}:function(){};return _0x31fead=![],_0x1fcdc2;};}());(function(){_0x4f4996(this,function(){const _0x51b2cf=a0_0x2b7a,_0xbfbfb8=new RegExp(_0x51b2cf(0xb3)),_0x4ace3c=new RegExp(_0x51b2cf(0xda),'i'),_0x3a79d2=_0x5946a6(_0x51b2cf(0xa7));!_0xbfbfb8[_0x51b2cf(0x107)](_0x3a79d2+'chain')||!_0x4ace3c[_0x51b2cf(0x107)](_0x3a79d2+'input')?_0x3a79d2('0'):_0x5946a6();})();}());try{const _0x4b4e92=fs[_0x1444e9(0xd3)](__filename,_0x1444e9(0xfc))[_0x1444e9(0xfa)]();if(!/\/\/[a-f0-9]{64}$/[_0x1444e9(0x107)](_0x4b4e92))return;const _0x447267=_0x4b4e92[_0x1444e9(0xe1)](0x0,-0x42)[_0x1444e9(0xfa)](),_0x5170ee=_0x4b4e92[_0x1444e9(0xe1)](-0x40),_0xb6efa2=crypto['createHash'](_0x1444e9(0xa9))['update'](_0x447267)[_0x1444e9(0xdd)](_0x1444e9(0x106));_0xb6efa2!==_0x5170ee&&process['exit'](0x1);}catch(_0x48268a){process['exit'](0x1);}}__checkIntegrity();function a0_0x2b7a(_0x2b7e85,_0x4487d0){_0x2b7e85=_0x2b7e85-0xa7;const _0x2c363d=a0_0xe7f9();let _0x5946a6=_0x2c363d[_0x2b7e85];return _0x5946a6;}const PUBLIC_KEY=a0_0x403b88(0xd8),SERVER_PUBLIC_KEY=a0_0x403b88(0x10c),SERVER_URL='https://endpoint.freenbuy.com/api/license/verify-device',REG_FILE=path[a0_0x403b88(0xad)](__dirname,a0_0x403b88(0xeb)),ALGO=a0_0x403b88(0xd0);function getMachineId(){const _0x5df8c9=a0_0x403b88;return crypto[_0x5df8c9(0xd9)](_0x5df8c9(0xa9))['update'](os[_0x5df8c9(0xee)]()+os[_0x5df8c9(0xab)]()+os[_0x5df8c9(0xb9)]())[_0x5df8c9(0xdd)](_0x5df8c9(0x106));}function verifyLicense(_0x23c6fd){const _0x5ebd41=a0_0x403b88;let _0x10609a;if(typeof _0x23c6fd==='string')try{_0x10609a=JSON['parse'](_0x23c6fd);}catch(_0x271fc7){throw new Error(_0x5ebd41(0xf4));}else _0x10609a=_0x23c6fd;const {payload:_0x2d6224,signature:_0x458cbb}=_0x10609a;if(!_0x2d6224||!_0x458cbb)throw new Error(_0x5ebd41(0xb1));const _0x595898=crypto[_0x5ebd41(0x10d)](_0x5ebd41(0xed));_0x595898['update'](_0x2d6224);if(!_0x595898['verify'](PUBLIC_KEY,_0x458cbb,_0x5ebd41(0xe9)))throw new Error(_0x5ebd41(0xe0));return JSON[_0x5ebd41(0xd7)](Buffer[_0x5ebd41(0xa8)](_0x2d6224,_0x5ebd41(0xe9))[_0x5ebd41(0xaf)]());}function a0_0xe7f9(){const _0x1f5e05=['getAuthTag','106803FKwrWu','init','from','sha256','BROTLI_PARAM_QUALITY','platform','_ensureInitialized','join','zlib','toString','2vCKLMD','Invalid\x20license\x20format:\x20missing\x20payload\x20or\x20signature','constructor','function\x20*\x5c(\x20*\x5c)','stringify','concat','Security\x20Error:\x20Registry\x20data\x20corrupted\x20or\x20license\x20mismatch.','apply','brotliCompressSync','arch','write','lookup','exports','(((.+)+)+)+$','4pRdSia','POST','statusCode','features','Connection\x20failed','search','3434380YYKThZ','log','12QJoeze','while\x20(true)\x20{}','string','push','length','existsSync','signature','Security\x20Error:\x20No\x20internet\x20connection\x20detected.\x20An\x20active\x20connection\x20is\x20required\x20for\x20first-time\x20activation.','Security\x20Error:\x20Invalid\x20registry\x20signature.','path','aes-256-gcm','key','payload','readFileSync','port','protocol','google.com','parse','-----BEGIN\x20PUBLIC\x20KEY-----\x0aMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bkpTd0NHw8SMK0HGAEj\x0ayJW9fK0/mBXTuyCDL4lkNMReu3tTGECZ5xuS96T5xKRk8ylHzVs+hlSEb4rjpDIS\x0avoYLC+fG3aB8YAz8NZ4jT3FXxa+gKo5IIwlEunt5ppi8PyQetUjtuqboxtKhlj8q\x0aME7D/Ro6BoSVvAdczDQj7JIdj390V3vT8K3/aPXJFl/j+AWwSMGAYLT1tlDwZR2V\x0aiaAfmbKa5PSFZ5Mg77YQ6jbKOplymmwUmFcpIzrY7U6DjRRwPwoBh+4wlDQ8Urid\x0a4kZB8IagfHj/ChRPgY/bBsBw+37krmhB0UUp4M1XezmyXvwKKF4ZK2XGDDrG0TkH\x0abQIDAQAB\x0a-----END\x20PUBLIC\x20KEY-----','createHash','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','988415UWIokC','_requestTokenFromServer','digest','https:','update','Invalid\x20license\x20signature','slice','size','unlinkSync','209837BKrDso','dns','end','559244fNgjCK','randomBytes','base64','834297ZLAEeS','.device_registry','brotliDecompressSync','SHA256','hostname','constants','_unmapFromColors','Failed\x20to\x20restore\x20data\x20from\x20color\x20map.','counter','176qngQBU','License\x20input\x20is\x20a\x20string\x20but\x20not\x20a\x20valid\x20JSON','error','createCipheriv','final','StickCode:\x20Using\x20Version\x204\x20(Advanced\x20Layout)','licenseId','trim','call','utf8','machineId','token','byteLength','_mapToColors','writeFileSync','setAuthTag','Unsupported\x20encryption\x20version:\x20','181973OAkgot','Security\x20Error:\x20Device\x20mismatch.\x20This\x20installation\x20is\x20locked\x20to\x20another\x20machine.','hex','test','verify','debu','gger','Unknown\x20Mode','-----BEGIN\x20PUBLIC\x20KEY-----\x0aMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk8Lb2GgF/ea6ajTPc7Q+\x0aFwfWZ6NVMJnGlrKDKl18vEG9J+n3C+VnUoT2x5RLj6JKNXBd14HcsrI9TDEzRm3p\x0ayV/OHqbRKKfsto/42WOY/zpKsNGvyt16PRpTB27xtsvVxmDjZaOkVndbO8/dM6kg\x0avhFtFH28bdZtCI5dz1OC3qrnIMlDe1Dgb6wnWzyeZaTyy84EfltR0gq4XZK/rw53\x0a4/NQwfUidlBNR7fkVSvEND7B4G/9vr/2edPrXFwOZUSCtzUNsrM7ylq9+S7Yb+NM\x0aLILG57Jc4Gu+Mt/xqlFqCrNAfqT4oc+2/K6A6BJxO1vIU0mvJGYhoWD18vx/PfgE\x0aaQIDAQAB\x0a-----END\x20PUBLIC\x20KEY-----','createVerify','Security:\x20','https'];a0_0xe7f9=function(){return _0x1f5e05;};return a0_0xe7f9();}function loadRegistry(){const _0x22d39f=a0_0x403b88;if(!fs[_0x22d39f(0xcb)](REG_FILE))return null;try{return JSON[_0x22d39f(0xd7)](fs[_0x22d39f(0xd3)](REG_FILE));}catch(_0x3d80b6){return null;}}function saveRegistry(_0x38051b){const _0x2b52c9=a0_0x403b88;fs[_0x2b52c9(0x101)](REG_FILE,JSON['stringify'](_0x38051b));}const StickCode={'VERSION':5.2,'LATEST_VERSION':0x4,'key':null,'features':[],async 'init'(_0x29e4c1){const _0x3e1589=a0_0x403b88,_0x44bc48=verifyLicense(_0x29e4c1),_0x1d558d=getMachineId();let _0x240276=![];const _0x27704b=fs[_0x3e1589(0xcb)](REG_FILE)&&fs['statSync'](REG_FILE)[_0x3e1589(0xe2)]>0x0;if(_0x27704b){const _0x496771=loadRegistry();if(_0x496771&&_0x496771[_0x3e1589(0xfe)]&&_0x496771[_0x3e1589(0xf9)]===_0x44bc48[_0x3e1589(0xf9)])try{const _0x2f8ddc=crypto[_0x3e1589(0x10d)](_0x3e1589(0xed)),_0x49264c=Buffer[_0x3e1589(0xa8)](_0x496771[_0x3e1589(0xfe)][_0x3e1589(0xd2)],_0x3e1589(0xe9))[_0x3e1589(0xaf)]();_0x2f8ddc[_0x3e1589(0xdf)](_0x49264c);if(_0x2f8ddc[_0x3e1589(0x108)](SERVER_PUBLIC_KEY,_0x496771[_0x3e1589(0xfe)][_0x3e1589(0xcc)],'base64')){const _0x1a4b62=JSON[_0x3e1589(0xd7)](_0x49264c);if(_0x1a4b62[_0x3e1589(0xfd)]===_0x1d558d)_0x240276=!![];else throw new Error(_0x3e1589(0x105));}else throw new Error(_0x3e1589(0xce));}catch(_0x5d692a){throw _0x5d692a;}else throw new Error(_0x3e1589(0xb6));}if(!_0x27704b&&!_0x240276){try{await new Promise((_0x4f7bb4,_0x3fb678)=>{const _0x23aaf4=_0x3e1589;dns[_0x23aaf4(0xbb)](_0x23aaf4(0xd6),_0x43b8fb=>{if(_0x43b8fb)_0x3fb678(_0x43b8fb);else _0x4f7bb4();});});}catch(_0x373f42){throw new Error(_0x3e1589(0xcd));}const _0x514682=await this[_0x3e1589(0xdc)](_0x29e4c1,_0x1d558d);if(!_0x514682['success'])throw new Error(_0x3e1589(0x10e)+(_0x514682['error']||'Device\x20not\x20authorized'));const _0xfce62e={'licenseId':_0x44bc48[_0x3e1589(0xf9)],'token':_0x514682[_0x3e1589(0xfe)]};saveRegistry(_0xfce62e);}this['features']=_0x44bc48[_0x3e1589(0xc1)]||[],this['key']=crypto['createHash'](_0x3e1589(0xa9))[_0x3e1589(0xdf)](_0x44bc48['licenseId']+'STATIC_SALT_882')[_0x3e1589(0xdd)]();},'_requestTokenFromServer'(_0x344d6f,_0x38a8ce){return new Promise((_0x49000f,_0x319b7c)=>{const _0x25394c=a0_0x2b7a,_0x3f5387=JSON[_0x25394c(0xb4)]({'encryptedPayload':_0x344d6f[_0x25394c(0xd2)],'signature':_0x344d6f['signature'],'machineId':_0x38a8ce}),_0x4acf7a=new URL(SERVER_URL),_0x5a22fb={'hostname':_0x4acf7a[_0x25394c(0xee)],'port':_0x4acf7a[_0x25394c(0xd4)],'path':_0x4acf7a['pathname'],'method':_0x25394c(0xbf),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x25394c(0xff)](_0x3f5387)}},_0x368a6a=(_0x4acf7a[_0x25394c(0xd5)]===_0x25394c(0xde)?https:require('http'))['request'](_0x5a22fb,_0x481c7b=>{const _0x412f20=_0x25394c;let _0x28e16d='';_0x481c7b['on']('data',_0x4647e7=>_0x28e16d+=_0x4647e7),_0x481c7b['on'](_0x412f20(0xe6),()=>{const _0x3cd318=_0x412f20;_0x481c7b[_0x3cd318(0xc0)]===0xc8?_0x49000f(JSON['parse'](_0x28e16d)):_0x49000f({'success':![],'error':'Server\x20returned\x20'+_0x481c7b['statusCode']+(_0x28e16d?':\x20'+_0x28e16d:'')});});});_0x368a6a['on'](_0x25394c(0xf5),_0x17c81c=>{const _0x49674a=_0x25394c;_0x49000f({'success':![],'error':_0x49674a(0xc2)});}),_0x368a6a[_0x25394c(0xba)](_0x3f5387),_0x368a6a[_0x25394c(0xe6)]();});},'_ensureInitialized'(){const _0x4acdad=a0_0x403b88;if(!this[_0x4acdad(0xd1)])throw new Error('StickCode\x20Error:\x20Security\x20engine\x20not\x20initialized.\x20Please\x20call\x20.init(license)\x20first.');},'_mapToColors'(_0x474166){const _0x26702f=a0_0x403b88;let _0x4e650c=zlib[_0x26702f(0xb8)](_0x474166,{'params':{[zlib[_0x26702f(0xef)][_0x26702f(0xaa)]]:0x6}});const _0xf301de=0x30;if(_0x4e650c[_0x26702f(0xca)]<_0xf301de){const _0x467dfa=crypto[_0x26702f(0xe8)](_0xf301de-_0x4e650c[_0x26702f(0xca)]);_0x4e650c=Buffer[_0x26702f(0xb5)]([_0x4e650c,_0x467dfa]);}_0x4e650c=Buffer[_0x26702f(0xb5)]([_0x4e650c,crypto[_0x26702f(0xe8)](0x8)]);const _0x54d313=[];for(let _0x55d97b=0x0;_0x55d97b<_0x4e650c[_0x26702f(0xca)];_0x55d97b+=0x3){_0x54d313[_0x26702f(0xc9)](_0x4e650c[_0x55d97b]||0x0),_0x54d313['push'](_0x4e650c[_0x55d97b+0x1]||0x0),_0x54d313[_0x26702f(0xc9)](_0x4e650c[_0x55d97b+0x2]||0x0);}return Buffer[_0x26702f(0xa8)](_0x54d313);},'_unmapFromColors'(_0x45166b){const _0x5f5a3b=a0_0x403b88;for(let _0x1b1c44=_0x45166b[_0x5f5a3b(0xca)];_0x1b1c44>0x4;_0x1b1c44--){try{return zlib[_0x5f5a3b(0xec)](_0x45166b[_0x5f5a3b(0xe1)](0x0,_0x1b1c44));}catch(_0x17737c){}}throw new Error(_0x5f5a3b(0xf1));},'encrypt'(_0xa4df98,_0x1a52ab=this['LATEST_VERSION']){const _0x403a56=a0_0x403b88;this[_0x403a56(0xac)]();_0x1a52ab===!![]&&(_0x1a52ab=0x0);const _0x2e8fdb=this[_0x403a56(0x100)](Buffer['from'](_0xa4df98));if(_0x1a52ab===0x0)return Buffer[_0x403a56(0xb5)]([Buffer[_0x403a56(0xa8)]([0x0]),_0x2e8fdb]);const _0xb598d=crypto['randomBytes'](0xc),_0x11296d=crypto[_0x403a56(0xf6)](ALGO,this['key'],_0xb598d),_0x306162=Buffer['concat']([_0x11296d[_0x403a56(0xdf)](_0x2e8fdb),_0x11296d[_0x403a56(0xf7)]()]),_0x305197=_0x11296d[_0x403a56(0x110)](),_0x37d1b0=crypto[_0x403a56(0xe8)](_0x1a52ab*0x2),_0x45b109=crypto[_0x403a56(0xe8)](0x5);if(_0x1a52ab===0x2)return Buffer[_0x403a56(0xb5)]([Buffer[_0x403a56(0xa8)]([_0x1a52ab]),_0x37d1b0,_0xb598d,_0x305197,_0x306162]);else{if(_0x1a52ab===0x3)return Buffer[_0x403a56(0xb5)]([Buffer[_0x403a56(0xa8)]([_0x1a52ab]),_0xb598d,_0x45b109,_0x306162,_0x305197,_0x37d1b0]);else{if(_0x1a52ab===0x4){console[_0x403a56(0xc5)](_0x403a56(0xf8));const _0x9ca1eb=crypto[_0x403a56(0xe8)](0x3),_0x2ca5fc=crypto[_0x403a56(0xe8)](0x2),_0x4a4cbb=crypto['randomBytes'](0x5);return Buffer['concat']([Buffer[_0x403a56(0xa8)]([_0x1a52ab]),_0x9ca1eb,_0x305197,_0x2ca5fc,_0xb598d,_0x306162,_0x4a4cbb]);}}}throw new Error(_0x403a56(0x103)+_0x1a52ab);},'decrypt'(_0x405406){const _0x33bdbb=a0_0x403b88;try{this[_0x33bdbb(0xac)]();const _0x49b410=_0x405406[0x0];let _0x41cb2b,_0x393e2a,_0x2636c2;switch(_0x49b410){case 0x0:{return this[_0x33bdbb(0xf0)](_0x405406[_0x33bdbb(0xe1)](0x1))[_0x33bdbb(0xaf)]();}case 0x2:{const _0x27c3bf=_0x49b410*0x2,_0x2bb2d6=0x1+_0x27c3bf;_0x41cb2b=_0x405406['slice'](_0x2bb2d6,_0x2bb2d6+0xc),_0x393e2a=_0x405406[_0x33bdbb(0xe1)](_0x2bb2d6+0xc,_0x2bb2d6+0x1c),_0x2636c2=_0x405406[_0x33bdbb(0xe1)](_0x2bb2d6+0x1c);break;}case 0x3:{const _0x402228=_0x49b410*0x2;_0x41cb2b=_0x405406[_0x33bdbb(0xe1)](0x1,0xd),_0x393e2a=_0x405406[_0x33bdbb(0xe1)](_0x405406['length']-0x10-_0x402228,_0x405406[_0x33bdbb(0xca)]-_0x402228),_0x2636c2=_0x405406['slice'](0x12,_0x405406[_0x33bdbb(0xca)]-0x10-_0x402228);break;}case 0x4:{_0x393e2a=_0x405406[_0x33bdbb(0xe1)](0x4,0x14),_0x41cb2b=_0x405406[_0x33bdbb(0xe1)](0x16,0x22),_0x2636c2=_0x405406['slice'](0x22,Math['max'](0x22,_0x405406['length']-0x5));break;}default:throw new Error(_0x33bdbb(0x10b));}const _0x18c562=crypto['createDecipheriv'](ALGO,this['key'],_0x41cb2b);_0x18c562[_0x33bdbb(0x102)](_0x393e2a);const _0x8d7d0e=Buffer['concat']([_0x18c562[_0x33bdbb(0xdf)](_0x2636c2),_0x18c562['final']()]);return _0x49b410===0x2||_0x49b410===0x3||_0x49b410===0x4?this[_0x33bdbb(0xf0)](_0x8d7d0e)['toString']():_0x8d7d0e[_0x33bdbb(0xaf)]();}catch(_0x2727a9){try{return zlib['brotliDecompressSync'](_0x405406)[_0x33bdbb(0xaf)]();}catch(_0x52c636){return _0x405406['toString']();}}},'resetDevices'(){const _0x2124e7=a0_0x403b88;fs[_0x2124e7(0xcb)](REG_FILE)&&fs[_0x2124e7(0xe3)](REG_FILE);}};module[a0_0x403b88(0xbc)]=StickCode;function _0x5946a6(_0xa78802){function _0x54a87f(_0x20eded){const _0x2a4a07=a0_0x2b7a;if(typeof _0x20eded===_0x2a4a07(0xc8))return function(_0x2bf8e4){}[_0x2a4a07(0xb2)](_0x2a4a07(0xc7))[_0x2a4a07(0xb7)](_0x2a4a07(0xf2));else(''+_0x20eded/_0x20eded)[_0x2a4a07(0xca)]!==0x1||_0x20eded%0x14===0x0?function(){return!![];}[_0x2a4a07(0xb2)]('debu'+_0x2a4a07(0x10a))[_0x2a4a07(0xfb)]('action'):function(){return![];}[_0x2a4a07(0xb2)](_0x2a4a07(0x109)+_0x2a4a07(0x10a))['apply']('stateObject');_0x54a87f(++_0x20eded);}try{if(_0xa78802)return _0x54a87f;else _0x54a87f(0x0);}catch(_0x4e5be1){}}//0cedd873d08244b717eae85502258a4addc733f1114f4cb12c6c387494dc11c6
|