Advertisement
DragunovFZ

Whatsapp Spam

Aug 6th, 2018
1,750
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Whatsapp BotSpam
  2. var allElementsClassName = "m6ZEb";
  3. var buttonSendClass = "._35EW6";
  4. var inputMessageClassName = "_2S1VP";
  5.  
  6. var timer = setInterval(general, 1000);
  7.  
  8. function general() {
  9. if (document.getElementsByClassName(allElementsClassName)[0] != null) {
  10. var item = document.getElementsByClassName(allElementsClassName)[0];
  11. var element = item.cloneNode(true);
  12. element.innerHTML = 'Dragunov WA Spam<div style="height: 110px; width: 100%;"> \
  13. <input type="text" id="inputMessage" placeholder="Text to spam" style="margin-left: 10px; margin-top: 10px; width: calc(100% - 50px); height: 30px; padding-left: 10px"> \
  14. <hr style="border-color: white; color: #dbdbdb; background-color: #dbdbdb; border: none; height: 1px;"> \
  15. <div style="padding-left: 10px;"> \
  16. <div data-icon="send" class="imgiconicon-send" style="cursor:pointer; height: 36px; display: inline-block; width: 100%;"> \
  17. <input type="number" min="1" id="timesSend" placeholder="Jumlah Text" style="width:50px;padding-left: 10px;max-width: 40%;width: 80%;height: 30px;margin-right: 10px;float:left;"> \
  18. <button type="button" id="spam" style="background-color: transparent; color: transparent;"> \
  19. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="36" height="36" style="display: inline"> \
  20. <path opacity=".4" d="M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z"></path> \
  21. </svg> \
  22. </button> \
  23. </div> \
  24. </div> \
  25. </div>';
  26. item.appendChild(element);
  27. console.log("Spammed . . .");
  28. document.getElementById("spam").addEventListener("click", spam);
  29. clearInterval(timer);
  30. } else {
  31. console.log("Waiting for whatsapp to load...");
  32. }
  33. }
  34.  
  35. function dispatch(input, message) {
  36. var evt = new InputEvent('input', {
  37. bubbles: true
  38. });
  39. input.innerHTML = message;
  40. input.dispatchEvent(evt);
  41. document.querySelector(buttonSendClass).click();
  42. }
  43.  
  44. function spam() {
  45. var text = document.getElementById("inputMessage").value;
  46. var reps = document.getElementById("timesSend").value;
  47. var input = document.getElementsByClassName(inputMessageClassName + " copyable-text selectable-text")[0];
  48. var counter = 1;
  49. while (counter <= reps) {
  50. dispatch(input, text);
  51. counter++;
  52. }
  53. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement