stickcode 3.1.7 → 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/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
|
package/engine/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x286897=a0_0xd173;function a0_0x55a5(){const _0x260497=['_requestTokenFromServer','hostname','init','toString','update','join','sha256','2063376CHUbnl','getAuthTag','License\x20input\x20is\x20a\x20string\x20but\x20not\x20valid\x20JSON','debu','unlinkSync','machineId','payload','platform','POST','stateObject','-----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-----','constructor','12AAZcBH','writeFileSync','32193513dwQTnG','existsSync','end','readFileSync','licenseId','google.com','chain','utf8','subarray','createVerify','concat','9fXfoko','BROTLI_PARAM_MODE','digest','2WNclMc','No\x20internet\x20connection\x20for\x20activation.','randomBytes','16312cSkPqB','282288iisWkz','verify','brotliCompressSync','string','BROTLI_PARAM_QUALITY','475Jaeaae','_compress','features','103928JfJzxV','STATIC_SALT_882','Security\x20Error:\x20Device\x20mismatch.','data','port','gger','trim','511bIQImA','key','signature','exit','base64','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','from','BROTLI_PARAM_SIZE_HINT','apply','Invalid\x20license\x20format','constants','search','stringify','parse','length','createCipheriv','createHash','test','aes-256-gcm','https://endpoint.freenbuy.com/api/license/verify-device','byteLength','arch','error','Connection\x20failed','call','token','counter','BROTLI_MODE_TEXT','Activation\x20failed','application/json','copy','allocUnsafe','https','(((.+)+)+)+$','SHA256','13231490RBOkVD','_ensureInitialized','final','brotliDecompressSync','write','.device_registry','_decompress','StickCode\x20not\x20initialized','dns','setAuthTag','Security\x20Error:\x20Invalid\x20registry\x20signature.','1320250ImMWRe','Security\x20Error:\x20Registry\x20corrupted.','Invalid\x20server\x20response','function\x20*\x5c(\x20*\x5c)','action','slice','hex'];a0_0x55a5=function(){return _0x260497;};return a0_0x55a5();}(function(_0x5efcee,_0x4ed70e){const _0x19c485=a0_0xd173,_0x35b446=_0x5efcee();while(!![]){try{const _0x18c4b7=-parseInt(_0x19c485(0x203))/0x1+parseInt(_0x19c485(0x22d))/0x2*(-parseInt(_0x19c485(0x211))/0x3)+parseInt(_0x19c485(0x230))/0x4*(-parseInt(_0x19c485(0x236))/0x5)+-parseInt(_0x19c485(0x231))/0x6+-parseInt(_0x19c485(0x1d5))/0x7*(parseInt(_0x19c485(0x239))/0x8)+parseInt(_0x19c485(0x22a))/0x9*(parseInt(_0x19c485(0x1f8))/0xa)+-parseInt(_0x19c485(0x21f))/0xb*(-parseInt(_0x19c485(0x21d))/0xc);if(_0x18c4b7===_0x4ed70e)break;else _0x35b446['push'](_0x35b446['shift']());}catch(_0x48fd2b){_0x35b446['push'](_0x35b446['shift']());}}}(a0_0x55a5,0xd1b6d));const crypto=require('crypto'),zlib=require('zlib'),fs=require('fs'),https=require(a0_0x286897(0x1f5)),os=require('os'),path=require('path'),dns=require(a0_0x286897(0x200));function __checkIntegrity(){const _0x3f1d9f=a0_0x286897,_0x277820=(function(){let _0x39f2eb=!![];return function(_0x463eee,_0x56d591){const _0x5f57d7=_0x39f2eb?function(){if(_0x56d591){const _0x57c8d7=_0x56d591['apply'](_0x463eee,arguments);return _0x56d591=null,_0x57c8d7;}}:function(){};return _0x39f2eb=![],_0x5f57d7;};}()),_0x29e4b6=_0x277820(this,function(){const _0x46a375=a0_0xd173;return _0x29e4b6[_0x46a375(0x20d)]()[_0x46a375(0x1e0)]('(((.+)+)+)+$')[_0x46a375(0x20d)]()[_0x46a375(0x21c)](_0x29e4b6)[_0x46a375(0x1e0)](_0x46a375(0x1f6));});_0x29e4b6();const _0x2b8606=(function(){let _0x32030e=!![];return function(_0x190a05,_0x171c23){const _0x2957b6=_0x32030e?function(){if(_0x171c23){const _0x1f5b0f=_0x171c23['apply'](_0x190a05,arguments);return _0x171c23=null,_0x1f5b0f;}}:function(){};return _0x32030e=![],_0x2957b6;};}());(function(){_0x2b8606(this,function(){const _0x3f2efc=a0_0xd173,_0x48cbd5=new RegExp(_0x3f2efc(0x206)),_0x51b1ed=new RegExp(_0x3f2efc(0x1da),'i'),_0x13931f=_0x323e42(_0x3f2efc(0x20c));!_0x48cbd5[_0x3f2efc(0x1e6)](_0x13931f+_0x3f2efc(0x225))||!_0x51b1ed[_0x3f2efc(0x1e6)](_0x13931f+'input')?_0x13931f('0'):_0x323e42();})();}());try{const _0x14fab1=fs[_0x3f1d9f(0x222)](__filename,_0x3f1d9f(0x226))[_0x3f1d9f(0x1d4)]();if(!/\/\/[a-f0-9]{64}$/[_0x3f1d9f(0x1e6)](_0x14fab1))return;const _0x525ff4=_0x14fab1['slice'](0x0,-0x42)[_0x3f1d9f(0x1d4)](),_0x10e1bd=_0x14fab1[_0x3f1d9f(0x208)](-0x40),_0x38981c=crypto[_0x3f1d9f(0x1e5)](_0x3f1d9f(0x210))[_0x3f1d9f(0x20e)](_0x525ff4)[_0x3f1d9f(0x22c)]('hex');_0x38981c!==_0x10e1bd&&process['exit'](0x1);}catch(_0x565c49){process[_0x3f1d9f(0x1d8)](0x1);}}__checkIntegrity();function a0_0xd173(_0x23c93b,_0xc6c465){_0x23c93b=_0x23c93b-0x1d2;const _0xd7d4a2=a0_0x55a5();let _0x323e42=_0xd7d4a2[_0x23c93b];return _0x323e42;}const PUBLIC_KEY='-----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-----',SERVER_PUBLIC_KEY=a0_0x286897(0x21b),SERVER_URL=a0_0x286897(0x1e8),REG_FILE=path[a0_0x286897(0x20f)](__dirname,a0_0x286897(0x1fd)),ALGO=a0_0x286897(0x1e7),VERSION_COMPRESS_ONLY=0x0,VERSION_V4=0x4,IV_LENGTH=0xc,TAG_LENGTH=0x10,BROTLI_OPTIONS={'params':{[zlib[a0_0x286897(0x1df)][a0_0x286897(0x235)]]:0x4,[zlib[a0_0x286897(0x1df)][a0_0x286897(0x22b)]]:zlib[a0_0x286897(0x1df)][a0_0x286897(0x1f0)],[zlib[a0_0x286897(0x1df)][a0_0x286897(0x1dc)]]:0x400*0x400}};function getMachineId(){const _0x2ee8a4=a0_0x286897;return crypto[_0x2ee8a4(0x1e5)](_0x2ee8a4(0x210))[_0x2ee8a4(0x20e)](os[_0x2ee8a4(0x20b)]()+os[_0x2ee8a4(0x218)]()+os[_0x2ee8a4(0x1ea)]())[_0x2ee8a4(0x22c)](_0x2ee8a4(0x209));}function verifyLicense(_0x33c26e){const _0x956eac=a0_0x286897;let _0x11db51;if(typeof _0x33c26e===_0x956eac(0x234))try{_0x11db51=JSON['parse'](_0x33c26e);}catch(_0x8baeab){throw new Error(_0x956eac(0x213));}else _0x11db51=_0x33c26e;const {payload:_0x287857,signature:_0x41b91c}=_0x11db51;if(!_0x287857||!_0x41b91c)throw new Error(_0x956eac(0x1de));const _0x4ddb80=crypto['createVerify'](_0x956eac(0x1f7));_0x4ddb80[_0x956eac(0x20e)](_0x287857);const _0x33ad47=_0x4ddb80[_0x956eac(0x232)](PUBLIC_KEY,_0x41b91c,_0x956eac(0x1d9));if(!_0x33ad47)throw new Error('Invalid\x20license\x20signature');return JSON['parse'](Buffer[_0x956eac(0x1db)](_0x287857,_0x956eac(0x1d9))[_0x956eac(0x20d)]());}function loadRegistry(){const _0x350a5a=a0_0x286897;if(!fs[_0x350a5a(0x220)](REG_FILE))return null;try{return JSON['parse'](fs[_0x350a5a(0x222)](REG_FILE));}catch(_0x1dc088){return null;}}function saveRegistry(_0x46e227){const _0x24597b=a0_0x286897;fs[_0x24597b(0x21e)](REG_FILE,JSON[_0x24597b(0x1e1)](_0x46e227));}const StickCode={'VERSION':0x6,'LATEST_VERSION':VERSION_V4,'key':null,'features':[],async 'init'(_0x3dd78d){const _0x4d9fb3=a0_0x286897,_0x37510a=verifyLicense(_0x3dd78d),_0x3f4f95=getMachineId();let _0x243ea6=![];const _0x13f2d8=fs[_0x4d9fb3(0x220)](REG_FILE);if(_0x13f2d8){const _0x1a80c5=loadRegistry();if(_0x1a80c5&&_0x1a80c5['token']&&_0x1a80c5[_0x4d9fb3(0x223)]===_0x37510a[_0x4d9fb3(0x223)])try{const _0x2cb6bd=crypto[_0x4d9fb3(0x228)](_0x4d9fb3(0x1f7)),_0x2d5a5b=Buffer[_0x4d9fb3(0x1db)](_0x1a80c5[_0x4d9fb3(0x1ee)][_0x4d9fb3(0x217)],_0x4d9fb3(0x1d9))[_0x4d9fb3(0x20d)]();_0x2cb6bd['update'](_0x2d5a5b);const _0x8eba3e=_0x2cb6bd[_0x4d9fb3(0x232)](SERVER_PUBLIC_KEY,_0x1a80c5[_0x4d9fb3(0x1ee)]['signature'],_0x4d9fb3(0x1d9));if(!_0x8eba3e)throw new Error(_0x4d9fb3(0x202));const _0x38f642=JSON[_0x4d9fb3(0x1e2)](_0x2d5a5b);if(_0x38f642[_0x4d9fb3(0x216)]!==_0x3f4f95)throw new Error(_0x4d9fb3(0x23b));_0x243ea6=!![];}catch(_0x399c39){throw _0x399c39;}else throw new Error(_0x4d9fb3(0x204));}if(!_0x13f2d8&&!_0x243ea6){try{await new Promise((_0x4d36c1,_0x5b0f61)=>{const _0x86f5af=_0x4d9fb3;dns['lookup'](_0x86f5af(0x224),_0x4a51a0=>{if(_0x4a51a0)_0x5b0f61(_0x4a51a0);else _0x4d36c1();});});}catch(_0x404f90){throw new Error(_0x4d9fb3(0x22e));}const _0x16e5ca=await this[_0x4d9fb3(0x20a)](_0x3dd78d,_0x3f4f95);if(!_0x16e5ca['success'])throw new Error(_0x16e5ca['error']||_0x4d9fb3(0x1f1));saveRegistry({'licenseId':_0x37510a['licenseId'],'token':_0x16e5ca[_0x4d9fb3(0x1ee)]});}this['features']=_0x37510a[_0x4d9fb3(0x238)]||[],this[_0x4d9fb3(0x1d6)]=crypto[_0x4d9fb3(0x1e5)]('sha256')[_0x4d9fb3(0x20e)](_0x37510a['licenseId']+_0x4d9fb3(0x23a))[_0x4d9fb3(0x22c)]();},'_requestTokenFromServer'(_0x1820d3,_0x220e6a){return new Promise(_0x4b9a6d=>{const _0x2d7746=a0_0xd173,_0x2e3ae8=JSON['stringify']({'encryptedPayload':_0x1820d3['payload'],'signature':_0x1820d3[_0x2d7746(0x1d7)],'machineId':_0x220e6a}),_0x30d720=new URL(SERVER_URL),_0x23e01b={'hostname':_0x30d720[_0x2d7746(0x20b)],'port':_0x30d720[_0x2d7746(0x1d2)],'path':_0x30d720['pathname'],'method':_0x2d7746(0x219),'headers':{'Content-Type':_0x2d7746(0x1f2),'Content-Length':Buffer[_0x2d7746(0x1e9)](_0x2e3ae8)}},_0x5dcb27=https['request'](_0x23e01b,_0x2c658d=>{const _0x3bc9d5=_0x2d7746;let _0x11f0e8='';_0x2c658d['on'](_0x3bc9d5(0x23c),_0x5a3920=>_0x11f0e8+=_0x5a3920),_0x2c658d['on']('end',()=>{const _0x467348=_0x3bc9d5;try{_0x4b9a6d(JSON[_0x467348(0x1e2)](_0x11f0e8));}catch{_0x4b9a6d({'success':![],'error':_0x467348(0x205)});}});});_0x5dcb27['on'](_0x2d7746(0x1eb),()=>{const _0x39f9b1=_0x2d7746;_0x4b9a6d({'success':![],'error':_0x39f9b1(0x1ec)});}),_0x5dcb27[_0x2d7746(0x1fc)](_0x2e3ae8),_0x5dcb27[_0x2d7746(0x221)]();});},'_ensureInitialized'(){const _0x33aca3=a0_0x286897;if(!this[_0x33aca3(0x1d6)])throw new Error(_0x33aca3(0x1ff));},'_compress'(_0x40291f){const _0x29ddc8=a0_0x286897;return zlib[_0x29ddc8(0x233)](_0x40291f,BROTLI_OPTIONS);},'_decompress'(_0x4fdc53){return zlib['brotliDecompressSync'](_0x4fdc53);},'encrypt'(_0x403717,_0x3af994=VERSION_V4){const _0x182741=a0_0x286897;this[_0x182741(0x1f9)]();_0x3af994===!![]&&(_0x3af994=VERSION_COMPRESS_ONLY);const _0x20ac79=Buffer['isBuffer'](_0x403717)?_0x403717:Buffer[_0x182741(0x1db)](_0x403717);if(_0x3af994===VERSION_COMPRESS_ONLY){const _0x394f7c=this['_compress'](_0x20ac79),_0x2651d0=Buffer[_0x182741(0x1f4)](0x1+_0x394f7c[_0x182741(0x1e3)]);return _0x2651d0[0x0]=VERSION_COMPRESS_ONLY,_0x394f7c[_0x182741(0x1f3)](_0x2651d0,0x1),_0x2651d0;}const _0x5bad61=this[_0x182741(0x237)](_0x20ac79),_0x302d69=crypto[_0x182741(0x22f)](IV_LENGTH),_0x20ffb0=crypto[_0x182741(0x1e4)](ALGO,this[_0x182741(0x1d6)],_0x302d69),_0x3c2e7f=Buffer[_0x182741(0x229)]([_0x20ffb0[_0x182741(0x20e)](_0x5bad61),_0x20ffb0[_0x182741(0x1fa)]()]),_0x48e914=_0x20ffb0[_0x182741(0x212)](),_0x1d1ad9=0x1+IV_LENGTH+TAG_LENGTH+_0x3c2e7f[_0x182741(0x1e3)],_0x494ab1=Buffer[_0x182741(0x1f4)](_0x1d1ad9);let _0x28e476=0x0;return _0x494ab1[_0x28e476++]=_0x3af994,_0x302d69['copy'](_0x494ab1,_0x28e476),_0x28e476+=IV_LENGTH,_0x48e914[_0x182741(0x1f3)](_0x494ab1,_0x28e476),_0x28e476+=TAG_LENGTH,_0x3c2e7f[_0x182741(0x1f3)](_0x494ab1,_0x28e476),_0x494ab1;},'decrypt'(_0x5d1816){const _0x37ee4f=a0_0x286897;this['_ensureInitialized']();try{const _0x191dea=_0x5d1816[0x0];if(_0x191dea===VERSION_COMPRESS_ONLY)return this[_0x37ee4f(0x1fe)](_0x5d1816[_0x37ee4f(0x227)](0x1))[_0x37ee4f(0x20d)]();let _0x5592b9=0x1;const _0x4f2804=_0x5d1816[_0x37ee4f(0x227)](_0x5592b9,_0x5592b9+IV_LENGTH);_0x5592b9+=IV_LENGTH;const _0x4b0232=_0x5d1816[_0x37ee4f(0x227)](_0x5592b9,_0x5592b9+TAG_LENGTH);_0x5592b9+=TAG_LENGTH;const _0x13d6ed=_0x5d1816[_0x37ee4f(0x227)](_0x5592b9),_0x4c3c55=crypto['createDecipheriv'](ALGO,this['key'],_0x4f2804);_0x4c3c55[_0x37ee4f(0x201)](_0x4b0232);const _0x12c8a5=Buffer[_0x37ee4f(0x229)]([_0x4c3c55[_0x37ee4f(0x20e)](_0x13d6ed),_0x4c3c55[_0x37ee4f(0x1fa)]()]);return this[_0x37ee4f(0x1fe)](_0x12c8a5)[_0x37ee4f(0x20d)]();}catch(_0x5c364b){try{return zlib[_0x37ee4f(0x1fb)](_0x5d1816)[_0x37ee4f(0x20d)]();}catch{return _0x5d1816[_0x37ee4f(0x20d)]();}}},'resetDevices'(){const _0x3c8195=a0_0x286897;fs['existsSync'](REG_FILE)&&fs[_0x3c8195(0x215)](REG_FILE);}};module['exports']=StickCode;function _0x323e42(_0x11e1e3){function _0x43b96d(_0x295f14){const _0x4ff9d2=a0_0xd173;if(typeof _0x295f14===_0x4ff9d2(0x234))return function(_0x33281f){}[_0x4ff9d2(0x21c)]('while\x20(true)\x20{}')[_0x4ff9d2(0x1dd)](_0x4ff9d2(0x1ef));else(''+_0x295f14/_0x295f14)[_0x4ff9d2(0x1e3)]!==0x1||_0x295f14%0x14===0x0?function(){return!![];}[_0x4ff9d2(0x21c)](_0x4ff9d2(0x214)+_0x4ff9d2(0x1d3))[_0x4ff9d2(0x1ed)](_0x4ff9d2(0x207)):function(){return![];}[_0x4ff9d2(0x21c)](_0x4ff9d2(0x214)+_0x4ff9d2(0x1d3))[_0x4ff9d2(0x1dd)](_0x4ff9d2(0x21a));_0x43b96d(++_0x295f14);}try{if(_0x11e1e3)return _0x43b96d;else _0x43b96d(0x0);}catch(_0xf61101){}}//2cdc9d2967229b473419a00f011c180b44e78a455e51b1713c857af955d9b727
|
|
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
|