mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
switch 2 maps, one for ddos enabled, the other to disable captcha leaving only POW
minor change script messages todo: update CLI to allow changing
This commit is contained in:
@@ -9,7 +9,7 @@ if (window.Worker) {
|
||||
finished = true;
|
||||
workers.forEach(w => w.terminate());
|
||||
const [workerId, answer] = e.data;
|
||||
console.log('Worker', workerId, 'returned answer', answer);
|
||||
console.log('Worker', workerId, 'returned answer', answer, 'in', Date.now()-start+'ms');
|
||||
document.cookie='z_ddos_pow='+answer+';expires=Thu, 31-Dec-37 23:55:55 GMT; path=/;';
|
||||
const dummyTime = 4000 - (Date.now()-start);
|
||||
window.setTimeout(function(){
|
||||
|
@@ -18,7 +18,7 @@ onmessage = async function(e) {
|
||||
if(result[challengeIndex] === 0xb0
|
||||
&& middle === true
|
||||
&& result[challengeIndex+difficulty+1] === 0x0b){
|
||||
console.log('Worker thread found solution', challenge, i, result[challengeIndex], result[challengeIndex+1]);
|
||||
console.log('Worker thread found solution:', i);
|
||||
postMessage([id, i]);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user