Browse Source

increase bits((

master
SeraphJACK 3 years ago
parent
commit
7e96fa1c78
Signed by: SeraphJACK <seraphjack@outlook.com> GPG Key ID: 14162B46567AB06F
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      http/challenge.go
  2. +1
    -1
      static/js/worker.js

+ 1
- 1
http/challenge.go View File

@@ -35,5 +35,5 @@ func checkChallenge(ip net.IP, magic string) bool {
return false
}
}
return true
return hash[3]&0xF0 == 0
}

+ 1
- 1
static/js/worker.js View File

@@ -12,7 +12,7 @@ function findMagic(challengeString) {
if (challengeString !== null) {
for (let i=0n; true; i++) {
let result = sha256.array(challengeString + i.toString())
if (result[0] === 0 && result[1] === 0 && result[2] === 0) {
if (result[0] === 0 && result[1] === 0 && result[2] === 0 && result[3] & 0xF0 === 0) {
return i.toString()
}
}


Loading…
Cancel
Save