-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
136 lines (118 loc) · 4.42 KB
/
index.html
File metadata and controls
136 lines (118 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto Slab' rel='stylesheet'>
<title>Zero Bots Allowed</title>
<link rel="icon" type="image/x-icon" href="icon.png">
<style>
body {
font-family:'Roboto Slab';
text-align:center;
background:#408000;
color:#aaff00;
font-size:25px;
padding:10px;
}
.tostyle {
background:#408000;
color:#aaff00;
border:none;
font-size:20px;
border-radius:10px;
padding:10px;
border:solid 3px #aaff00;
transition:.5s;
}
.tostyle:hover{
background:#aaff00;
color:#408000;
}
span {
cursor:pointer;
}
p {
font-size:20px;
padding-top:10px;
}
.bar {
text-align:center;
position:fixed;
bottom:20px;
left:50%;
transform: translate(-50%, -50%);
}
.bar > span {
color:#80C000;
margin:20px;
}
/* things for shine effect */
.shine {
-webkit-mask-image: linear-gradient(-45deg, #000f 30%, #0004 50%, #000f 70%);
-webkit-mask-size: 200%;
-webkit-mask-position: -50%;
animation: shine 2s linear;
}
@-webkit-keyframes shine {
from {
-webkit-mask-position: 150%;
}
to {
-webkit-mask-position: -50%;
}
}
</style>
</head>
<body>
<div style="margin-top:35vh;">
<h1 style="margin-bottom:15px;">Zero Bot Gate</h1>
<input type="password" placeholder="Enter Your Passphrase" name="in" required id="in" class="tostyle shine"/>
<span type="submit" onclick="test()" class="tostyle" style="margin-left:20px;width:25px;text-align:center;margin-bottom:30px;display:inline-block;">></span>
<div></div>
<span class="tostyle" onclick="relocate('new')">Need a new passphrase?</span>
<p>By continuing to use this site, you agree to our T&C.</p>
</div>
<div class="bar">
<span onckick="relocate('agree')">View T&C</span>
<span onckick="relocate('about')">About ZBG</span>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
<script>
const data = [
"password",
"thisisatest",
"pKYrc1jM4lVnOUGNZrLKhA8GyaR+ntn1maY4YcMgqK4=" // 'apple'
]
function relocate(goto) {
window.location.href = goto + ".html";
}
function hash( pass ) {
var hash = CryptoJS.SHA256( pass + "noAI" );
hash = hash.toString(CryptoJS.enc.Base64);
console.log(" hashed " + pass + " into " + hash );
return hash;
}
function check( pass ) {
for (const stored of data) {
const match = ( pass === stored );
console.log(" checking " + pass + " against " + stored);
console.log(" > returned " + match);
if (match) return true;
}
return false;
}
async function test() {
console.log("STARTING");
const input = await document.getElementById("in");
const pass = input.value;
console.log("password: " + pass);
console.log("hashed: " + hash(pass) );
console.log("checkign against data");
if ( check( hash(pass) ) ) {
console.log("APROVED");
} else {
console.log("DENIED");
}
}
</script>
</body>
</html>