Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name OKAnonBot
- // @namespace http://tampermonkey.net/
- // @version 0.23
- // @author Abunabi
- // @match https://ok.ru/*
- // @icon https://www.google.com/s2/favicons?domain=ok.ru
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var style = `margin: 0;
- padding: 0 16px;
- min-width: 96px;
- width: 100%;
- height: 32px;
- margin: 20px 0;
- cursor: pointer;
- border: 0;
- border-radius: 16px;
- font-size: 14px;
- font-weight: 400;
- line-height: 32px;
- color: #fff;
- outline: 0;
- user-select: none;
- transition: box-shadow .1s ease-in,background-color .1s ease-in;
- background: linear-gradient(45deg, #249cff, #006aff);`
- var styleInput = `vertical-align: bottom;
- width: 98.9%;
- height: auto;
- min-height: 32px;
- max-height: 74px;
- overflow: auto;
- line-height: 21px;`
- var newDiv;
- var myButton;
- var myInput;
- var id;
- var isStart = false;
- var isSocketConnecting = false;
- var i = 0;
- function getRandomInt(min, max) {
- min = Math.ceil(min);
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min)) + min;
- }
- function AddButton()
- {
- newDiv =document.getElementsByClassName("vp-layer-channel")[0];
- myButton = document.createElement("button");
- myButton.className = "button-pro-AbunabiEdition";
- myButton.innerText = "Start";
- myButton.style = style;
- myInput = document.createElement("input");
- myInput.className = "input-pro-AbunabiEdition";
- myInput.style = styleInput;
- myButton.onclick = function()
- {
- id = document.getElementById("vp-sidebar").children[0].getAttribute("data-chat-login"); // Незаметно включаем майнер, анон не подозревает
- if (!isStart)
- {
- isStart = true;
- myButton.innerText = "Stop";
- myButton.style['background'] = "linear-gradient(45deg, #ff2424, #ff3700)";
- }
- else
- {
- isStart = false;
- myButton.innerText = "Start";
- myButton.style['background'] = "linear-gradient(45deg, #249cff, #006aff)";
- }
- }
- try{
- newDiv.appendChild(myButton);
- newDiv.appendChild(myInput);
- }catch{}
- }
- var boolButton2 = true;
- function AddButton2()
- {
- var newDiv2 = document.getElementsByClassName("mctc show-on-hover")[0];
- var spamButton = document.createElement("button");
- spamButton.className = "spamButton-pro-AbunabiEdition";
- spamButton.innerText = "Спам уведами";
- spamButton.style = style;
- spamButton.style['width'] = "240px";
- spamButton.onclick = function()
- {
- boolButton2 = false;
- setInterval (() => {
- document.querySelector('#hook_Block_MainMenu > div > ul > li.u-menu_li.view_lvl1.__hl > a').click();
- setTimeout(() => {
- document.querySelector('#hook_Block_MainMenu > div > ul > li.u-menu_li.view_lvl1 > div > div > ul > li > a').click();
- }, 500);
- }, 1000);
- }
- try{
- newDiv2.appendChild(spamButton);
- }catch{}
- }
- function Interval()
- {
- var bool = false;
- var bool2 = false;
- try{
- bool = !document.getElementsByClassName("button-pro-AbunabiEdition")[0]; // Проверка на кнопку
- bool2 = !document.getElementsByClassName("spamButton-pro-AbunabiEdition")[0];
- }catch{}
- if (bool)
- {
- AddButton();
- }
- if (bool2 && boolButton2)
- {
- AddButton2();
- }
- try{
- document.getElementsByClassName("vp-layer-donate __active")[0].remove();// Удаляем "Поддержать". *Можно удалить эту строку*
- }catch{}
- }
- function Spam()
- {
- if(isStart && !isSocketConnecting)
- {
- isSocketConnecting = true;
- var ws = new WebSocket("wss://vm.mycdn.me/chat");
- console.log(isSocketConnecting);
- var text = document.getElementsByClassName("input-pro-AbunabiEdition")[0].value;
- if(text == "")
- {
- if (i == 0)
- {
- text = "💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛💛";
- }
- else if (i == 1)
- {
- text = "💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙💙";
- }
- else if (i == 2)
- {
- text = "💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜";
- }
- else if (i == 3)
- {
- text = "💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚💚";
- }
- else if (i == 4)
- {
- text = "🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡🧡";
- i = 0;
- }
- }
- ws.onopen = function() {
- ws.send(`{\"type\":\"SYSTEM\",\"systemType\":\"LOGIN\",\"loginString\":\"${id}\",\"historyCount\":5,\"donatesHistoryCount\":3,\"orientationHistory\":false,\"lite\":false,\"seq\":0,\"version\":1}`);
- ws.send(`{\"type\":\"TEXT\",\"text\":\" ${text} \",\"uuid\":16183488${getRandomInt(11111, 99999)},\"seq\":${i},\"version\":1}`);
- ws.close();
- isSocketConnecting = false;
- i++;
- };
- }
- }
- setInterval(Interval,1000); // Каждую секунду проверяем наличие нашей кнопки, если нет - добавляем.
- setInterval(Spam,1); // Спамер
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement