xzvbailss 0.0.1-security → 1.0.0

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.

Potentially problematic release.


This version of xzvbailss might be problematic. Click here for more details.

Files changed (115) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +388 -3
  3. package/WAProto/GenerateStatics.sh +3 -0
  4. package/WAProto/WAProto.proto +6902 -0
  5. package/WAProto/fix-imports.js +85 -0
  6. package/WAProto/index.js +242946 -0
  7. package/engine-requirements.js +10 -0
  8. package/lib/Defaults/index.js +130 -0
  9. package/lib/Signal/Group/ciphertext-message.js +12 -0
  10. package/lib/Signal/Group/group-session-builder.js +30 -0
  11. package/lib/Signal/Group/group_cipher.js +82 -0
  12. package/lib/Signal/Group/index.js +12 -0
  13. package/lib/Signal/Group/keyhelper.js +18 -0
  14. package/lib/Signal/Group/sender-chain-key.js +26 -0
  15. package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
  16. package/lib/Signal/Group/sender-key-message.js +66 -0
  17. package/lib/Signal/Group/sender-key-name.js +48 -0
  18. package/lib/Signal/Group/sender-key-record.js +41 -0
  19. package/lib/Signal/Group/sender-key-state.js +84 -0
  20. package/lib/Signal/Group/sender-message-key.js +26 -0
  21. package/lib/Signal/libsignal.js +431 -0
  22. package/lib/Signal/lid-mapping.js +277 -0
  23. package/lib/Socket/Client/index.js +3 -0
  24. package/lib/Socket/Client/types.js +11 -0
  25. package/lib/Socket/Client/websocket.js +84 -0
  26. package/lib/Socket/business.js +379 -0
  27. package/lib/Socket/chats.js +1193 -0
  28. package/lib/Socket/communities.js +431 -0
  29. package/lib/Socket/groups.js +374 -0
  30. package/lib/Socket/index.js +12 -0
  31. package/lib/Socket/luxu.js +386 -0
  32. package/lib/Socket/messages-recv.js +1916 -0
  33. package/lib/Socket/messages-send.js +1453 -0
  34. package/lib/Socket/mex.js +41 -0
  35. package/lib/Socket/newsletter.js +289 -0
  36. package/lib/Socket/socket.js +980 -0
  37. package/lib/Socket/username.js +234 -0
  38. package/lib/Store/index.js +10 -0
  39. package/lib/Store/keyed-db.js +108 -0
  40. package/lib/Store/make-cache-manager-store.js +85 -0
  41. package/lib/Store/make-in-memory-store.js +198 -0
  42. package/lib/Store/make-ordered-dictionary.js +75 -0
  43. package/lib/Store/object-repository.js +32 -0
  44. package/lib/Types/Auth.js +2 -0
  45. package/lib/Types/Bussines.js +2 -0
  46. package/lib/Types/Call.js +2 -0
  47. package/lib/Types/Chat.js +8 -0
  48. package/lib/Types/Contact.js +2 -0
  49. package/lib/Types/Events.js +2 -0
  50. package/lib/Types/GroupMetadata.js +2 -0
  51. package/lib/Types/Label.js +25 -0
  52. package/lib/Types/LabelAssociation.js +7 -0
  53. package/lib/Types/Message.js +11 -0
  54. package/lib/Types/Mex.js +37 -0
  55. package/lib/Types/Product.js +2 -0
  56. package/lib/Types/Signal.js +2 -0
  57. package/lib/Types/Socket.js +3 -0
  58. package/lib/Types/State.js +56 -0
  59. package/lib/Types/USync.js +2 -0
  60. package/lib/Types/index.js +26 -0
  61. package/lib/Utils/auth-utils.js +302 -0
  62. package/lib/Utils/browser-utils.js +49 -0
  63. package/lib/Utils/business.js +231 -0
  64. package/lib/Utils/chat-utils.js +872 -0
  65. package/lib/Utils/companion-reg-client-utils.js +35 -0
  66. package/lib/Utils/crypto.js +118 -0
  67. package/lib/Utils/decode-wa-message.js +350 -0
  68. package/lib/Utils/event-buffer.js +622 -0
  69. package/lib/Utils/generics.js +403 -0
  70. package/lib/Utils/history.js +134 -0
  71. package/lib/Utils/identity-change-handler.js +50 -0
  72. package/lib/Utils/index.js +23 -0
  73. package/lib/Utils/link-preview.js +85 -0
  74. package/lib/Utils/logger.js +3 -0
  75. package/lib/Utils/lt-hash.js +8 -0
  76. package/lib/Utils/make-mutex.js +33 -0
  77. package/lib/Utils/message-composer.js +273 -0
  78. package/lib/Utils/message-retry-manager.js +265 -0
  79. package/lib/Utils/messages-media.js +788 -0
  80. package/lib/Utils/messages.js +1260 -0
  81. package/lib/Utils/noise-handler.js +201 -0
  82. package/lib/Utils/offline-node-processor.js +40 -0
  83. package/lib/Utils/pre-key-manager.js +106 -0
  84. package/lib/Utils/process-message.js +630 -0
  85. package/lib/Utils/reporting-utils.js +258 -0
  86. package/lib/Utils/signal.js +201 -0
  87. package/lib/Utils/stanza-ack.js +38 -0
  88. package/lib/Utils/sync-action-utils.js +49 -0
  89. package/lib/Utils/tc-token-utils.js +163 -0
  90. package/lib/Utils/use-multi-file-auth-state.js +121 -0
  91. package/lib/Utils/validate-connection.js +203 -0
  92. package/lib/WABinary/constants.js +1301 -0
  93. package/lib/WABinary/decode.js +262 -0
  94. package/lib/WABinary/encode.js +220 -0
  95. package/lib/WABinary/generic-utils.js +204 -0
  96. package/lib/WABinary/index.js +6 -0
  97. package/lib/WABinary/jid-utils.js +98 -0
  98. package/lib/WABinary/types.js +2 -0
  99. package/lib/WAM/BinaryInfo.js +10 -0
  100. package/lib/WAM/constants.js +22853 -0
  101. package/lib/WAM/encode.js +150 -0
  102. package/lib/WAM/index.js +4 -0
  103. package/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
  104. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
  105. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
  106. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
  107. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
  108. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
  109. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
  110. package/lib/WAUSync/Protocols/index.js +6 -0
  111. package/lib/WAUSync/USyncQuery.js +98 -0
  112. package/lib/WAUSync/USyncUser.js +31 -0
  113. package/lib/WAUSync/index.js +4 -0
  114. package/lib/index.js +59 -0
  115. package/package.json +140 -4
package/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Adhiraj Singh
4
+ Copyright (c) 2022-2026 WhiskeySockets and Baileys contributors
5
+ Copyright (c) 2026 t.me/XzRzSynxC (modifications maintenance)
6
+
7
+ This software ("t.me/XzRzSynxC") is a derivative work based on Baileys
8
+ (https://github.com/WhiskeySockets/Baileys), originally created by Adhiraj Singh
9
+ and maintained by the WhiskeySockets community, licensed under the MIT License.
10
+ The original copyright notice above is retained as required by the MIT License.
11
+ Modifications, rebranding, and additional changes in this fork are
12
+ Copyright (c) 2026 t.me/XzRzSynxC.
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,390 @@
1
- # Security holding package
1
+ <div align="center">
2
2
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
3
+ <img src="https://files.catbox.moe/h81roe.jpg" width="500">
4
4
 
5
- Please refer to www.npmjs.com/advisories?search=xzvbailss for more information.
5
+ <br><br>
6
+
7
+ # baileys By XzV-ExpzC
8
+
9
+ **Library WhatsApp ringan berbasis Baileys**
10
+
11
+ baileys yang dikembangkan oleh t.me/XzRzSynxC dengan fokus pada pengelolaan pesan,
12
+ raw message relay, dan beberapa utilitas tambahan.
13
+
14
+ <br>
15
+
16
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-7C3AED?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/)
17
+ [![Baileys](https://img.shields.io/badge/Baileys-Based-A78BFA?style=for-the-badge)](https://github.com/WhiskeySockets/Baileys)
18
+ [![License](https://img.shields.io/badge/License-MIT-9333EA?style=for-the-badge)](LICENSE)
19
+
20
+ <br>
21
+
22
+ **XzV-ExpzC**
23
+
24
+ </div>
25
+
26
+ ---
27
+
28
+ > [!NOTE]
29
+ > **Tidak berafiliasi dengan WhatsApp atau Meta.**
30
+ > Gunakan library ini secara bertanggung jawab dan ikuti Terms of Service WhatsApp.
31
+
32
+ ## <\> Fitur
33
+
34
+ **Connection**
35
+ - WhatsApp Web connection
36
+ - QR authentication
37
+ - Pairing code
38
+ - Multi-device authentication
39
+
40
+ **Messaging**
41
+ - `sendMessage`
42
+ - `relayMessage`
43
+ - `XzVself`
44
+ - Raw message support
45
+ - Custom message structure
46
+ - Event handling
47
+
48
+ ---
49
+
50
+ ### instalation
51
+
52
+ ```json
53
+ "dependencis": {
54
+ "@whiskeysockets/baileys": "npm:xzvbailss@1.0.0",
55
+ }
56
+ ```
57
+ ```js
58
+ const {
59
+ useMultiFileAuthState
60
+ } = require('@whiskeysockets/baileys')
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Quick Start
66
+
67
+ ```js
68
+ const makeWASocket =
69
+ require('@whiskeysockets/baileys').default
70
+
71
+ const {
72
+ useMultiFileAuthState
73
+ } = require('@whiskeysockets/baileys')
74
+
75
+ async function start() {
76
+ const { state, saveCreds } =
77
+ await useMultiFileAuthState('./session')
78
+
79
+ const sock = makeWASocket({
80
+ auth: state
81
+ })
82
+
83
+ sock.ev.on(
84
+ 'creds.update',
85
+ saveCreds
86
+ )
87
+
88
+ sock.ev.on(
89
+ 'connection.update',
90
+ ({ connection }) => {
91
+ console.log(
92
+ 'Connection:',
93
+ connection
94
+ )
95
+ }
96
+ )
97
+ }
98
+
99
+ start()
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Mengirim Pesan
105
+
106
+ ### Text Message
107
+
108
+ ```js
109
+ await sock.sendMessage(
110
+ '628xxxxxxxxxx@s.whatsapp.net',
111
+ {
112
+ text: 'Hello'
113
+ }
114
+ )
115
+ ```
116
+
117
+ ### Image Message
118
+
119
+ ```js
120
+ await sock.sendMessage(
121
+ '628xxxxxxxxxx@s.whatsapp.net',
122
+ {
123
+ image: {
124
+ url: './image.jpg'
125
+ },
126
+ caption: 'Hello'
127
+ }
128
+ )
129
+ ```
130
+
131
+ ### Video Message
132
+
133
+ ```js
134
+ await sock.sendMessage(
135
+ '628xxxxxxxxxx@s.whatsapp.net',
136
+ {
137
+ video: {
138
+ url: './video.mp4'
139
+ },
140
+ caption: 'Hello'
141
+ }
142
+ )
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Raw Message Relay
148
+
149
+ `relayMessage()` digunakan untuk mengirim raw message object secara langsung.
150
+
151
+ ```js
152
+ await sock.relayMessage(
153
+ target,
154
+ message,
155
+ {
156
+ messageId: message.key.id
157
+ }
158
+ )
159
+ ```
160
+
161
+ ### `XzVself`
162
+
163
+ Untuk mencegah pesan yang di-relay tersinkronisasi kembali sebagai pesan sendiri:
164
+
165
+ ```js
166
+ await sock.relayMessage(
167
+ target,
168
+ message,
169
+ {
170
+ messageId: message.key.id,
171
+ XzVself: true
172
+ }
173
+ )
174
+ ```
175
+
176
+ > `XzVself: true` digunakan agar pesan yang di-relay tidak disinkronkan kembali ke perangkat pengirim.
177
+
178
+ ---
179
+
180
+ ## Contoh Relay
181
+
182
+ ### Conversation
183
+
184
+ ```js
185
+ await sock.relayMessage(
186
+ jid,
187
+ {
188
+ conversation: 'Hello'
189
+ },
190
+ {
191
+ XzVself: true
192
+ }
193
+ )
194
+ ```
195
+
196
+ ### Extended Text
197
+
198
+ ```js
199
+ await sock.relayMessage(
200
+ jid,
201
+ {
202
+ extendedTextMessage: {
203
+ text: 'Hello'
204
+ }
205
+ },
206
+ {
207
+ XzVself: true
208
+ }
209
+ )
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Events
215
+
216
+ Semua event tersedia melalui `sock.ev`.
217
+
218
+ ### Connection
219
+
220
+ ```js
221
+ sock.ev.on(
222
+ 'connection.update',
223
+ ({ connection }) => {
224
+ console.log(
225
+ 'Connection:',
226
+ connection
227
+ )
228
+ }
229
+ )
230
+ ```
231
+
232
+ ### Incoming Message
233
+
234
+ ```js
235
+ sock.ev.on(
236
+ 'messages.upsert',
237
+ ({ messages }) => {
238
+ for (const message of messages) {
239
+ console.log(
240
+ 'Incoming:',
241
+ message.message
242
+ )
243
+ }
244
+ }
245
+ )
246
+ ```
247
+
248
+ ### Credentials
249
+
250
+ ```js
251
+ sock.ev.on(
252
+ 'creds.update',
253
+ saveCreds
254
+ )
255
+ ```
256
+
257
+ ---
258
+
259
+ ## Authentication
260
+
261
+ Session disimpan secara lokal:
262
+
263
+ ```text
264
+ session/
265
+ ├── creds.json
266
+ ├── app-state-sync-key-*.json
267
+ └── ...
268
+ ```
269
+
270
+ Jangan upload folder `session` ke GitHub.
271
+
272
+ Tambahkan ke `.gitignore`:
273
+
274
+ ```gitignore
275
+ session/
276
+ node_modules/
277
+ .env
278
+ ```
279
+
280
+ ---
281
+
282
+ ## Contoh Lengkap
283
+
284
+ ```js
285
+ const makeWASocket =
286
+ require('@whiskeysockets/baileys').default
287
+
288
+ const {
289
+ useMultiFileAuthState
290
+ } = require('@whiskeysockets/baileys')
291
+
292
+ async function start() {
293
+ const { state, saveCreds } =
294
+ await useMultiFileAuthState('./session')
295
+
296
+ const sock = makeWASocket({
297
+ auth: state
298
+ })
299
+
300
+ sock.ev.on(
301
+ 'creds.update',
302
+ saveCreds
303
+ )
304
+
305
+ sock.ev.on(
306
+ 'connection.update',
307
+ ({ connection }) => {
308
+ console.log(
309
+ '[ CONNECTION ]',
310
+ connection
311
+ )
312
+ }
313
+ )
314
+
315
+ async function sendText(jid, text) {
316
+ return sock.sendMessage(
317
+ jid,
318
+ { text }
319
+ )
320
+ }
321
+
322
+ async function relay(jid, message) {
323
+ return sock.relayMessage(
324
+ jid,
325
+ message,
326
+ {
327
+ messageId: message.key.id,
328
+ XzVself: true
329
+ }
330
+ )
331
+ }
332
+ }
333
+
334
+ start()
335
+ ```
336
+
337
+ ---
338
+
339
+ ---
340
+
341
+ ## Credits
342
+
343
+ <div align="center">
344
+
345
+ **@XzRzSynxC**
346
+
347
+ Main Developer & Maintainer
348
+
349
+ <br>
350
+
351
+ Based on:
352
+
353
+ **Baileys**
354
+
355
+ </div>
356
+
357
+ ---
358
+
359
+ ## Disclaimer
360
+
361
+ Project ini dibuat untuk keperluan **development dan educational**.
362
+
363
+ Developer tidak bertanggung jawab atas penyalahgunaan library,
364
+ pembatasan akun, atau pelanggaran Terms of Service WhatsApp.
365
+
366
+ Gunakan secara bertanggung jawab.
367
+
368
+ ---
369
+
370
+ ## License
371
+
372
+ Project ini menggunakan **MIT License**.
373
+
374
+ Lihat [`LICENSE`](LICENSE) untuk informasi lebih lanjut.
375
+
376
+ ---
377
+
378
+ <div align="center">
379
+
380
+ <img src="https://img.shields.io/badge/XzV--RxVz-7C3AED?style=for-the-badge">
381
+
382
+ <br><br>
383
+
384
+ **XzV - ExpzC**
385
+
386
+ <br>
387
+
388
+ <sub>Built with Baileys · Maintained by @XzRzSynxC</sub>
389
+
390
+ </div>
@@ -0,0 +1,3 @@
1
+ yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify --no-comments -o ./index.js ./WAProto.proto;
2
+ yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify ./WAProto.proto | yarn pbts --no-comments -o ./index.d.ts -;
3
+ node ./fix-imports.js