Skip to content

Instantly share code, notes, and snippets.

@KeizerDev
Created November 30, 2015 15:31
Show Gist options
  • Save KeizerDev/0a4e6300535b1186373e to your computer and use it in GitHub Desktop.
Save KeizerDev/0a4e6300535b1186373e to your computer and use it in GitHub Desktop.
web.whatsapp.com spammer
/* User config */
var msgcount = 50;
var delay = 20;
var emojiTab = 3; /* Categorie */
var emojiNumber = 8; /* Nummer van emoji */
/* Script */
function getElementByXpath(path) { return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }
var winnniey = 0;
function sendMessage() {
setTimeout(function () {
var emojiButton = getElementByXpath('//*[@id="main"]/footer/div/button[1]');
emojiButton.click();
setTimeout(function () {
var tab = getElementByXpath('//*[@id="main"]/footer/span/div/div/button[' + emojiTab + ']');
tab.click();
setTimeout(function () {
var emoji = getElementByXpath('//*[@id="main"]/footer/span/div/span/div/div/span[' + emojiNumber + ']');
emoji.click();
setTimeout(function () {
var sendButton = getElementByXpath('//*[@id="main"]/footer/div/button[2]');
sendButton.click();
setTimeout(function () {
winnniey++;
if (winnniey < msgcount) {
sendMessage();
}
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}
sendMessage();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment