1+ <!DOCTYPE html>
12< html >
23 < head >
34 < title > Zero Bots Allowed</ title >
4243 }
4344 </ style >
4445 </ head >
45-
46- < script >
47- const bcrypt = require ( 'bcrypt' ) ;
48-
49- const data = [
50- "password"
51- ]
52-
53- async function hash ( pass ) {
54- return await bcrypt . hash ( pass + "noAI" , 8 ) ;
55- }
56-
57- async function check ( pass ) {
58- for ( const stored of data ) {
59- const match = await bcrypt . compare ( pass , stored ) ;
60- if ( match ) return true ;
61- }
62- return false
63- }
64-
65- async function test ( ) {
66- print ( "starting" ) ;
67- const input = await document . getElementById ( "in" ) ;
68- const pass = input . innerHTML ;
69- print ( "password: " + pass ) ;
70- print ( "hashed: " + hash ( pass ) ;
71- if ( check ( pass ) ) {
72- print ( "APROVED" ) ;
73- } else {
74- print ( "DENIED" ) ;
75- }
76- }
77- </ script >
78-
79-
8046 < body >
8147 < div style ="margin-top:35vh; ">
8248 < h1 style ="margin-bottom:20px; "> Zero Bot Gate</ h1 >
@@ -86,5 +52,41 @@ <h1 style="margin-bottom:20px;">Zero Bot Gate</h1>
8652 < button class ="tostyle " href ="help.html "> Need a new passphrase?</ button >
8753 < p > By entering a passphrase and proceeding, you agree to our ToS.</ p >
8854 </ div >
55+ < script >
56+
57+
58+ const bcrypt = require ( 'bcrypt' ) ;
59+
60+ const data = [
61+ "password"
62+ ]
63+
64+ async function hash ( pass ) {
65+ return await bcrypt . hash ( pass + "noAI" , 8 ) ;
66+ }
67+
68+ async function check ( pass ) {
69+ for ( const stored of data ) {
70+ const match = await bcrypt . compare ( pass , stored ) ;
71+ if ( match ) return true ;
72+ }
73+ return false ;
74+ }
75+
76+ async function test ( ) {
77+ print ( "starting" ) ;
78+ const input = await document . getElementById ( "in" ) ;
79+ const pass = input . innerHTML ;
80+ print ( "password: " + pass ) ;
81+ print ( "hashed: " + hash ( pass ) ;
82+ if ( check ( pass ) ) {
83+ print ( "APROVED" ) ;
84+ } else {
85+ print ( "DENIED" ) ;
86+ }
87+ }
88+
89+
90+ </ script >
8991 </ body >
9092</ html >
0 commit comments