stickcode 3.1.6 → 3.1.8
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 +72 -111
- package/engine/.device_registry +1 -0
- package/engine/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,168 +1,129 @@
|
|
|
1
|
+
# 🛡️ StickCode Engine v3.1.8 (Core v6.0)
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
**Enterprise-grade binary encryption and storage optimization layer for Node.js.**
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
StickCode is a high-performance database storage optimization and cryptographic security framework designed to protect source assets, environment parameters, and heavy system payloads. By chaining an adjustable **Brotli Tuning Pipeline** directly into an **AES-256-GCM Authenticated Encryption** workflow, StickCode delivers a runtime "Shield-and-Shrink" engine that eliminates database storage inflation while enforcing un-bypassable polymorphic layout protection.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
---
|
|
7
8
|
|
|
8
|
-
StickCode is a high-performance security layer designed to protect intellectual property and sensitive corporate data. By combining **AES-256-GCM Authenticated Encryption** with **Brotli-11 Compression**, StickCode provides a "Shield-and-Shrink" solution that optimizes storage costs while enforcing military-grade security.
|
|
9
|
-
|
|
10
9
|
## 📖 Extended Documentation
|
|
11
10
|
|
|
12
|
-
For
|
|
13
|
-
|
|
11
|
+
For comprehensive system implementation manuals, database byte-schema examples, and advanced cluster deployment blueprints:
|
|
14
12
|
👉 [https://stickcode.freenbuy.com/docs](https://stickcode.freenbuy.com/docs)
|
|
15
|
-
|
|
13
|
+
|
|
16
14
|
## 📦 Installation
|
|
17
15
|
|
|
18
16
|
```bash
|
|
19
17
|
npm install stickcode
|
|
20
18
|
```
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🛠️ Quick Start
|
|
23
23
|
|
|
24
24
|
```javascript
|
|
25
25
|
const StickCode = require('stickcode');
|
|
26
26
|
|
|
27
27
|
async function run() {
|
|
28
28
|
try {
|
|
29
|
-
// 1. Initialize
|
|
29
|
+
// 1. Initialize engine and authenticate host hardware fingerprint
|
|
30
30
|
await StickCode.init(process.env.STICKCODE_LICENSE);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
// Automatically uses the latest encryption and compression logic
|
|
34
|
-
const sensitiveData = "Sensitive Corporate Intellectual Property";
|
|
35
|
-
const encryptedBuffer = StickCode.encrypt(sensitiveData);
|
|
32
|
+
const sensitiveData = "Secure Corporate PII, API Tokens, or Complex JSON Payload";
|
|
36
33
|
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
const shortData = "Log: System OK";
|
|
40
|
-
const compressedBuffer = StickCode.encrypt(shortData, true);
|
|
34
|
+
// 2. Secure Mode (V4 Layout Default) — Balanced Q4 Brotli compression + full AES-GCM envelope
|
|
35
|
+
const secureBlob = StickCode.encrypt(sensitiveData);
|
|
41
36
|
|
|
42
|
-
// 3.
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const originalB = StickCode.decrypt(compressedBuffer);
|
|
37
|
+
// 3. Optimized Mode (Compression Only) — Ultra-fast Q1 compression, bypassing block ciphers
|
|
38
|
+
const rawHash = "7fef61729296f4dd3397d10019217c09";
|
|
39
|
+
const compressedBlob = StickCode.encrypt(rawHash, true, { quality: 1 });
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
// 4. Automated Decryption Hierarchy
|
|
42
|
+
// The core engine reads internal bit-markers to unpack both topologies seamlessly
|
|
43
|
+
const originalText = StickCode.decrypt(secureBlob);
|
|
44
|
+
const originalHash = StickCode.decrypt(compressedBlob);
|
|
49
45
|
|
|
46
|
+
console.log("Integrity Status: 100% Verified");
|
|
50
47
|
} catch (err) {
|
|
51
|
-
console.error("Security
|
|
48
|
+
console.error("Security Engine Exception:", err.message);
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
run();
|
|
55
52
|
```
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## 🛡️ Future-Proof Security: Dynamic Logic Rotation
|
|
61
|
-
|
|
62
|
-
✨ **Key Features**
|
|
63
|
-
|
|
64
|
-
🔒 **Authenticated Encryption (AEAD):** Uses AES-256-GCM to ensure data confidentiality and Integrity. Any attempt to tamper with the encrypted bytes will be detected instantly.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
📉 **Brotli-11 Compression:** Industry-leading data density, significantly reducing cloud storage costs and bandwidth usage.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
🛡️ **Proprietary Binary Layout:** Utilizing a moving-target defense, StickCode obfuscates the internal structure of encrypted payloads, making automated pattern recognition impossible.
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
---
|
|
75
55
|
|
|
76
|
-
|
|
56
|
+
## ⚙️ Compression Quality vs. CPU Latency Tuning
|
|
77
57
|
|
|
78
|
-
|
|
58
|
+
StickCode v6.0 hands full control of the dictionary compilation over to developers via the `options.quality` configuration parameter (accepting scales from `1` to `11`). Selecting the proper level is highly critical as it determines the trade-off between spatial shrinkage and CPU execution times on your app threads:
|
|
79
59
|
|
|
80
|
-
|
|
60
|
+
| Quality Level | Targeting Allocation | Transaction Latency | Production Impact & Use-Case |
|
|
61
|
+
| :--- | :--- | :--- | :--- |
|
|
62
|
+
| **Levels 1 - 4** | Ultra-Fast Live Web Threads | 1.8ms – 125ms | **Highly Recommended for Live Applications.** Delivers excellent spatial compression (~66% reductions on heavy payloads) with sub-millisecond responses. Built for real-time transactional API endpoints and high-volume database reads. |
|
|
63
|
+
| **Levels 5 - 9** | Balanced Storage Pipelines | 200ms – 850ms | **Recommended for Asynchronous Contexts.** Increases compression factors for static data layouts at a manageable processing cost. Perfect for automated log compression routines or scheduled database backups. |
|
|
64
|
+
| **Levels 10 - 11**| Cold Archives / Offline Storage | 1.3s – 10.8s | **Severe CPU Resource Lock.** Shrinks files down to the absolute mathematical minimum, but holds application threads for seconds. **Never use on live web request paths.** Reserve strictly for offline background workers. |
|
|
81
65
|
|
|
82
|
-
|
|
66
|
+
---
|
|
83
67
|
|
|
84
|
-
|
|
68
|
+
## 📊 Production Performance Benchmarks
|
|
85
69
|
|
|
86
|
-
|
|
70
|
+
The following metrics represent real-world execution tests evaluated against standard node execution threads using a 1.50 MB JSON document baseline:
|
|
87
71
|
|
|
88
|
-
|
|
72
|
+
* **Native Brotli (Level 11 - Google Max):** 478,128 Bytes | **9,641.42 ms** *(Severe thread blockage)*
|
|
73
|
+
* **Stick Compress Only (Q 4):** 523,687 Bytes | **112.40 ms**
|
|
74
|
+
* **Stick Encrypted V4 (Q 4):** 523,715 Bytes | **124.05 ms**
|
|
89
75
|
|
|
90
|
-
|
|
76
|
+
> ⚡ **Performance Factor:** StickCode Encrypted V4 runs **77.7x faster** than Google's standard Level 11 Brotli compression on identical data targets, while injecting full military-grade AES block ciphers with zero database byte bloat (only a minor 28 to 46-byte overhead).
|
|
91
77
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Legacy Compatibility: The decrypt() method automatically identifies the version and applies the corresponding legacy logic.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Zero-Action Updates: Your existing data remains fully accessible even after upgrading to newer, more secure engine versions.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
💾 **Storage & Networking Best Practices**
|
|
103
|
-
|
|
104
|
-
StickCode outputs a raw binary Buffer. To maintain the integrity and efficiency of the data, follow these guidelines:
|
|
105
|
-
|
|
106
|
-
**1. File Storage**
|
|
107
|
-
|
|
108
|
-
Save the output directly as binary files (e.g., .sc or .bin). Never convert the output to a standard string (like UTF-8) as it will corrupt the binary structure.
|
|
109
|
-
|
|
110
|
-
```javascript
|
|
111
|
-
const secureBuffer = StickCode.encrypt(data);
|
|
112
|
-
fs.writeFileSync('secure_storage.bin', secureBuffer);
|
|
113
|
-
```
|
|
78
|
+
---
|
|
114
79
|
|
|
115
|
-
|
|
80
|
+
## ✨ Flexible Core Processing Modes
|
|
116
81
|
|
|
117
|
-
|
|
82
|
+
### 1. Secure Mode (V4 Polymorphic Layout)
|
|
83
|
+
The engine writes an unpredictable binary structural layout envelope. It separates internal tags and initialization vectors, then injects dynamic randomized junk allocations into three alternating locations. This forces a volatile visual binary signature, rendering pattern-based decompiling attempts completely ineffective.
|
|
118
84
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
85
|
+
### 2. Optimized Mode (Compression Only)
|
|
86
|
+
Engaged by passing `true` as the secondary execution mode argument. It completely strips down the block-cipher layer, routing payload variables purely through Brotli and color map routines. This completely avoids unnecessary cryptographic processing on records that are already hardened at source (e.g., pre-hashed MD5/SHA metrics).
|
|
122
87
|
|
|
123
|
-
|
|
88
|
+
---
|
|
124
89
|
|
|
125
|
-
|
|
126
|
-
Header: Content-Type: application/octet-stream
|
|
90
|
+
## 🔑 Seat-Based Licensing & Hardware Locks
|
|
127
91
|
|
|
128
|
-
|
|
92
|
+
StickCode enforces a decentralized, zero-dependency **Node-Bound Allocation Allotment**:
|
|
129
93
|
|
|
130
|
-
|
|
94
|
+
* **System Fingerprinting:** Upon execution, the engine queries environment specifications (`os.hostname()`, `os.platform()`, and `os.arch()`) to calculate an anonymous, immutable SHA-256 host node identifier.
|
|
95
|
+
* **Local Security Registry:** Authorized tokens received from the cloud licensing services are securely compiled into an environmental cache file (`.device_registry`). Future runs match identifiers locally to bypass external cloud pings.
|
|
96
|
+
* **Authentication Flushes:** Deleting the local registry token file triggers an immediate verification call to `https://endpoint.freenbuy.com` on the following engine initialization cycle.
|
|
131
97
|
|
|
132
|
-
|
|
133
|
-
anonymous hardware signature.
|
|
98
|
+
---
|
|
134
99
|
|
|
135
|
-
|
|
100
|
+
## 🛠️ Complete API Reference
|
|
136
101
|
|
|
137
|
-
|
|
138
|
-
|
|
102
|
+
### `async StickCode.init(licenseInput)`
|
|
103
|
+
Validates the asymmetric crypt-signature of your RSA-2048 license object, validates system integrity parameters, and initializes host salting variables.
|
|
104
|
+
* `licenseInput` `(String | Object)`: The exact payload and signature block allocated upon transaction.
|
|
139
105
|
|
|
140
|
-
|
|
106
|
+
### `StickCode.encrypt(text, mode, options)`
|
|
107
|
+
Compiles plain-text structures into deeply optimized, ciphered binary allocations.
|
|
108
|
+
* `text` `(String | Buffer)`: The target payload variable.
|
|
109
|
+
* `mode` `(Number | Boolean)`: Set to `0x04` for full encryption layout, or `true` for pure spatial compression.
|
|
110
|
+
* `options` `(Object)`: Configuration properties block (e.g., `{ quality: 4 }` to adjust Brotli latency).
|
|
111
|
+
* **Returns:** `Buffer` (Raw un-encoded binary asset block).
|
|
141
112
|
|
|
142
|
-
StickCode.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Returns
|
|
146
|
-
StickCode.encrypt(data, version = 0x02)
|
|
147
|
-
Compresses the input and wraps it in an encrypted authenticated envelope.
|
|
148
|
-
data: String or Buffer.
|
|
149
|
-
Returns: Buffer (The encrypted binary blob).
|
|
150
|
-
StickCode.decrypt(buffer)
|
|
151
|
-
Validates the integrity, decrypts, and decompresses the data.
|
|
152
|
-
buffer: The StickCode binary blob.
|
|
153
|
-
Returns: String (The original data).
|
|
113
|
+
### `StickCode.decrypt(buffer)`
|
|
114
|
+
Examines the initial layout markers, resolves automated architectural fallbacks, decrypts blocks, and decompresses byte allocations back into a clean string stream.
|
|
115
|
+
* `buffer` `(Buffer)`: A valid output block generated from a matching `.encrypt()` transaction.
|
|
116
|
+
* **Returns:** `String` (Original un-packed data string asset).
|
|
154
117
|
|
|
155
|
-
|
|
156
|
-
|
|
118
|
+
### `StickCode.resetDevices()`
|
|
119
|
+
Purges the local environment `.device_registry` caching layer to re-trigger internet cloud verification cycles. *Note: This does not release device seat capacities from the central remote database pool.*
|
|
157
120
|
|
|
158
|
-
|
|
121
|
+
---
|
|
159
122
|
|
|
160
|
-
|
|
161
|
-
Usage is governed by the LICENSE.md file included in this package.
|
|
123
|
+
## ⚖️ License & Legal Copyright
|
|
162
124
|
|
|
163
|
-
|
|
125
|
+
**Proprietary Software — Commercial Terms Apply.** Copyright © 2026 StickCode by FreeNbuy. All Rights Reserved.
|
|
164
126
|
|
|
165
|
-
|
|
166
|
-
Email: contact@freenbuy.com
|
|
127
|
+
Unauthorized replication, redistribution, package reverse-engineering, modification, or binary extraction of this framework is strictly prohibited under legal protective infrastructures. Usage boundaries are governed by the specific agreements accompanied within your vendor acquisition contracts.
|
|
167
128
|
|
|
168
|
-
|
|
129
|
+
**Technical Inquiries & Enterprise Sales Contact:** contact@freenbuy.com
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"licenseId":"LIC-2026-HDKLS","token":{"payload":"eyJtYWNoaW5lSWQiOiI3N2VhYzg0NDdmYTBkZjVkOGVkMzgyZGMxNTFhYWU3MTUzMWI1NTFlMDBlZDRjNDUwNDg2ZDg1ZTFmMTAzOTZjIiwibGljZW5zZUlkIjoiTElDLTIwMjYtSERLTFMiLCJ0aW1lc3RhbXAiOjE3Nzk3MjYwMTAzMDB9","signature":"dKOz78I+hQzUVwpLXdO9D9IGVBijgdgPbMNnbbt2WEHpbKFqG4Jhj1TCeNxkYcjmmD3dthjPf6TKilifNaGjQRlXryHYxVeS26Lg6qf+bzsvgHgQX0Du0omJYjsUp+FgvU02irRa0X52P+SjUTBbF4PZHh3O0JYDn6DaQjM62ErBKG8JwGVPdHRd3V1xiGzEq2LV4+XfkmC7aLjpidIpIlIFQaZ4O4EURE0L0fwM5+N/fy2M0UboqbmABA+eFJW5pAimHzMyCvIe4U4tbjMMN23dz5N3EbVegyBkCgJMBDpT8BPmYYex7yw7CsxhMy+UQgEOa8MiMi4yOwEUwQSLQQ=="}}
|
package/engine/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
1
|
+
const a0_0x2cb24b=a0_0x4afe;(function(_0x144ca2,_0x46d8a3){const _0x4fce4e=a0_0x4afe,_0x4894e9=_0x144ca2();while(!![]){try{const _0x984e63=parseInt(_0x4fce4e(0x1a5))/0x1*(parseInt(_0x4fce4e(0x1dc))/0x2)+-parseInt(_0x4fce4e(0x1b4))/0x3+parseInt(_0x4fce4e(0x194))/0x4+-parseInt(_0x4fce4e(0x1be))/0x5+parseInt(_0x4fce4e(0x19d))/0x6*(-parseInt(_0x4fce4e(0x1bd))/0x7)+-parseInt(_0x4fce4e(0x1a8))/0x8*(parseInt(_0x4fce4e(0x1d4))/0x9)+parseInt(_0x4fce4e(0x1c2))/0xa*(parseInt(_0x4fce4e(0x18b))/0xb);if(_0x984e63===_0x46d8a3)break;else _0x4894e9['push'](_0x4894e9['shift']());}catch(_0x5bb108){_0x4894e9['push'](_0x4894e9['shift']());}}}(a0_0xf7b6,0x9ef47));function a0_0x4afe(_0x5d40ab,_0x1631a0){_0x5d40ab=_0x5d40ab-0x184;const _0x1e8e1e=a0_0xf7b6();let _0x31bb56=_0x1e8e1e[_0x5d40ab];return _0x31bb56;}const crypto=require(a0_0x2cb24b(0x1cb)),zlib=require(a0_0x2cb24b(0x18a)),fs=require('fs'),https=require(a0_0x2cb24b(0x1d2)),os=require('os'),path=require(a0_0x2cb24b(0x1ac)),dns=require('dns');function __checkIntegrity(){const _0x101d33=a0_0x2cb24b,_0x581a5e=(function(){let _0x56712f=!![];return function(_0xae76e0,_0x206b09){const _0x30d52a=_0x56712f?function(){const _0x54a77a=a0_0x4afe;if(_0x206b09){const _0x395eb9=_0x206b09[_0x54a77a(0x185)](_0xae76e0,arguments);return _0x206b09=null,_0x395eb9;}}:function(){};return _0x56712f=![],_0x30d52a;};}()),_0x37754b=_0x581a5e(this,function(){const _0x489509=a0_0x4afe;return _0x37754b['toString']()[_0x489509(0x1e6)](_0x489509(0x1e2))[_0x489509(0x1c9)]()['constructor'](_0x37754b)[_0x489509(0x1e6)]('(((.+)+)+)+$');});_0x37754b();const _0x1a6b18=(function(){let _0x2e5e18=!![];return function(_0x5ad476,_0x5df2e1){const _0xa8c56f=_0x2e5e18?function(){const _0x5dbd1d=a0_0x4afe;if(_0x5df2e1){const _0x106314=_0x5df2e1[_0x5dbd1d(0x185)](_0x5ad476,arguments);return _0x5df2e1=null,_0x106314;}}:function(){};return _0x2e5e18=![],_0xa8c56f;};}());(function(){_0x1a6b18(this,function(){const _0x2bb9c1=a0_0x4afe,_0x55e17f=new RegExp('function\x20*\x5c(\x20*\x5c)'),_0x3a70b6=new RegExp(_0x2bb9c1(0x1e0),'i'),_0x5a9c59=_0x31bb56(_0x2bb9c1(0x1ca));!_0x55e17f[_0x2bb9c1(0x195)](_0x5a9c59+_0x2bb9c1(0x188))||!_0x3a70b6[_0x2bb9c1(0x195)](_0x5a9c59+_0x2bb9c1(0x198))?_0x5a9c59('0'):_0x31bb56();})();}());try{const _0x32b5d8=fs[_0x101d33(0x1ab)](__filename,'utf8')[_0x101d33(0x1b2)]();if(!/\/\/[a-f0-9]{64}$/[_0x101d33(0x195)](_0x32b5d8))return;const _0x45acbb=_0x32b5d8[_0x101d33(0x1a4)](0x0,-0x42)['trim'](),_0x512d24=_0x32b5d8[_0x101d33(0x1a4)](-0x40),_0x4b40e5=crypto[_0x101d33(0x1a9)](_0x101d33(0x1b5))['update'](_0x45acbb)[_0x101d33(0x197)](_0x101d33(0x196));_0x4b40e5!==_0x512d24&&process['exit'](0x1);}catch(_0x533fc5){process[_0x101d33(0x1d7)](0x1);}}__checkIntegrity();const PUBLIC_KEY=a0_0x2cb24b(0x1ad),SERVER_PUBLIC_KEY='-----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-----',SERVER_URL=a0_0x2cb24b(0x1bb),REG_FILE=path[a0_0x2cb24b(0x1b6)](__dirname,a0_0x2cb24b(0x19f)),ALGO=a0_0x2cb24b(0x1db),VERSION_COMPRESS_ONLY=0x0,VERSION_V4=0x4,IV_LENGTH=0xc,TAG_LENGTH=0x10;function a0_0xf7b6(){const _0x18d0fb=['error','Invalid\x20license\x20signature','constructor','toString','init','crypto','setAuthTag','while\x20(true)\x20{}','concat','Invalid\x20server\x20response','machineId','_compress','https','action','351fsBnFU','constants','BROTLI_PARAM_QUALITY','exit','platform','subarray','stringify','aes-256-gcm','50mHMdIh','existsSync','lookup','Invalid\x20license\x20format','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','update','(((.+)+)+)+$','byteLength','createCipheriv','hostname','search','brotliCompressSync','apply','License\x20input\x20is\x20a\x20string\x20but\x20not\x20valid\x20JSON','success','chain','Connection\x20failed','zlib','21804002ShMFLx','base64','parse','Activation\x20failed','_decompress','features','allocUnsafe','createDecipheriv','writeFileSync','19244OysEYp','test','hex','digest','input','createVerify','copy','token','debu','312QdVJYN','end','.device_registry','brotliDecompressSync','getAuthTag','data','No\x20internet\x20connection\x20for\x20activation.','slice','28297IQeIXV','unlinkSync','gger','249256hBsqPq','createHash','string','readFileSync','path','-----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-----','verify','POST','Security\x20Error:\x20Device\x20mismatch.','port','trim','pathname','2944281XpiMDN','sha256','join','final','licenseId','length','payload','https://endpoint.freenbuy.com/api/license/verify-device','write','169561gRRPYr','2846875dPUyzd','request','signature','key','20eqcQlE','_requestTokenFromServer','from','randomBytes'];a0_0xf7b6=function(){return _0x18d0fb;};return a0_0xf7b6();}function getMachineId(){const _0x50f841=a0_0x2cb24b;return crypto[_0x50f841(0x1a9)](_0x50f841(0x1b5))['update'](os[_0x50f841(0x1e5)]()+os[_0x50f841(0x1d8)]()+os['arch']())['digest'](_0x50f841(0x196));}function verifyLicense(_0x3fdfc6){const _0x57ebb6=a0_0x2cb24b;let _0x331f8d;if(typeof _0x3fdfc6===_0x57ebb6(0x1aa))try{_0x331f8d=JSON['parse'](_0x3fdfc6);}catch(_0x2629f8){throw new Error(_0x57ebb6(0x186));}else _0x331f8d=_0x3fdfc6;const {payload:_0x5a538b,signature:_0x803e44}=_0x331f8d;if(!_0x5a538b||!_0x803e44)throw new Error(_0x57ebb6(0x1df));const _0x37373c=crypto[_0x57ebb6(0x199)]('SHA256');_0x37373c[_0x57ebb6(0x1e1)](_0x5a538b);const _0x10e42a=_0x37373c[_0x57ebb6(0x1ae)](PUBLIC_KEY,_0x803e44,'base64');if(!_0x10e42a)throw new Error(_0x57ebb6(0x1c7));return JSON['parse'](Buffer['from'](_0x5a538b,_0x57ebb6(0x18c))[_0x57ebb6(0x1c9)]());}function loadRegistry(){const _0x81bcdf=a0_0x2cb24b;if(!fs['existsSync'](REG_FILE))return null;try{return JSON[_0x81bcdf(0x18d)](fs[_0x81bcdf(0x1ab)](REG_FILE));}catch(_0x1735f5){return null;}}function saveRegistry(_0x3d511c){const _0x1afdd6=a0_0x2cb24b;fs[_0x1afdd6(0x193)](REG_FILE,JSON['stringify'](_0x3d511c));}const StickCode={'VERSION':0x6,'LATEST_VERSION':VERSION_V4,'key':null,'features':[],async 'init'(_0x4afec3){const _0x10abd3=a0_0x2cb24b,_0x349aee=verifyLicense(_0x4afec3),_0x19add9=getMachineId();let _0x50e3d1=![];const _0x5d4f06=fs[_0x10abd3(0x1dd)](REG_FILE);if(_0x5d4f06){const _0x19309e=loadRegistry();if(_0x19309e&&_0x19309e[_0x10abd3(0x19b)]&&_0x19309e[_0x10abd3(0x1b8)]===_0x349aee[_0x10abd3(0x1b8)])try{const _0x5e2bb5=crypto['createVerify']('SHA256'),_0xc32725=Buffer['from'](_0x19309e['token'][_0x10abd3(0x1ba)],_0x10abd3(0x18c))[_0x10abd3(0x1c9)]();_0x5e2bb5['update'](_0xc32725);const _0x94cfb4=_0x5e2bb5[_0x10abd3(0x1ae)](SERVER_PUBLIC_KEY,_0x19309e[_0x10abd3(0x19b)][_0x10abd3(0x1c0)],_0x10abd3(0x18c));if(!_0x94cfb4)throw new Error('Security\x20Error:\x20Invalid\x20registry\x20signature.');const _0x39fad2=JSON[_0x10abd3(0x18d)](_0xc32725);if(_0x39fad2[_0x10abd3(0x1d0)]!==_0x19add9)throw new Error(_0x10abd3(0x1b0));_0x50e3d1=!![];}catch(_0x40faa1){throw _0x40faa1;}else throw new Error('Security\x20Error:\x20Registry\x20corrupted.');}if(!_0x5d4f06&&!_0x50e3d1){try{await new Promise((_0xe90161,_0x3fa978)=>{const _0x4b4898=_0x10abd3;dns[_0x4b4898(0x1de)]('google.com',_0x394a63=>{if(_0x394a63)_0x3fa978(_0x394a63);else _0xe90161();});});}catch(_0x43b87d){throw new Error(_0x10abd3(0x1a3));}const _0x288dc4=await this[_0x10abd3(0x1c3)](_0x4afec3,_0x19add9);if(!_0x288dc4[_0x10abd3(0x187)])throw new Error(_0x288dc4['error']||_0x10abd3(0x18e));saveRegistry({'licenseId':_0x349aee[_0x10abd3(0x1b8)],'token':_0x288dc4[_0x10abd3(0x19b)]});}this[_0x10abd3(0x190)]=_0x349aee[_0x10abd3(0x190)]||[],this[_0x10abd3(0x1c1)]=crypto[_0x10abd3(0x1a9)](_0x10abd3(0x1b5))[_0x10abd3(0x1e1)](_0x349aee[_0x10abd3(0x1b8)]+'STATIC_SALT_882')[_0x10abd3(0x197)]();},'_requestTokenFromServer'(_0x4482ce,_0x529063){return new Promise(_0x21082e=>{const _0xb50dcb=a0_0x4afe,_0xbb98e1=JSON[_0xb50dcb(0x1da)]({'encryptedPayload':_0x4482ce[_0xb50dcb(0x1ba)],'signature':_0x4482ce[_0xb50dcb(0x1c0)],'machineId':_0x529063}),_0x1f147f=new URL(SERVER_URL),_0x4cec55={'hostname':_0x1f147f['hostname'],'port':_0x1f147f[_0xb50dcb(0x1b1)],'path':_0x1f147f[_0xb50dcb(0x1b3)],'method':_0xb50dcb(0x1af),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0xb50dcb(0x1e3)](_0xbb98e1)}},_0x53fd02=https[_0xb50dcb(0x1bf)](_0x4cec55,_0x4db6c9=>{const _0x67cad5=_0xb50dcb;let _0x2cd850='';_0x4db6c9['on'](_0x67cad5(0x1a2),_0x2a66df=>_0x2cd850+=_0x2a66df),_0x4db6c9['on'](_0x67cad5(0x19e),()=>{const _0x9ef6=_0x67cad5;try{_0x21082e(JSON[_0x9ef6(0x18d)](_0x2cd850));}catch{_0x21082e({'success':![],'error':_0x9ef6(0x1cf)});}});});_0x53fd02['on'](_0xb50dcb(0x1c6),()=>{const _0x109b61=_0xb50dcb;_0x21082e({'success':![],'error':_0x109b61(0x189)});}),_0x53fd02[_0xb50dcb(0x1bc)](_0xbb98e1),_0x53fd02[_0xb50dcb(0x19e)]();});},'_ensureInitialized'(){const _0x8b0679=a0_0x2cb24b;if(!this[_0x8b0679(0x1c1)])throw new Error('StickCode\x20not\x20initialized');},'_compress'(_0x44b55a,_0x4d24b5=0x4){const _0x3e12cc=a0_0x2cb24b;return zlib[_0x3e12cc(0x184)](_0x44b55a,{'params':{[zlib[_0x3e12cc(0x1d5)][_0x3e12cc(0x1d6)]]:_0x4d24b5,[zlib[_0x3e12cc(0x1d5)]['BROTLI_PARAM_MODE']]:zlib['constants']['BROTLI_MODE_TEXT']}});},'_decompress'(_0x35e9a4){const _0x27024f=a0_0x2cb24b;return zlib[_0x27024f(0x1a0)](_0x35e9a4);},'encrypt'(_0x301310,_0x457100=VERSION_V4,_0x347260={}){const _0x2e3de9=a0_0x2cb24b;this['_ensureInitialized']();typeof _0x457100==='object'&&_0x457100!==null&&(_0x347260=_0x457100,_0x457100=VERSION_V4);_0x457100===!![]&&(_0x457100=VERSION_COMPRESS_ONLY);const _0x3ed8bf=_0x347260['quality']||0x4,_0x150b8d=Buffer['isBuffer'](_0x301310)?_0x301310:Buffer[_0x2e3de9(0x1c4)](_0x301310);if(_0x457100===VERSION_COMPRESS_ONLY){const _0x170189=this[_0x2e3de9(0x1d1)](_0x150b8d,_0x3ed8bf),_0x285126=Buffer[_0x2e3de9(0x191)](0x1+_0x170189[_0x2e3de9(0x1b9)]);return _0x285126[0x0]=VERSION_COMPRESS_ONLY,_0x170189[_0x2e3de9(0x19a)](_0x285126,0x1),_0x285126;}const _0x2149bb=this[_0x2e3de9(0x1d1)](_0x150b8d,_0x3ed8bf),_0x327d64=crypto[_0x2e3de9(0x1c5)](IV_LENGTH),_0xcceda0=crypto[_0x2e3de9(0x1e4)](ALGO,this['key'],_0x327d64),_0xab1253=Buffer[_0x2e3de9(0x1ce)]([_0xcceda0[_0x2e3de9(0x1e1)](_0x2149bb),_0xcceda0[_0x2e3de9(0x1b7)]()]),_0x44033e=_0xcceda0[_0x2e3de9(0x1a1)](),_0x19f753=0x1+IV_LENGTH+TAG_LENGTH+_0xab1253[_0x2e3de9(0x1b9)],_0x341b2d=Buffer[_0x2e3de9(0x191)](_0x19f753);let _0x432edc=0x0;return _0x341b2d[_0x432edc++]=_0x457100,_0x327d64[_0x2e3de9(0x19a)](_0x341b2d,_0x432edc),_0x432edc+=IV_LENGTH,_0x44033e['copy'](_0x341b2d,_0x432edc),_0x432edc+=TAG_LENGTH,_0xab1253[_0x2e3de9(0x19a)](_0x341b2d,_0x432edc),_0x341b2d;},'decrypt'(_0x219455){const _0x504ba9=a0_0x2cb24b;this['_ensureInitialized']();try{const _0x2f7b16=_0x219455[0x0];if(_0x2f7b16===VERSION_COMPRESS_ONLY)return this['_decompress'](_0x219455['subarray'](0x1))[_0x504ba9(0x1c9)]();let _0x4b496a=0x1;const _0x2dbeb3=_0x219455[_0x504ba9(0x1d9)](_0x4b496a,_0x4b496a+IV_LENGTH);_0x4b496a+=IV_LENGTH;const _0x17404e=_0x219455[_0x504ba9(0x1d9)](_0x4b496a,_0x4b496a+TAG_LENGTH);_0x4b496a+=TAG_LENGTH;const _0xd6400c=_0x219455['subarray'](_0x4b496a),_0x5d47bd=crypto[_0x504ba9(0x192)](ALGO,this[_0x504ba9(0x1c1)],_0x2dbeb3);_0x5d47bd[_0x504ba9(0x1cc)](_0x17404e);const _0x3269c8=Buffer['concat']([_0x5d47bd[_0x504ba9(0x1e1)](_0xd6400c),_0x5d47bd['final']()]);return this[_0x504ba9(0x18f)](_0x3269c8)[_0x504ba9(0x1c9)]();}catch(_0xc424d3){try{return zlib[_0x504ba9(0x1a0)](_0x219455)['toString']();}catch{return _0x219455[_0x504ba9(0x1c9)]();}}},'resetDevices'(){const _0xa1a07e=a0_0x2cb24b;fs[_0xa1a07e(0x1dd)](REG_FILE)&&fs[_0xa1a07e(0x1a6)](REG_FILE);}};module['exports']=StickCode;function _0x31bb56(_0xf2d376){function _0x2bff76(_0x333d3e){const _0xb22dec=a0_0x4afe;if(typeof _0x333d3e===_0xb22dec(0x1aa))return function(_0x3a9735){}[_0xb22dec(0x1c8)](_0xb22dec(0x1cd))['apply']('counter');else(''+_0x333d3e/_0x333d3e)[_0xb22dec(0x1b9)]!==0x1||_0x333d3e%0x14===0x0?function(){return!![];}['constructor'](_0xb22dec(0x19c)+_0xb22dec(0x1a7))['call'](_0xb22dec(0x1d3)):function(){return![];}[_0xb22dec(0x1c8)]('debu'+'gger')[_0xb22dec(0x185)]('stateObject');_0x2bff76(++_0x333d3e);}try{if(_0xf2d376)return _0x2bff76;else _0x2bff76(0x0);}catch(_0x426884){}}//6eada29837f6e691b9b65ab1d3c7764d46d748f76c7b659fef3bb81c9d5bb2df
|