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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
<html>
<head >
<title>
worst website ever (real)
</title>
<link rel="icon" href="/src/kanna.gif" type="image/gif" />
<script src="/src/bundle.js"></script>
<style>
abbr {
font-style: italic;
position: relative
}
abbr:hover::after {
background: #add8e6;
border-radius: 4px;
bottom: 100%;
content: attr(title);
display: block;
left: 100%;
padding: 1em;
position: absolute;
width: 280px;
z-index: 1;
}
input{
background-color: rgba(200,200,200,.5);
backdrop-filter: blur(5px);
border-radius: 5px;
border:none;
}
</style>
</head>
<body onload="load()" style="height: 100%; overflow: hidden;">
<div id="kanna" onclick="lightsout()"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></div>
<script>
color1 = 50
color2 = 50
color3 = 50
let si = setInterval(()=>{
color1+=1
document.body.style.backgroundImage="linear-gradient(to bottom right,rgba(255,0,0,.5), rgba(255,255,255,1),rgba(255,255,255,1),rgba("+color1+","+color2+","+color3+",.5))"
if(color1>=255){
color1=0
color2+=1
if(color2>=255){
color2=0
color3+=1
if(color3>=255){
color3=0
}
}
}
},50)
const sid=makeid(20)
window.sid=sid
function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() *
charactersLength));
}
return result;
}
function lightsout(){
clearInterval(si)
document.body.style.backgroundImage=''
document.body.innerHTML=""
document.body.style.backgroundColor="black"
document.title = "DONT TOUCH KANNA"
setTimeout(()=>{
document.body.innerHTML='<img style="display:block;"src="src/lights-out.gif" id="gif" width=100% height=100%/>'
setTimeout(()=>{
document.body.innerHTML=''
},500)
},700)
}
function readTextFile(file)
{
var promise = new Promise((resolve, reject) => {
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
rawFile.onreadystatechange = function ()
{
if(rawFile.readyState === 4)
{
if(rawFile.status === 200 || rawFile.status == 0)
{
var allText = rawFile.responseText;
resolve(allText)
}
}
}
rawFile.send(null);
});
return(promise)
}
let pub = ''
function submit(){
//{body:{json:boolean,enc:boolean,data:string,sid:keyof keyring}}
var xhr = new XMLHttpRequest();
xhr.open("POST", window.location.href + 'login/submit', true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
alert(xhr.responseText);
}
}
let user = document.getElementById('user').value
let pass = document.getElementById('pass').value
let out = {}
Object.assign(out,{json:true,enc:true,sid:sid},{data:nodersa(pub,'pkcs8-public').encrypt({user:user,pass:pass,date: new Date()},'base64')})
xhr.send(JSON.stringify(out))
}
function sendenc(location,content){
var xhr = new XMLHttpRequest();
xhr.open("POST", window.location.href + location, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
pub=(xhr.responseText);
}
}
let out = {}
Object.assign(out,{json:true,enc:false},{data:nodersa(pub,'pkcs8-public').encrypt(content,{date: new Date()},'base64')})
xhr.send(JSON.stringify(out))
}
function sendnoenc(location,content){
var xhr = new XMLHttpRequest();
xhr.open("POST", window.location.href + location, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
pub=(xhr.responseText);
}
}
let out = {}
Object.assign(out,{json:true,enc:false},content)
xhr.send(JSON.stringify(out))
}
document.onkeypress = function (key) {
key = key || window.event;
if(key.key=="Enter"){
submit()
}
};
async function load(){
sendnoenc('pub.key',{sid:sid})
readTextFile("kanna.txt").then((kanna)=>{
let left = -300;
let top = -40;
let t = setInterval(()=>{
document.getElementById("kanna").innerHTML+="<div style='user-select: none;white-space: nowrap; position:absolute;left:"+left+"px;top:"+top+"%;transform:scale(.5)'><tt><b>"+(kanna.replaceAll("#","</br>").replaceAll(" ","<font style='color:rgba(1,1,1,0)'>_</font>"))+"</b></div></tt></a>"
left+=300
if (left>=600){
clearInterval(t)
setTimeout(()=>{
document.body.innerHTML+="<tt><div style='position:absolute;bottom:20px;left:50px;font-weight:100;'>login w/ {user:<input placeholder='root' type='text' id='user' name='user'>,pass:<input type='password' id='pass' name='pass'>}</br><sub>will be <abbr title='so that the \"network administrators\"/\"IT people\" cant get in >:) '>encrypted</abbr> dont worry:)<input style='background-color:rgba(80,80,80,.3);border-color:rgba(80,80,80,.1);border:line;border-radius:5px;' type='button' value='submit' onclick='submit()'></sub></div></tt>"
document.body.innerHTML+="<div style='position:absolute;bottom:20px;right:50px;user-select: none;cursor:pointer;' onclick=\"location.href='mailto:[email protected]';\"><tt>need a account? contact [email protected]<sub><sub>(click here)</sub></sub></tt></div>"
},50)
}
},80)
})
}
</script>
</body>
</tt>
</html>
|