Skip to content

Commit 7579f27

Browse files
authored
Update index.html
1 parent db74c78 commit 7579f27

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@ <h1 style="margin-bottom:20px;">Zero Bot Gate</h1>
6262

6363
async function hash( pass ) {
6464
var hash = CryptoJS.SHA256( pass + "noAI" );
65-
hash.toString(CryptoJS.enc.Base64);
66-
console.log("hashed password " + pass + " into " + hash );
65+
hash = hash.toString(CryptoJS.enc.Base64);
66+
console.log("hashed " + pass + " into " + hash );
6767
return hash;
6868
}
6969

7070
async function check( pass ) {
71+
7172
for (const stored of data) {
7273
const match = await pass === stored;
7374
if (match) return true;
@@ -76,12 +77,12 @@ <h1 style="margin-bottom:20px;">Zero Bot Gate</h1>
7677
}
7778

7879
async function test() {
79-
console.log("starting");
80+
console.log("STARTING");
8081
const input = await document.getElementById("in");
81-
const pass = input.innerHTML;
82+
const pass = input.value;
8283
console.log("password: " + pass);
8384
console.log("hashed: " + hash(pass));
84-
if ( check(pass) ) {
85+
if ( check(hash(pass)) ) {
8586
console.log("APROVED");
8687
} else {
8788
console.log("DENIED");

0 commit comments

Comments
 (0)