Skip to content

Commit f412f74

Browse files
authored
Update index.html
1 parent c948f14 commit f412f74

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

index.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h1 style="margin-bottom:20px;">Zero Bot Gate</h1>
5252
<button class="tostyle" href="help.html">Need a new passphrase?</button>
5353
<p>By entering a passphrase and proceeding, you agree to our ToS.</p>
5454
</div>
55-
<script>
55+
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js">
5656

5757

5858
const bcrypt = require('bcrypt');
@@ -62,7 +62,10 @@ <h1 style="margin-bottom:20px;">Zero Bot Gate</h1>
6262
]
6363

6464
async function hash( pass ) {
65-
return await bcrypt.hash(pass + "noAI", 8);
65+
var hash = CryptoJS.SHA256( pass + "noAI" );
66+
hash.toString(CryptoJS.enc.Base64);
67+
console.log("hashed password " + pass + " into " + hash );
68+
return hash;
6669
}
6770

6871
async function check( pass ) {
@@ -74,15 +77,15 @@ <h1 style="margin-bottom:20px;">Zero Bot Gate</h1>
7477
}
7578

7679
async function test() {
77-
print("starting");
80+
console.log("starting");
7881
const input = await document.getElementById("in");
7982
const pass = input.innerHTML;
80-
print("password: " + pass);
81-
print("hashed: " + hash(pass));
83+
console.log("password: " + pass);
84+
console.log("hashed: " + hash(pass));
8285
if ( check(pass) ) {
83-
print("APROVED");
86+
console.log("APROVED");
8487
} else {
85-
print("DENIED");
88+
console.log("DENIED");
8689
}
8790
}
8891

0 commit comments

Comments
 (0)