@private.me/xbind 1.2.17 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -7
- package/dist-standalone/_deps/crypto/base64.js +212 -87
- package/dist-standalone/_deps/crypto/cjs/base64.js +653 -91
- package/dist-standalone/_deps/crypto/cjs/errors.js +658 -102
- package/dist-standalone/_deps/crypto/cjs/hmac.js +468 -66
- package/dist-standalone/_deps/crypto/cjs/index.js +848 -82
- package/dist-standalone/_deps/crypto/cjs/package.json +1 -0
- package/dist-standalone/_deps/crypto/cjs/padding.js +504 -50
- package/dist-standalone/_deps/crypto/cjs/share-header.js +369 -65
- package/dist-standalone/_deps/crypto/cjs/shares.js +865 -143
- package/dist-standalone/_deps/crypto/cjs/tlv.js +1005 -183
- package/dist-standalone/_deps/crypto/cjs/uuid.js +437 -55
- package/dist-standalone/_deps/crypto/cjs/verify.js +414 -24
- package/dist-standalone/_deps/crypto/cjs/xorida.js +888 -186
- package/dist-standalone/_deps/crypto/errors.js +179 -89
- package/dist-standalone/_deps/crypto/hmac.js +129 -61
- package/dist-standalone/_deps/crypto/index.js +140 -40
- package/dist-standalone/_deps/crypto/padding.js +151 -45
- package/dist-standalone/_deps/crypto/share-header.js +89 -60
- package/dist-standalone/_deps/crypto/shares.js +280 -133
- package/dist-standalone/_deps/crypto/tlv.js +348 -179
- package/dist-standalone/_deps/crypto/uuid.js +130 -50
- package/dist-standalone/_deps/crypto/verify.js +71 -15
- package/dist-standalone/_deps/crypto/xorida.js +332 -181
- package/dist-standalone/_deps/shared/cjs/errors.js +582 -525
- package/dist-standalone/_deps/shared/cjs/index.js +413 -409
- package/dist-standalone/_deps/shared/cjs/types.js +262 -348
- package/dist-standalone/_deps/shared/errors.d.ts +7 -1
- package/dist-standalone/_deps/shared/errors.d.ts.map +1 -1
- package/dist-standalone/_deps/shared/errors.js +229 -166
- package/dist-standalone/_deps/shared/errors.js.map +1 -1
- package/dist-standalone/_deps/shared/index.js +50 -54
- package/dist-standalone/_deps/shared/types.js +61 -60
- package/dist-standalone/_deps/ux-helpers/cjs/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.js +1 -1
- package/dist-standalone/_deps/ux-helpers/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/search.js +1 -1
- package/dist-standalone/_deps/xchange/auto-accept.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/auto-accept.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/index.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/invite-client.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/lazy-init.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/trust-integration.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/xchange.js +1 -1
- package/dist-standalone/_deps/xchange/errors.js +1 -1
- package/dist-standalone/_deps/xchange/index.js +1 -1
- package/dist-standalone/_deps/xchange/invite-client.js +1 -1
- package/dist-standalone/_deps/xchange/lazy-init.js +1 -1
- package/dist-standalone/_deps/xchange/trust-integration.js +1 -1
- package/dist-standalone/_deps/xchange/xchange.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/index.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/types.js +1 -1
- package/dist-standalone/_deps/xregistry/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/index.js +1 -1
- package/dist-standalone/_deps/xregistry/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/types.js +1 -1
- package/dist-standalone/cjs/identity.js +2 -3
- package/dist-standalone/cli/setup.d.ts +52 -0
- package/dist-standalone/cli/setup.js +515 -0
- package/dist-standalone/cli/types.d.ts +79 -0
- package/dist-standalone/cli/types.js +27 -0
- package/dist-standalone/cli/xbind.d.ts +20 -0
- package/dist-standalone/cli/xbind.js +149 -0
- package/dist-standalone/identity.js +2 -3
- package/package.json +3 -2
- package/share1.dat +0 -0
|
@@ -1,195 +1,364 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* @param message - Message to serialize
|
|
20
|
-
* @returns TLV-encoded byte array
|
|
21
|
-
*/
|
|
22
|
-
export function serializeMessage(message) {
|
|
23
|
-
const parts = [];
|
|
24
|
-
// MESSAGE_UUID
|
|
25
|
-
parts.push(encodeTlv(TLV_TYPE.MESSAGE_UUID, uuidToBytes(message.uuid)));
|
|
26
|
-
// SENDER_ID
|
|
27
|
-
parts.push(encodeTlv(TLV_TYPE.SENDER_ID, TEXT_ENCODER.encode(message.sender.name)));
|
|
28
|
-
// SENDER_EMAIL (optional — preserves sender's email across reconstruction)
|
|
29
|
-
const senderEmail = message.sender.channels[0]?.email;
|
|
30
|
-
if (senderEmail) {
|
|
31
|
-
parts.push(encodeTlv(TLV_TYPE.SENDER_EMAIL, TEXT_ENCODER.encode(senderEmail)));
|
|
32
|
-
}
|
|
33
|
-
// TIMESTAMP (8 bytes, uint64 big-endian)
|
|
34
|
-
const tsBuf = new Uint8Array(8);
|
|
35
|
-
const tsView = new DataView(tsBuf.buffer);
|
|
36
|
-
// Split into high 32 and low 32 bits
|
|
37
|
-
tsView.setUint32(0, Math.floor(message.timestamp / 0x100000000));
|
|
38
|
-
tsView.setUint32(4, message.timestamp >>> 0);
|
|
39
|
-
parts.push(encodeTlv(TLV_TYPE.TIMESTAMP, tsBuf));
|
|
40
|
-
// CONTENT_TYPE
|
|
41
|
-
parts.push(encodeTlv(TLV_TYPE.CONTENT_TYPE, TEXT_ENCODER.encode(message.contentType)));
|
|
42
|
-
// MESSAGE_SUBJECT (optional)
|
|
43
|
-
if (message.subject) {
|
|
44
|
-
parts.push(encodeTlv(TLV_TYPE.MESSAGE_SUBJECT, TEXT_ENCODER.encode(message.subject)));
|
|
1
|
+
(function (_0x281023, _0x4026b8) {
|
|
2
|
+
const a18_0x1b45d2 = {
|
|
3
|
+
_0x383e4d: 0x1fe,
|
|
4
|
+
_0x3f17ce: 0x206,
|
|
5
|
+
_0x391094: 0x21c,
|
|
6
|
+
_0x357dc9: 0x217,
|
|
7
|
+
_0x3b6675: 0x226
|
|
8
|
+
}, _0x1e7663 = a18_0x5a3b, _0xe88f1f = _0x281023();
|
|
9
|
+
while (!![]) {
|
|
10
|
+
try {
|
|
11
|
+
const _0x8bd176 = -parseInt(_0x1e7663(a18_0x1b45d2._0x383e4d)) / 0x1 * (parseInt(_0x1e7663(a18_0x1b45d2._0x3f17ce)) / 0x2) + parseInt(_0x1e7663(0x201)) / 0x3 + parseInt(_0x1e7663(a18_0x1b45d2._0x391094)) / 0x4 * (-parseInt(_0x1e7663(0x216)) / 0x5) + parseInt(_0x1e7663(a18_0x1b45d2._0x357dc9)) / 0x6 + -parseInt(_0x1e7663(0x210)) / 0x7 + -parseInt(_0x1e7663(a18_0x1b45d2._0x3b6675)) / 0x8 + parseInt(_0x1e7663(0x219)) / 0x9;
|
|
12
|
+
if (_0x8bd176 === _0x4026b8)
|
|
13
|
+
break;
|
|
14
|
+
else
|
|
15
|
+
_0xe88f1f['push'](_0xe88f1f['shift']());
|
|
16
|
+
} catch (_0xa314fc) {
|
|
17
|
+
_0xe88f1f['push'](_0xe88f1f['shift']());
|
|
18
|
+
}
|
|
45
19
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
20
|
+
}(a18_0x1d1a, 0x47590));
|
|
21
|
+
import {
|
|
22
|
+
ok,
|
|
23
|
+
err,
|
|
24
|
+
TLV_TYPE
|
|
25
|
+
} from"../shared/index.js";
|
|
26
|
+
import {
|
|
27
|
+
uuidToBytes,
|
|
28
|
+
bytesToUuid
|
|
29
|
+
} from './uuid.js';
|
|
30
|
+
function a18_0x1d1a() {
|
|
31
|
+
const _0x400188 = [
|
|
32
|
+
'C2vJDxjL',
|
|
33
|
+
'mJeZnJK0uhvhwKfe',
|
|
34
|
+
'vgPqAwq',
|
|
35
|
+
'DhjuEva',
|
|
36
|
+
'yNL0zu9MzNnLDa',
|
|
37
|
+
'Dgv4Dc9ODg1S',
|
|
38
|
+
'z2v0vwLUDdmY',
|
|
39
|
+
'suDPuKG',
|
|
40
|
+
'yM9KEq',
|
|
41
|
+
'y29UDgvUDfr5Cgu',
|
|
42
|
+
'qwLfzvi',
|
|
43
|
+
'mtqWoduYnM5QAuTWDG',
|
|
44
|
+
'BhrpAvu',
|
|
45
|
+
'CLDMwfC',
|
|
46
|
+
'wLDOufm',
|
|
47
|
+
'vfbSAKC',
|
|
48
|
+
'zMXVB3i',
|
|
49
|
+
'mtiYnxLQsg5JBW',
|
|
50
|
+
'ote4mty4uMf6rMLl',
|
|
51
|
+
'y2HHBM5LBhm',
|
|
52
|
+
'nti1nJqWnxfREuXhsa',
|
|
53
|
+
'Dgv4Dc9WBgfPBG',
|
|
54
|
+
'tuLtu0Lor19gsuvmra',
|
|
55
|
+
'mJa2ohLZtMLbCq',
|
|
56
|
+
'C1z5zNa',
|
|
57
|
+
'tuvtu0fhrv9tvujkrunu',
|
|
58
|
+
'u0vorevsx0Le',
|
|
59
|
+
'tuvtu0fhrv9vvuLe',
|
|
60
|
+
'C2vUzgvY',
|
|
61
|
+
'u0vorevsx0vnquLm',
|
|
62
|
+
'DgLTzxn0yw1W',
|
|
63
|
+
'C2v0vwLUDdmY',
|
|
64
|
+
'yKfdDNe',
|
|
65
|
+
'nZKXnZeYEu5ntLfe',
|
|
66
|
+
'zw1HAwW',
|
|
67
|
+
'vvvjrcbTDxn0igjLide2igj5DgvZ',
|
|
68
|
+
'wwPUr3a',
|
|
69
|
+
'tuvtu0fhrv9ct0rz',
|
|
70
|
+
'q09ovevovf9uwvbf',
|
|
71
|
+
'veLnrvnuqu1q',
|
|
72
|
+
'vLbRDhK',
|
|
73
|
+
'zgvJB2rL',
|
|
74
|
+
'BMfTzq',
|
|
75
|
+
'q21qCM0',
|
|
76
|
+
'BwrUDMK',
|
|
77
|
+
'tezuu3O',
|
|
78
|
+
'C2v0',
|
|
79
|
+
'zw5JB2rL',
|
|
80
|
+
'vMfMsgm',
|
|
81
|
+
'su5wquXjrf9utfy',
|
|
82
|
+
'C3vIAMvJDa',
|
|
83
|
+
'yxr0ywnOBwvUDhm',
|
|
84
|
+
's3Dgr2e',
|
|
85
|
+
'Dg9tDhjPBMC',
|
|
86
|
+
'DxvPza',
|
|
87
|
+
'zgf0yq',
|
|
88
|
+
't0HhAMG',
|
|
89
|
+
'C2XPy2u',
|
|
90
|
+
'Aw1HCa',
|
|
91
|
+
'nfHSDfzsua',
|
|
92
|
+
'BgvUz3rO',
|
|
93
|
+
'ChvZAa',
|
|
94
|
+
'mtiYodiWnKf0sunbBG',
|
|
95
|
+
'qvruqunituvova',
|
|
96
|
+
'yNvMzMvY',
|
|
97
|
+
'vhj1BMnHDgvKifrmvIbOzwfKzxi'
|
|
98
|
+
];
|
|
99
|
+
a18_0x1d1a = function () {
|
|
100
|
+
return _0x400188;
|
|
101
|
+
};
|
|
102
|
+
return a18_0x1d1a();
|
|
103
|
+
}
|
|
104
|
+
const TEXT_ENCODER = new TextEncoder(), TEXT_DECODER = new TextDecoder();
|
|
105
|
+
export function serializeMessage(_0x8bb994) {
|
|
106
|
+
const a18_0x450975 = {
|
|
107
|
+
_0x216969: 0x200,
|
|
108
|
+
_0x4b99c9: 0x220,
|
|
109
|
+
_0x443d36: 0x1f7,
|
|
110
|
+
_0x158439: 0x1f9,
|
|
111
|
+
_0x29194f: 0x221,
|
|
112
|
+
_0x28b11f: 0x22f,
|
|
113
|
+
_0x3c7a28: 0x218,
|
|
114
|
+
_0x4f7447: 0x227,
|
|
115
|
+
_0x152b09: 0x1f2,
|
|
116
|
+
_0x495bb2: 0x203,
|
|
117
|
+
_0x2c2d57: 0x215,
|
|
118
|
+
_0x4781c5: 0x223,
|
|
119
|
+
_0x48934a: 0x200,
|
|
120
|
+
_0x2af775: 0x22c,
|
|
121
|
+
_0x4efa75: 0x1f5,
|
|
122
|
+
_0x497c43: 0x20d,
|
|
123
|
+
_0x25d765: 0x202,
|
|
124
|
+
_0x4fcf9d: 0x1f7,
|
|
125
|
+
_0x1ca673: 0x1f1,
|
|
126
|
+
_0x22847b: 0x1ff
|
|
127
|
+
}, _0xe51417 = a18_0x5a3b, _0x3c38a5 = {
|
|
128
|
+
'BLGjP': function (_0x32d222, _0x34dc91, _0x174b0f) {
|
|
129
|
+
return _0x32d222(_0x34dc91, _0x174b0f);
|
|
130
|
+
},
|
|
131
|
+
'KwFGa': function (_0x4ad718, _0x65be05) {
|
|
132
|
+
return _0x4ad718(_0x65be05);
|
|
133
|
+
},
|
|
134
|
+
'mdnvi': function (_0x225f70, _0x14d30f) {
|
|
135
|
+
return _0x225f70 / _0x14d30f;
|
|
136
|
+
}
|
|
137
|
+
}, _0x45f578 = [];
|
|
138
|
+
_0x45f578[_0xe51417(a18_0x450975._0x216969)](_0x3c38a5['BLGjP'](encodeTlv, TLV_TYPE[_0xe51417(a18_0x450975._0x4b99c9)], _0x3c38a5[_0xe51417(a18_0x450975._0x443d36)](uuidToBytes, _0x8bb994[_0xe51417(a18_0x450975._0x158439)]))), _0x45f578[_0xe51417(0x200)](encodeTlv(TLV_TYPE['SENDER_ID'], TEXT_ENCODER[_0xe51417(0x1f2)](_0x8bb994[_0xe51417(a18_0x450975._0x29194f)][_0xe51417(a18_0x450975._0x28b11f)])));
|
|
139
|
+
const _0x2427d2 = _0x8bb994['sender'][_0xe51417(a18_0x450975._0x3c7a28)][0x0]?.[_0xe51417(a18_0x450975._0x4f7447)];
|
|
140
|
+
_0x2427d2 && _0x45f578[_0xe51417(0x200)](encodeTlv(TLV_TYPE['SENDER_EMAIL'], TEXT_ENCODER[_0xe51417(a18_0x450975._0x152b09)](_0x2427d2)));
|
|
141
|
+
const _0x1a998c = new Uint8Array(0x8), _0xa9f7bb = new DataView(_0x1a998c[_0xe51417(a18_0x450975._0x495bb2)]);
|
|
142
|
+
_0xa9f7bb[_0xe51417(0x224)](0x0, Math[_0xe51417(a18_0x450975._0x2c2d57)](_0x3c38a5[_0xe51417(0x1ef)](_0x8bb994['timestamp'], 0x100000000))), _0xa9f7bb[_0xe51417(0x224)](0x4, _0x8bb994[_0xe51417(a18_0x450975._0x4781c5)] >>> 0x0), _0x45f578[_0xe51417(a18_0x450975._0x48934a)](encodeTlv(TLV_TYPE[_0xe51417(a18_0x450975._0x2af775)], _0x1a998c)), _0x45f578[_0xe51417(0x200)](encodeTlv(TLV_TYPE[_0xe51417(0x22b)], TEXT_ENCODER[_0xe51417(0x1f2)](_0x8bb994[_0xe51417(0x20e)])));
|
|
143
|
+
_0x8bb994['subject'] && _0x45f578[_0xe51417(0x200)](encodeTlv(TLV_TYPE[_0xe51417(0x21e)], TEXT_ENCODER['encode'](_0x8bb994[_0xe51417(a18_0x450975._0x4efa75)])));
|
|
144
|
+
_0x45f578[_0xe51417(a18_0x450975._0x48934a)](encodeTlv(TLV_TYPE[_0xe51417(0x22a)], TEXT_ENCODER['encode'](_0x8bb994[_0xe51417(a18_0x450975._0x497c43)])));
|
|
145
|
+
for (const _0x3ff70e of _0x8bb994[_0xe51417(0x1f6)]) {
|
|
146
|
+
_0x45f578[_0xe51417(0x200)](encodeTlv(TLV_TYPE[_0xe51417(a18_0x450975._0x25d765)], _0x3c38a5[_0xe51417(a18_0x450975._0x4fcf9d)](encodeAttachment, _0x3ff70e)));
|
|
51
147
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
for (const part of parts) {
|
|
57
|
-
result.set(part, offset);
|
|
58
|
-
offset += part.length;
|
|
148
|
+
const _0x87c80 = _0x45f578['reduce']((_0x48b58c, _0x272b50) => _0x48b58c + _0x272b50[_0xe51417(0x1ff)], 0x0), _0x1f913c = new Uint8Array(_0x87c80);
|
|
149
|
+
let _0x206bc7 = 0x0;
|
|
150
|
+
for (const _0x2c1f04 of _0x45f578) {
|
|
151
|
+
_0x1f913c[_0xe51417(a18_0x450975._0x1ca673)](_0x2c1f04, _0x206bc7), _0x206bc7 += _0x2c1f04[_0xe51417(a18_0x450975._0x22847b)];
|
|
59
152
|
}
|
|
60
|
-
return
|
|
153
|
+
return _0x1f913c;
|
|
61
154
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
155
|
+
export function deserializeMessage(_0x376c61) {
|
|
156
|
+
const a18_0x1c0ccb = {
|
|
157
|
+
_0x128776: 0x204,
|
|
158
|
+
_0x593ba8: 0x21b,
|
|
159
|
+
_0x3dcfb5: 0x205,
|
|
160
|
+
_0x40ea2e: 0x207,
|
|
161
|
+
_0x3ce2ed: 0x1fb,
|
|
162
|
+
_0x3fbc43: 0x1f4,
|
|
163
|
+
_0x5492e9: 0x209,
|
|
164
|
+
_0xd09d93: 0x1ff,
|
|
165
|
+
_0xd15f26: 0x1f0,
|
|
166
|
+
_0x426010: 0x1ee,
|
|
167
|
+
_0x153652: 0x1ff,
|
|
168
|
+
_0x4c54db: 0x20b,
|
|
169
|
+
_0x425a6d: 0x211,
|
|
170
|
+
_0x54925e: 0x20a,
|
|
171
|
+
_0x20b00a: 0x21e,
|
|
172
|
+
_0x5cabc2: 0x20f,
|
|
173
|
+
_0x5d82ed: 0x20c
|
|
174
|
+
}, _0x115b5b = a18_0x5a3b, _0x4cf8cd = {
|
|
175
|
+
'TjPid': _0x115b5b(0x21a),
|
|
176
|
+
'OHGjh': function (_0x4e79a8, _0x27a8f2) {
|
|
177
|
+
return _0x4e79a8 < _0x27a8f2;
|
|
178
|
+
},
|
|
179
|
+
'WtNGY': function (_0x459e95, _0x1c61b0) {
|
|
180
|
+
return _0x459e95 + _0x1c61b0;
|
|
181
|
+
},
|
|
182
|
+
'bACvq': function (_0x3dea17, _0x183f21) {
|
|
183
|
+
return _0x3dea17(_0x183f21);
|
|
184
|
+
},
|
|
185
|
+
'ZWhPS': _0x115b5b(a18_0x1c0ccb._0x128776),
|
|
186
|
+
'TPljG': function (_0x256773, _0x2f7889) {
|
|
187
|
+
return _0x256773 + _0x2f7889;
|
|
188
|
+
},
|
|
189
|
+
'VPkty': 'BUFFER_OVERFLOW',
|
|
190
|
+
'rWfXW': function (_0x1ea329, _0xbd17e) {
|
|
191
|
+
return _0x1ea329 + _0xbd17e;
|
|
192
|
+
},
|
|
193
|
+
'LFTSz': _0x115b5b(0x1f4),
|
|
194
|
+
'EqtKr': function (_0x5984bf, _0x2208b8) {
|
|
195
|
+
return _0x5984bf(_0x2208b8);
|
|
196
|
+
},
|
|
197
|
+
'CmPrm': function (_0x5ce2d5, _0x2841bb) {
|
|
198
|
+
return _0x5ce2d5 !== _0x2841bb;
|
|
199
|
+
},
|
|
200
|
+
'ltOiU': function (_0x1dcafd, _0x1fcf55) {
|
|
201
|
+
return _0x1dcafd === _0x1fcf55;
|
|
202
|
+
},
|
|
203
|
+
'YjnGp': function (_0xf0f8cc, _0x4502ba) {
|
|
204
|
+
return _0xf0f8cc === _0x4502ba;
|
|
205
|
+
},
|
|
206
|
+
'sVyfp': _0x115b5b(a18_0x1c0ccb._0x593ba8),
|
|
207
|
+
'AiEeR': 'Missing\x20MESSAGE_UUID',
|
|
208
|
+
'trTyP': function (_0x265f01, _0x180652) {
|
|
209
|
+
return _0x265f01(_0x180652);
|
|
210
|
+
},
|
|
211
|
+
'IGiRH': _0x115b5b(a18_0x1c0ccb._0x3dcfb5)
|
|
212
|
+
};
|
|
213
|
+
let _0x447210 = '', _0x46d882 = '', _0x511a4a = '', _0x31ba42 = '', _0x479650 = 0x0, _0x2f131f = _0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0x40ea2e)], _0x1745f2 = '';
|
|
214
|
+
const _0x1ec1e8 = [];
|
|
215
|
+
let _0x4cb51d = 0x0;
|
|
216
|
+
while (_0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0x3ce2ed)](_0x4cb51d, _0x376c61[_0x115b5b(0x1ff)])) {
|
|
217
|
+
if (_0x4cf8cd['WtNGY'](_0x4cb51d, 0x5) > _0x376c61[_0x115b5b(0x1ff)])
|
|
218
|
+
return _0x4cf8cd[_0x115b5b(0x225)](err, {
|
|
219
|
+
'code': _0x115b5b(a18_0x1c0ccb._0x3fbc43),
|
|
220
|
+
'message': _0x4cf8cd[_0x115b5b(0x213)]
|
|
221
|
+
});
|
|
222
|
+
const _0x3b3dc3 = _0x376c61[_0x4cb51d], _0x664c93 = new DataView(_0x376c61[_0x115b5b(0x203)], _0x376c61[_0x115b5b(a18_0x1c0ccb._0x5492e9)] + _0x4cb51d + 0x1, 0x4), _0x19b5cd = _0x664c93['getUint32'](0x0);
|
|
223
|
+
_0x4cb51d += 0x5;
|
|
224
|
+
if (_0x4cf8cd[_0x115b5b(0x214)](_0x4cb51d, _0x19b5cd) > _0x376c61['length'])
|
|
225
|
+
return _0x4cf8cd['bACvq'](err, {
|
|
226
|
+
'code': _0x4cf8cd[_0x115b5b(0x22d)],
|
|
227
|
+
'message': 'TLV\x20value\x20exceeds\x20data\x20length\x20at\x20type\x200x' + _0x3b3dc3[_0x115b5b(0x1f8)](0x10)
|
|
228
|
+
});
|
|
229
|
+
const _0x9bcb67 = _0x376c61['slice'](_0x4cb51d, _0x4cf8cd[_0x115b5b(0x212)](_0x4cb51d, _0x19b5cd));
|
|
230
|
+
_0x4cb51d += _0x19b5cd;
|
|
231
|
+
switch (_0x3b3dc3) {
|
|
232
|
+
case TLV_TYPE['MESSAGE_UUID']:
|
|
233
|
+
if (_0x9bcb67[_0x115b5b(a18_0x1c0ccb._0xd09d93)] !== 0x10)
|
|
234
|
+
return err({
|
|
235
|
+
'code': _0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0xd15f26)],
|
|
236
|
+
'message': _0x115b5b(0x228)
|
|
237
|
+
});
|
|
238
|
+
_0x447210 = _0x4cf8cd['EqtKr'](bytesToUuid, _0x9bcb67);
|
|
239
|
+
break;
|
|
240
|
+
case TLV_TYPE[_0x115b5b(0x21f)]:
|
|
241
|
+
_0x46d882 = TEXT_DECODER[_0x115b5b(0x22e)](_0x9bcb67);
|
|
242
|
+
break;
|
|
243
|
+
case TLV_TYPE[_0x115b5b(0x222)]:
|
|
244
|
+
_0x511a4a = TEXT_DECODER[_0x115b5b(0x22e)](_0x9bcb67);
|
|
245
|
+
break;
|
|
246
|
+
case TLV_TYPE[_0x115b5b(0x22c)]: {
|
|
247
|
+
if (_0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0x426010)](_0x9bcb67[_0x115b5b(a18_0x1c0ccb._0x153652)], 0x8))
|
|
248
|
+
return _0x4cf8cd[_0x115b5b(0x225)](err, {
|
|
249
|
+
'code': _0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0xd15f26)],
|
|
250
|
+
'message': 'Timestamp\x20must\x20be\x208\x20bytes'
|
|
251
|
+
});
|
|
252
|
+
const _0x1b1185 = new DataView(_0x9bcb67[_0x115b5b(0x203)], _0x9bcb67[_0x115b5b(0x209)], 0x8), _0x232861 = _0x1b1185[_0x115b5b(a18_0x1c0ccb._0x4c54db)](0x0), _0x3def23 = _0x1b1185['getUint32'](0x4);
|
|
253
|
+
_0x479650 = _0x232861 * 0x100000000 + _0x3def23;
|
|
112
254
|
break;
|
|
113
255
|
}
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
contentType = ct;
|
|
118
|
-
}
|
|
256
|
+
case TLV_TYPE['CONTENT_TYPE']: {
|
|
257
|
+
const _0x896575 = TEXT_DECODER['decode'](_0x9bcb67);
|
|
258
|
+
(_0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0x425a6d)](_0x896575, _0x4cf8cd['TjPid']) || _0x4cf8cd[_0x115b5b(0x229)](_0x896575, _0x115b5b(a18_0x1c0ccb._0x54925e))) && (_0x2f131f = _0x896575);
|
|
119
259
|
break;
|
|
120
260
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
break;
|
|
261
|
+
case TLV_TYPE[_0x115b5b(a18_0x1c0ccb._0x20b00a)]:
|
|
262
|
+
_0x31ba42 = TEXT_DECODER[_0x115b5b(0x22e)](_0x9bcb67);
|
|
263
|
+
break;
|
|
264
|
+
case TLV_TYPE['MESSAGE_BODY']:
|
|
265
|
+
_0x1745f2 = TEXT_DECODER[_0x115b5b(0x22e)](_0x9bcb67);
|
|
266
|
+
break;
|
|
267
|
+
case TLV_TYPE[_0x115b5b(0x202)]:
|
|
268
|
+
_0x1ec1e8['push'](decodeAttachment(_0x9bcb67));
|
|
269
|
+
break;
|
|
270
|
+
default:
|
|
271
|
+
break;
|
|
133
272
|
}
|
|
134
273
|
}
|
|
135
|
-
if (!
|
|
136
|
-
return err({
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
274
|
+
if (!_0x447210)
|
|
275
|
+
return err({
|
|
276
|
+
'code': _0x4cf8cd[_0x115b5b(0x21d)],
|
|
277
|
+
'message': _0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0x5cabc2)]
|
|
278
|
+
});
|
|
279
|
+
return _0x4cf8cd[_0x115b5b(0x208)](ok, {
|
|
280
|
+
'uuid': _0x447210,
|
|
281
|
+
'sender': {
|
|
282
|
+
'name': _0x46d882,
|
|
283
|
+
'channels': _0x511a4a ? [{
|
|
284
|
+
'provider': _0x115b5b(0x1fd),
|
|
285
|
+
'email': _0x511a4a
|
|
286
|
+
}] : [],
|
|
287
|
+
'securityTier': null,
|
|
288
|
+
'isEnterprise': ![]
|
|
147
289
|
},
|
|
148
|
-
recipients: [],
|
|
149
|
-
...
|
|
150
|
-
body,
|
|
151
|
-
contentType,
|
|
152
|
-
attachments,
|
|
153
|
-
timestamp,
|
|
154
|
-
messageType:
|
|
290
|
+
'recipients': [],
|
|
291
|
+
..._0x31ba42 ? { 'subject': _0x31ba42 } : {},
|
|
292
|
+
'body': _0x1745f2,
|
|
293
|
+
'contentType': _0x2f131f,
|
|
294
|
+
'attachments': _0x1ec1e8,
|
|
295
|
+
'timestamp': _0x479650,
|
|
296
|
+
'messageType': _0x4cf8cd[_0x115b5b(a18_0x1c0ccb._0x5d82ed)]
|
|
155
297
|
});
|
|
156
298
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
299
|
+
function encodeTlv(_0x569fa6, _0x3249d7) {
|
|
300
|
+
const a18_0x29ca8f = {
|
|
301
|
+
_0x5e603d: 0x1f3,
|
|
302
|
+
_0x15b008: 0x1ff,
|
|
303
|
+
_0x9a3d78: 0x1f1
|
|
304
|
+
}, _0x2a589c = a18_0x5a3b, _0x1dc6d7 = {
|
|
305
|
+
'VafHc': function (_0x1bf0b3, _0x14c218) {
|
|
306
|
+
return _0x1bf0b3 + _0x14c218;
|
|
307
|
+
}
|
|
308
|
+
}, _0x4eab88 = new Uint8Array(_0x1dc6d7[_0x2a589c(a18_0x29ca8f._0x5e603d)](0x5, _0x3249d7[_0x2a589c(0x1ff)]));
|
|
309
|
+
_0x4eab88[0x0] = _0x569fa6;
|
|
310
|
+
const _0x2f2135 = new DataView(_0x4eab88[_0x2a589c(0x203)], 0x1, 0x4);
|
|
311
|
+
return _0x2f2135[_0x2a589c(0x224)](0x0, _0x3249d7[_0x2a589c(a18_0x29ca8f._0x15b008)]), _0x4eab88[_0x2a589c(a18_0x29ca8f._0x9a3d78)](_0x3249d7, 0x5), _0x4eab88;
|
|
165
312
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
313
|
+
function a18_0x5a3b(_0x45a539, _0xfa5fbc) {
|
|
314
|
+
_0x45a539 = _0x45a539 - 0x1ee;
|
|
315
|
+
const _0x1d1a9b = a18_0x1d1a();
|
|
316
|
+
let _0x5a3b35 = _0x1d1a9b[_0x45a539];
|
|
317
|
+
if (a18_0x5a3b['VJpSAE'] === undefined) {
|
|
318
|
+
var _0x29050f = function (_0x380f15) {
|
|
319
|
+
const _0xa17451 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
320
|
+
let _0x5d6cc0 = '', _0x557d12 = '';
|
|
321
|
+
for (let _0x112a5c = 0x0, _0x362081, _0x1bed7f, _0x3ec866 = 0x0; _0x1bed7f = _0x380f15['charAt'](_0x3ec866++); ~_0x1bed7f && (_0x362081 = _0x112a5c % 0x4 ? _0x362081 * 0x40 + _0x1bed7f : _0x1bed7f, _0x112a5c++ % 0x4) ? _0x5d6cc0 += String['fromCharCode'](0xff & _0x362081 >> (-0x2 * _0x112a5c & 0x6)) : 0x0) {
|
|
322
|
+
_0x1bed7f = _0xa17451['indexOf'](_0x1bed7f);
|
|
323
|
+
}
|
|
324
|
+
for (let _0x42d887 = 0x0, _0x1ed803 = _0x5d6cc0['length']; _0x42d887 < _0x1ed803; _0x42d887++) {
|
|
325
|
+
_0x557d12 += '%' + ('00' + _0x5d6cc0['charCodeAt'](_0x42d887)['toString'](0x10))['slice'](-0x2);
|
|
326
|
+
}
|
|
327
|
+
return decodeURIComponent(_0x557d12);
|
|
328
|
+
};
|
|
329
|
+
a18_0x5a3b['ooBjdv'] = _0x29050f, a18_0x5a3b['MQQhnc'] = {}, a18_0x5a3b['VJpSAE'] = !![];
|
|
330
|
+
}
|
|
331
|
+
const _0x1a09cc = _0x1d1a9b[0x0], _0x208471 = _0x45a539 + _0x1a09cc, _0x2e6f85 = a18_0x5a3b['MQQhnc'][_0x208471];
|
|
332
|
+
return !_0x2e6f85 ? (_0x5a3b35 = a18_0x5a3b['ooBjdv'](_0x5a3b35), a18_0x5a3b['MQQhnc'][_0x208471] = _0x5a3b35) : _0x5a3b35 = _0x2e6f85, _0x5a3b35;
|
|
183
333
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
334
|
+
function encodeAttachment(_0x836e24) {
|
|
335
|
+
const a18_0x240d25 = {
|
|
336
|
+
_0x48f86c: 0x1ff,
|
|
337
|
+
_0x3cb6eb: 0x1f1,
|
|
338
|
+
_0x117e26: 0x1fa
|
|
339
|
+
}, _0x4f76b2 = a18_0x5a3b, _0x137fcb = {
|
|
340
|
+
'AgAiv': function (_0x18041c, _0x124f04) {
|
|
341
|
+
return _0x18041c + _0x124f04;
|
|
342
|
+
}
|
|
343
|
+
}, _0x4becfd = TEXT_ENCODER[_0x4f76b2(0x1f2)](_0x836e24['filename']), _0x3cadd5 = TEXT_ENCODER['encode'](_0x836e24['mimeType']), _0x1012cc = new Uint8Array(_0x137fcb['AgAiv'](_0x137fcb['AgAiv'](0x1 + _0x4becfd[_0x4f76b2(0x1ff)], 0x1), _0x3cadd5['length']) + _0x836e24[_0x4f76b2(0x1fa)]['length']);
|
|
344
|
+
let _0x201391 = 0x0;
|
|
345
|
+
return _0x1012cc[_0x201391++] = _0x4becfd[_0x4f76b2(a18_0x240d25._0x48f86c)], _0x1012cc['set'](_0x4becfd, _0x201391), _0x201391 += _0x4becfd[_0x4f76b2(0x1ff)], _0x1012cc[_0x201391++] = _0x3cadd5[_0x4f76b2(0x1ff)], _0x1012cc[_0x4f76b2(0x1f1)](_0x3cadd5, _0x201391), _0x201391 += _0x3cadd5[_0x4f76b2(0x1ff)], _0x1012cc[_0x4f76b2(a18_0x240d25._0x3cb6eb)](_0x836e24[_0x4f76b2(a18_0x240d25._0x117e26)], _0x201391), _0x1012cc;
|
|
195
346
|
}
|
|
347
|
+
function decodeAttachment(_0x2ae091) {
|
|
348
|
+
const a18_0x5dab09 = {
|
|
349
|
+
_0x1bfc63: 0x22e,
|
|
350
|
+
_0x4289e5: 0x1fc,
|
|
351
|
+
_0x5e982b: 0x1fc
|
|
352
|
+
}, _0x55a642 = a18_0x5a3b;
|
|
353
|
+
let _0x52c9e6 = 0x0;
|
|
354
|
+
const _0x1a0f4b = _0x2ae091[_0x52c9e6++], _0x4e62b3 = TEXT_DECODER[_0x55a642(0x22e)](_0x2ae091[_0x55a642(0x1fc)](_0x52c9e6, _0x52c9e6 + _0x1a0f4b));
|
|
355
|
+
_0x52c9e6 += _0x1a0f4b;
|
|
356
|
+
const _0x5f2fb2 = _0x2ae091[_0x52c9e6++], _0x4c970a = TEXT_DECODER[_0x55a642(a18_0x5dab09._0x1bfc63)](_0x2ae091[_0x55a642(a18_0x5dab09._0x4289e5)](_0x52c9e6, _0x52c9e6 + _0x5f2fb2));
|
|
357
|
+
_0x52c9e6 += _0x5f2fb2;
|
|
358
|
+
const _0x451963 = _0x2ae091[_0x55a642(a18_0x5dab09._0x5e982b)](_0x52c9e6);
|
|
359
|
+
return {
|
|
360
|
+
'filename': _0x4e62b3,
|
|
361
|
+
'mimeType': _0x4c970a,
|
|
362
|
+
'data': _0x451963
|
|
363
|
+
};
|
|
364
|
+
}
|