This file contains 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
const { WAProto } = require('@whiskeysockets/baileys'); | |
// Message Collectors / Wait for Message | |
class MessageCollection { | |
// Internal object to temporarily store msgs | |
#msgs = {}; | |
// Is the socket event handler binded? | |
isBinded = false; | |
socket = null; |
This file contains 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
const { Message } = require('whatsapp-web.js'); | |
// Message Collectors / Wait for Message | |
class MessageCollection { | |
// Internal object to temporarily store msgs | |
#msgs = {}; | |
// Is the client event handler binded? | |
isBinded = false; | |
client = null; |
This file contains 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
// Built around ShellTear's POC at #2215#issuecomment-1292885678 on @adiwajshing/baileys | |
// Copyright ~ purpshell | |
import crypto from 'node:crypto'; | |
const enc = new TextEncoder(); | |
/** | |
* Decrypt PollUpdate messages | |
*/ | |
export class PollUpdateDecrypt { |
This file contains 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
// some code to inject into whatsapp web, handles socket message decryption and logging and also provides Store. | |
// Copyright PurpShell/Rajeh Taher ~ 2023 | |
// also, check out my GitHub Sponsors @purpshell if you find this useful to you! | |
if (!window.mR) { | |
const moduleRaid = function () { | |
moduleRaid.mID = Math.random().toString(36).substring(7); | |
moduleRaid.mObj = {}; | |
fillModuleArray = function () { | |
(window.webpackChunkbuild || window.webpackChunkwhatsapp_web_client).push([ |
This file contains 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
if (!window.decodeBackStanza) { | |
window.decodeBackStanza = require("WAWap").decodeStanza; | |
window.encodeBackStanza = require("WAWap").encodeStanza; | |
} | |
require("WAWap").decodeStanza = async (e, t) => { | |
const result = await window.decodeBackStanza(e, t); |
This file contains 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
if (!window.decodeStanza) { | |
window.decodeStanza = require("WAWap").decodeStanza; | |
window.encodeStanza = require("WAWap").encodeStanza; | |
} | |
require("WAWap").decodeStanza = async (e, t) => { | |
const result = await window.decodeStanza(e, t); | |
console.log('RECV', result.toString(), result); |
This file contains 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
package connector | |
import ( | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/url" | |
"os" | |
"strings" |