-
Notifications
You must be signed in to change notification settings - Fork 0
/
Inject.js
28 lines (23 loc) · 1.02 KB
/
Inject.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
// console.clear = () => console.log('Console was cleared')
let counter = 0;
const MAX_ATTEMPTS = 2000; // Approximately 10 seconds at 5 ms intervals
console.log('Lets start searching for CaptchaScript...');
const i = setInterval(() => {
console.log(`Попытка ${counter}: Checking for CaptchaScript...`);
if (window.CaptchaScript || counter > MAX_ATTEMPTS) {
clearInterval(i);
if (!window.CaptchaScript) {
console.log('CaptchaScript not found');
} else {
console.log('CaptchaScript found');
let params = gokuProps;
Array.from(document.querySelectorAll('script')).forEach(s => {
const src = s.getAttribute('src');
if (src && src.includes('captcha.js')) params.captcha_script = src;
if (src && src.includes('challenge.js')) params.challenge_script = src;
});
console.log('intercepted-params: ' + JSON.stringify(params));
}
}
counter++;
}, 5);