MJ: attack coordinator update / various fixes . captcha and back button and jitterloop 2 secs

This commit is contained in:
2026-05-03 12:40:20 +03:00
parent 47381a9304
commit eb31072c87
16 changed files with 1492 additions and 31 deletions

View File

@@ -14,15 +14,16 @@ function randInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Schedules fn to run after a random ms delay, then reschedules itself
function jitterLoop(fn, minMs, maxMs) {
function schedule() {
// Schedules fn to run after a random ms delay, then reschedules itself.
// Optional initialDelayMs sets the delay for the very first run only.
function jitterLoop(fn, minMs, maxMs, initialDelayMs) {
function schedule(delay) {
setTimeout(async () => {
await fn();
schedule();
}, randInt(minMs, maxMs));
schedule(randInt(minMs, maxMs));
}, delay);
}
schedule();
schedule(initialDelayMs !== undefined ? initialDelayMs : randInt(minMs, maxMs));
}
function log(msg) {