-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
57 lines (47 loc) · 1.68 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
let keyDownEvent = new KeyboardEvent("keydown", { key: "space" });
let keyUpEvent = new KeyboardEvent("keyup", { key: "space" });
console.log("%c Bot started. Waiting for the first request being sent. ", "background: #050; color: #0f0");
function legitPop() {
document.dispatchEvent(keyDownEvent);
document.dispatchEvent(keyUpEvent);
}
async function legitMassPop(pop_count) {
for (let i = 0; i < pop_count; i++) {
legitPop();
console.log(`[${new Date().toLocaleTimeString()}] %cpops sent Success`, "color: #0f0");
}
}
function legitClearCookie(cookie_name) {
let cookies = document.cookie.split(";").map((cookieString) => {
let cookieArray = cookieString.trim().split("=");
return {
name: cookieArray[0] ? cookieArray[0] : "",
propertyString: cookieArray[1] ? cookieArray[1] : ""
};
});
let filteredCookies = cookies.filter(
(cookie) =>
cookie.propertyString && cookie.name.toLowerCase() !== cookie_name
);
let cookieStringArray = filteredCookies.map((cookie) =>
cookie.name.concat("=").concat(cookie.propertyString)
);
let cookieString = cookieStringArray.join("; ");
document.cookie = cookieString;
}
function legitResetSequentialMaxPops() {
let vueElement = document.getElementById("app").__vue__;
vueElement.sequential_max_pops = 0;
}
function legitMassPopProcess(pop_count, cookie_name) {
legitClearCookie(cookie_name);
legitResetSequentialMaxPops();
legitMassPop(pop_count);
}
function legitStartAutomation(pop_count, interval = 30e3, cookie_name = "bot") {
legitMassPopProcess(pop_count, cookie_name);
setInterval(() => {
legitMassPopProcess(pop_count, cookie_name);
}, interval);
}
legitStartAutomation(800);