Updated CAPTCHA code.
This commit is contained in:
parent
b610105c3b
commit
c1b056e22b
@ -50,7 +50,7 @@ async function getProcesses() {
|
|||||||
// 127.0.0.1:19322
|
// 127.0.0.1:19322
|
||||||
async function getNewCaptcha() {
|
async function getNewCaptcha() {
|
||||||
try {
|
try {
|
||||||
return await fetch("http://startpage.arav.home.arpa/captcha/").then(r => r.text());
|
return await fetch("http://startpage.arav.home.arpa/captcha/", {method: "POST"}).then(r => r.text());
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ async function solveCaptcha(id, answer) {
|
|||||||
body.append('answer', answer);
|
body.append('answer', answer);
|
||||||
let result = fetch(`http://startpage.arav.home.arpa/captcha/${id}`, { method: "POST", body: body } );
|
let result = fetch(`http://startpage.arav.home.arpa/captcha/${id}`, { method: "POST", body: body } );
|
||||||
return await result.then(r => {
|
return await result.then(r => {
|
||||||
return r.status == 200;
|
return r.status == 202;
|
||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user