Last active
September 7, 2022 19:28
-
-
Save dewanshDT/eaf93ef90f2f40b3ccd1b2435f8b6dac to your computer and use it in GitHub Desktop.
This is the WhatsApp spam bot made with JavaScript by dewanshDT.
This file contains hidden or 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
/* | |
* This is a whatsapp web spam bot made with vanilla javascript. | |
* | |
* -> copy and paste this spam function defination in the console after opening the console. | |
* -> paste enter and then done! your bot is ready to use. | |
* | |
* <--------- To use the bot ---------> | |
* | |
* just use this function as shown below -> | |
* | |
* spam(text string: "sample text", count number: 0); | |
* | |
* e.g. spam("hello world", 100); | |
* | |
* this example sends hello world message 100 times. | |
* | |
* made with <3 by @ThakurDewansh follow me on twitter. | |
*/ | |
function spam(text, count) { | |
const textField = document.querySelectorAll("._2lMWa"); | |
let runCount = 0; | |
while (runCount < count) { | |
if (textField) { | |
var evt = new InputEvent("input", { | |
bubbles: true, | |
composer: true, | |
}); | |
textField[1].innerHTML = text; | |
textField[1].dispatchEvent(evt); | |
const button = document.querySelector(".tvf2evcx.oq44ahr5.lb5m6g5c.svlsagor.p2rjqpw5.epia9gcq"); | |
if (button) { | |
button.click(); | |
} else { | |
console.error("button does not exist"); | |
break; | |
} | |
} else { | |
console.error("text field does not exist"); | |
break; | |
} | |
runCount++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment