Skip to content

Instantly share code, notes, and snippets.

@m13m
Forked from flaredragon/whatsappspam.js
Created January 7, 2018 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m13m/2691800df0131cc10d39e8d036483d5b to your computer and use it in GitHub Desktop.
Save m13m/2691800df0131cc10d39e8d036483d5b to your computer and use it in GitHub Desktop.
Whatsapp Spam Bot
/*
WhatsApp Web Spam Script written by flaredragon.
====================================================================================
DISCLAIMER: I do not take any responsibility for any damage caused with this script.
====================================================================================
Usage: Copy all of this script (Ctrl+A, Ctrl+C).Visit WhatsApp Web, select your
desired contact and Press Ctrl+Shift+I to and paste it in the console and press Enter.
(Imp Note - Whatsapp Controls the message sending rate so sending ~500 together may
cause your Whatsapp to hang so use the script smartly)
====================================================================================
*/
//To Get The React Component
function findReactComponent(dom) {
for (var key in dom)
if (key.startsWith("__reactInternalInstance$")) {
var compInternals = dom[key]._currentElement;
var compWrapper = compInternals._owner;
var comp = compWrapper._instance;
return comp;
}
return null;
};
var inputComponent = findReactComponent(document.getElementsByClassName('block-compose')[0]);
//Get the react component for the chat input
var chat = inputComponent.props.chat;
//Set the number of times to send in the loop Eg - 10 Right now
for(var i=0;i<10;i++)
{
//Delay Helps in Sending Messages at a faster Rate
setTimeout(function(){
chat.sendMessage('Enter any Message here');
}, 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment