-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
116 lines (115 loc) · 4.52 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="jatloesmile-hd.png">
<title>Login</title>
<style>
#external {
display: table;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
#center {
margin: auto;
width: 50%;
padding: 10px;
text-align: center;
width: 400px;
}
#vertical {
vertical-align: middle;
display: table-cell;
}
#Info {
font-size: 14pt;
}
.textbox {
height:30px;
font-size:14pt;
}
.formsize {
font-size: 18pt;
}
.submit {
height: 30px;
width: 60px;
font-size: 12pt;
background-color:rgba(0,128,255,1);
}
.bottom {
position: absolute;
bottom: 10px;
width: 99%;
text-align: center;
}
#discordlink {
color: black;
font-size: 24px;
}
body {
background-image: url('background.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
</style>
<meta name="google-site-verification" content="niAMN65QTZYzUZv1FFEhzVUKOeRIuXkxbFrc3t5MlY0" />
</head>
<body>
<div id="external">
<div id="vertical">
<div id="center">
<p id="Info"></p>
<form name="myForm" onsubmit="return validateForm()">
<label for="user" class="formsize">Username:</label><br><br>
<input type="text" id="user" name="user" class="textbox"><br><br>
<label for="pass" class="formsize">Password:</label><br><br>
<input type="password" id="pass" name="pass" class="textbox"><br><br>
<input type="submit" value="Login" class="submit">
</form>
</div>
</div>
</div>
<div class="bottom"><a href="https://discord.gg/bD5tV9mf7K" id="discordlink">Discord</a></div>
</body>
<script>
var sha256=function a(b){function c(a,b){return a>>>b|a<<32-b}for(var d,e,f=Math.pow,g=f(2,32),h="length",i="",j=[],k=8*b[h],l=a.h=a.h||[],m=a.k=a.k||[],n=m[h],o={},p=2;64>n;p++)if(!o[p]){for(d=0;313>d;d+=p)o[d]=p;l[n]=f(p,.5)*g|0,m[n++]=f(p,1/3)*g|0}for(b+="\x80";b[h]%64-56;)b+="\x00";for(d=0;d<b[h];d++){if(e=b.charCodeAt(d),e>>8)return;j[d>>2]|=e<<(3-d)%4*8}for(j[j[h]]=k/g|0,j[j[h]]=k,e=0;e<j[h];){var q=j.slice(e,e+=16),r=l;for(l=l.slice(0,8),d=0;64>d;d++){var s=q[d-15],t=q[d-2],u=l[0],v=l[4],w=l[7]+(c(v,6)^c(v,11)^c(v,25))+(v&l[5]^~v&l[6])+m[d]+(q[d]=16>d?q[d]:q[d-16]+(c(s,7)^c(s,18)^s>>>3)+q[d-7]+(c(t,17)^c(t,19)^t>>>10)|0),x=(c(u,2)^c(u,13)^c(u,22))+(u&l[1]^u&l[2]^l[1]&l[2]);l=[w+x|0].concat(l),l[4]=l[4]+w|0}for(d=0;8>d;d++)l[d]=l[d]+r[d]|0}for(d=0;8>d;d++)for(e=3;e+1;e--){var y=l[d]>>8*e&255;i+=(16>y?0:"")+y.toString(16)}return i};
function validateForm() {
let data = [
["jatloe", "a898185315a96fa28b1afc90ad9b9ec94e4a1816ababf0cfce04b07e11e4ccbd"],
["john0512", "6deabfb4777640d3f95c27d9ff6938a5638d39c556d4f8275778f7d6ee88dbac"],
["wolog", "770ec80f66164eb7487c4409824e74a12d3ea93369f02fccf1be7b9ee9d72a0f"],
["cornie", "f55a648704dbfceb96b3e2d9bd5dc952c16d67ac4dfb331db5416dac650fcbf8"],
["Romey", "6d9a840397431871a4d334d9343c3db26dec20fcc15af6070c1be4d7452a7795"],
["test", "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"],
["DottedCalculator", "300fc4289c0d4523cd579b63016250ca939497a7d6d2be18a61b6f005c3e9d62"],
["rp", "33ed3419cad5f354d335275f08b1e3c3fa7121241fc6ec446a347329551c81be"],
["mathemolympiad", "bdc607f1ff1bc84007392b1fb84bd88ef389f87b96d49989651dc4f54110fe7c"],
["moonblade", "0f52fc7c1a0f5fb31c1ba8ee4972c5c0456ac1e65799fe1ca2a57383b88b7051"],
["mahaler", "62e682b01df04cd578e7d20086679212491bf04112c8100d952fad55c8c8febc"],
];
let user = document.forms["myForm"]["user"].value;
let pass = document.forms["myForm"]["pass"].value;
for (let x of data) {
if (x[0] == user) {
if (x[1] == sha256(pass)) {
window.localStorage.setItem("user",user);
if (user != "jatloe") {
window.location.href = "mainview.html";
} else {
window.location.href = "jatloeview.html";
}
return false;
}
document.getElementById('Info').innerText = "Your password does not match your username."
return false;
}
}
document.getElementById('Info').innerText = "Invalid username."
return false;
}
</script>
</html>