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 / commands.go
Created October 12, 2024 01:09
a command that (partially works and) downloads mxc media
package connector
import (
"encoding/base64"
"encoding/json"
"fmt"
"log"
"net/url"
"os"
"strings"
@PurpShell
PurpShell / log.js
Last active September 4, 2024 12:59
A monitoring script based on Tulir's wa-web/web-scripts logging script, for 2.3000x
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);
@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 September 4, 2024 12:59
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 July 26, 2024 03:56 — 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;