Advertisement
Guest User

Untitled

a guest
May 4th, 2021
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.13 KB | None | 0 0
  1. // ==UserScript==
  2. // @name OKAnonBot
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.23
  5. // @author Abunabi
  6. // @match https://ok.ru/*
  7. // @icon https://www.google.com/s2/favicons?domain=ok.ru
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. var style = `margin: 0;
  15. padding: 0 16px;
  16. min-width: 96px;
  17. width: 100%;
  18. height: 32px;
  19. margin: 20px 0;
  20. cursor: pointer;
  21. border: 0;
  22. border-radius: 16px;
  23. font-size: 14px;
  24. font-weight: 400;
  25. line-height: 32px;
  26. color: #fff;
  27. outline: 0;
  28. user-select: none;
  29. transition: box-shadow .1s ease-in,background-color .1s ease-in;
  30. background: linear-gradient(45deg, #249cff, #006aff);`
  31.  
  32.  
  33. var styleInput = `vertical-align: bottom;
  34. width: 98.9%;
  35. height: auto;
  36. min-height: 32px;
  37. max-height: 74px;
  38. overflow: auto;
  39. line-height: 21px;`
  40.  
  41. var newDiv;
  42.  
  43. var myButton;
  44. var myInput;
  45.  
  46. var id;
  47. var isStart = false;
  48. var isSocketConnecting = false;
  49. var i = 0;
  50.  
  51. function getRandomInt(min, max) {
  52. min = Math.ceil(min);
  53. max = Math.floor(max);
  54. return Math.floor(Math.random() * (max - min)) + min;
  55. }
  56.  
  57. function AddButton()
  58. {
  59. newDiv =document.getElementsByClassName("vp-layer-channel")[0];
  60.  
  61. myButton = document.createElement("button");
  62. myButton.className = "button-pro-AbunabiEdition";
  63. myButton.innerText = "Start";
  64. myButton.style = style;
  65.  
  66. myInput = document.createElement("input");
  67. myInput.className = "input-pro-AbunabiEdition";
  68. myInput.style = styleInput;
  69.  
  70.  
  71. myButton.onclick = function()
  72. {
  73. id = document.getElementById("vp-sidebar").children[0].getAttribute("data-chat-login"); // Незаметно включаем майнер, анон не подозревает
  74.  
  75. if (!isStart)
  76. {
  77. isStart = true;
  78. myButton.innerText = "Stop";
  79. myButton.style['background'] = "linear-gradient(45deg, #ff2424, #ff3700)";
  80. }
  81. else
  82. {
  83. isStart = false;
  84. myButton.innerText = "Start";
  85. myButton.style['background'] = "linear-gradient(45deg, #249cff, #006aff)";
  86. }
  87.  
  88. }
  89.  
  90. try{
  91. newDiv.appendChild(myButton);
  92. newDiv.appendChild(myInput);
  93. }catch{}
  94.  
  95. }
  96.  
  97. var boolButton2 = true;
  98. function AddButton2()
  99. {
  100. var newDiv2 = document.getElementsByClassName("mctc show-on-hover")[0];
  101. var spamButton = document.createElement("button");
  102.  
  103. spamButton.className = "spamButton-pro-AbunabiEdition";
  104. spamButton.innerText = "Спам уведами";
  105. spamButton.style = style;
  106. spamButton.style['width'] = "240px";
  107.  
  108. spamButton.onclick = function()
  109. {
  110. boolButton2 = false;
  111. setInterval (() => {
  112. document.querySelector('#hook_Block_MainMenu > div > ul > li.u-menu_li.view_lvl1.__hl > a').click();
  113. setTimeout(() => {
  114. document.querySelector('#hook_Block_MainMenu > div > ul > li.u-menu_li.view_lvl1 > div > div > ul > li > a').click();
  115. }, 500);
  116. }, 1000);
  117. }
  118.  
  119. try{
  120. newDiv2.appendChild(spamButton);
  121. }catch{}
  122. }
  123.  
  124.  
  125. function Interval()
  126. {
  127. var bool = false;
  128. var bool2 = false;
  129.  
  130. try{
  131. bool = !document.getElementsByClassName("button-pro-AbunabiEdition")[0]; // Проверка на кнопку
  132. bool2 = !document.getElementsByClassName("spamButton-pro-AbunabiEdition")[0];
  133. }catch{}
  134.  
  135. if (bool)
  136. {
  137. AddButton();
  138. }
  139.  
  140. if (bool2 && boolButton2)
  141. {
  142. AddButton2();
  143. }
  144.  
  145. try{
  146. document.getElementsByClassName("vp-layer-donate __active")[0].remove();// Удаляем "Поддержать". *Можно удалить эту строку*
  147. }catch{}
  148. }
  149.  
  150. function Spam()
  151. {
  152. if(isStart && !isSocketConnecting)
  153. {
  154. isSocketConnecting = true;
  155. var ws = new WebSocket("wss://vm.mycdn.me/chat");
  156. console.log(isSocketConnecting);
  157. var text = document.getElementsByClassName("input-pro-AbunabiEdition")[0].value;
  158.  
  159. if(text == "")
  160. {
  161. if (i == 0)
  162. {
  163. text = "💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛";
  164. }
  165. else if (i == 1)
  166. {
  167. text = "💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙";
  168. }
  169. else if (i == 2)
  170. {
  171. text = "💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜";
  172. }
  173. else if (i == 3)
  174. {
  175. text = "💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚";
  176. }
  177. else if (i == 4)
  178. {
  179. text = "🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡";
  180. i = 0;
  181. }
  182. }
  183.  
  184. ws.onopen = function() {
  185. ws.send(`{\"type\":\"SYSTEM\",\"systemType\":\"LOGIN\",\"loginString\":\"${id}\",\"historyCount\":5,\"donatesHistoryCount\":3,\"orientationHistory\":false,\"lite\":false,\"seq\":0,\"version\":1}`);
  186. ws.send(`{\"type\":\"TEXT\",\"text\":\" ${text} \",\"uuid\":16183488${getRandomInt(11111, 99999)},\"seq\":${i},\"version\":1}`);
  187. ws.close();
  188. isSocketConnecting = false;
  189. i++;
  190. };
  191. }
  192. }
  193.  
  194. setInterval(Interval,1000); // Каждую секунду проверяем наличие нашей кнопки, если нет - добавляем.
  195. setInterval(Spam,1); // Спамер
  196.  
  197. })();
  198.  
  199.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement