Skip to content

Instantly share code, notes, and snippets.

View PurpShell's full-sized avatar
🎯
Focusing

Rajeh Taher PurpShell

🎯
Focusing
View GitHub Profile
@PurpShell
PurpShell / monitor.js
Created May 13, 2024 14:48
Monitor Socket messages on 2.3000x and above
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);
@PurpShell
PurpShell / inject.js
Last active June 20, 2024 15:17
A script to monitor messages in a WhatsApp socket - If you find this useful, please donate ( https://github.com/sponsors/Purpshell ) :D
// 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([
@PurpShell
PurpShell / PollUpdateDecrypt.ts
Last active March 6, 2024 04:32
Poll Update Message Decryption
// 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 {
@PurpShell
PurpShell / MessageCollector.js
Last active December 30, 2022 21:59
Message Collector for WWebJS v1
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;
@PurpShell
PurpShell / MessageCollectior.js
Last active August 9, 2023 23:08 — forked from Iucasmaia/maia.js
Message Collector for Baileys v4 and above
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;