This commit is contained in:
grant-kun 2022-09-22 13:59:08 -05:00
commit 47e3ae4925
5 changed files with 248 additions and 0 deletions

110
index.html Normal file
View File

@ -0,0 +1,110 @@
<html>
<head >
<title>
worst website ever (real)
</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="jsencrypt.min.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;
}
</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>
function lightsout(){
document.body.innerHTML=""
document.body.style.backgroundColor="black"
document.title = "DONT TOUCH KANNA"
document.body.innerHTML='<img style="display:block;"src="lights-out.gif" id="gif" width=100% height=100%/>'
setTimeout(()=>{
document.getElementById("gif").src = "";
document.getElementById("gif").src = "lights-out.gif";
setTimeout(()=>{
document.body.innerHTML=''
},10)
},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)
} function submit(){
var xhr = new XMLHttpRequest();
xhr.open("POST", window.location.href + 'login/submit', true);
xhr.setRequestHeader('Content-Type', 'application/json');
let sign = new JSEncrypt()
sign.setPublicKey(`-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClTC6XhWz6iDHivz/F5A1q+C0Y
dVeaHnd1wktRLgRO3UEzXPnboniUqVgQfZ8QS6CNpwUjXEeolQmgnkqYNGYR/0Dc
EzrNWxCYiN4iLpKuVa0bGEiWo06CShpdgadgoN4FL+mOZybi7ccf2h8niyPfTO9L
6PS1zCGrFD4JibeEfwIDAQAB
-----END PUBLIC KEY-----`)
var singed = sign.encrypt(JSON.stringify({'date':new Date(),'user':document.getElementById("user").value,'pass':document.getElementById("pass").value}))
//console.log(singed,keys.publicKey)
//console.log(JSON.stringify({'data':singed}))
xhr.send(JSON.stringify({'data':singed,enc:true,json:true}))
$.get(window.location.href, function(responseText) {
document.body.innerHTML=(responseText);
});
}
function load(){
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='text' 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:grantsquires@disroot.org';\"><tt>need a account? contact grantsquires@disroot.org</tt></div>"
},50)
}
},80)
})
}
</script>
</body>
</tt>
</html>

71
index.ts Normal file
View File

@ -0,0 +1,71 @@
const express = require('express')
const app = express()
const port = 3000
const fs = require('fs')
const crypt = require("crypto")
const bodyParser = require("body-parser");
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
const priv = `
MIICXQIBAAKBgQClTC6XhWz6iDHivz/F5A1q+C0YdVeaHnd1wktRLgRO3UEzXPnb
oniUqVgQfZ8QS6CNpwUjXEeolQmgnkqYNGYR/0DcEzrNWxCYiN4iLpKuVa0bGEiW
o06CShpdgadgoN4FL+mOZybi7ccf2h8niyPfTO9L6PS1zCGrFD4JibeEfwIDAQAB
AoGAQrPBQWeYGGkJKGTgiSyDtZy8JdiEJy8QKbbjybh2CJUEEIP+V4Dyg5rqbI0k
uOCrwz2YtzIvwHmTzvrRQyYx4X5FZKH307QjFlKw+vNh4pskO6LRJlfp7K+gxLLM
rI/mP4xWpVqVzOyvwQaYO135yQMxJ7AdaMRZ1feC/lv38wECQQDlr7/xgkwRDDog
ijeIevBN5CUJVQeG+pm/YxojH18bTswN7Ctbur2HqMBwwcao7cycDcxzvkqMP+Ci
2CzLzRc/AkEAuDwISy+Sz3qJ/U+zFN0epbK1cXfHKuJQ9K33lAeTlsNJwewtu+sT
i0ielJ9lqeGYSUhjjCnEqEQyFZ8IwfWCwQJAdHmFaqFalaKPr4Sn2KwPRFCXf34B
DS/z25wT2w/DmQOCcuT6r8+o4SxwOj3p0iyU/+X3chJjl2+lKK9bOBZO3QJBAJxe
z8dI/Lm/TynCoMQfneiT0y8Ys+JxLrdOhSmOeLVo0cyXsoWiU/dPTtHkrLxQ7xmc
KGoJ9ZHAOCZj0mIWCMECQQDQw81CWK6OWrNKVd3B/nSqQB7kn3J9S/L+hVkDuKw9
5WAEevrUpd0m3GgKahWfH1XHyv4CIPMrksLfy3uV8ZBX
`
function decryptMessage(encryptedMessage:any, privateKey:any) {
const rsaPrivateKey = {
key: privateKey,
passphrase: '',
padding: crypt.constants.RSA_PKCS1_PADDING,
};
const decryptedMessage = crypt.privateDecrypt(
rsaPrivateKey,
Buffer.from(encryptedMessage, 'base64'),
);
return decryptedMessage.toString('utf8');
}
app.get('/', (req:any, res:any) => {
console.log("send")
res.sendFile(__dirname+"/index.html")
})
app.get('/kanna.txt', (req:any, res:any) => {
res.sendFile(__dirname+"/kanna.txt")
})
app.get('/jsencrypt.min.js', (req:any, res:any) => {
res.sendFile(__dirname+'/jsencrypt.min.js')
})
app.get('/lights-out.gif', (req:any, res:any) => {
res.sendFile(__dirname+'/lights-out.gif')
})
app.post('/login/submit', async (req:any, res:any) => {
console.log(req.body)
if(req.body.enc,req.body.json){
let request = await decryptMessage(req.body.data, crypt.createPrivateKey({
key: Buffer.from(priv, 'base64'),
format: "der",
type: 'pkcs1',
}))
request=JSON.parse(request)
console.log(request.user,request.pass)
//if(request.date==null){return}
if(request.user.trim() == "root" && request.pass.trim() == "password"){
console.log("hello:)")
res.sendFile(__dirname+"/index.html")
}
}
})
app.listen(port,'0.0.0.0', () => {
console.log(`Example app listening on port ${port}`)
})

2
jsencrypt.min.js vendored Normal file

File diff suppressed because one or more lines are too long

65
kanna.txt Normal file
View File

@ -0,0 +1,65 @@
/:::#
; ':/. _#
` -√#
. :-#
| :'#
,, ; __',,,,,"-------------"#
- - ',,'-,,''' '',---+--''__-__ '--// '--//#
,' - ".-+-'' `__'' ''' _'.' `__` :' '__` :`#
. - -'-·:.· ...---::--.+++,---,+-- '' --. _:` :' .:' :'#
`- ;, ___-- `__-/.--------.: '/...:',_, .:--`-- `. :. '.#
; _ ,_,` `.:/:::.'''' -- '-::--. -/::-` : __ :#
'. '/:' _-+-:.'' · _:- `·-·' '---' /-:::: / / /#
`. '_,' `.::-` ·- ' '' ''-.:. `-::` / :' /#
_ ·-;.' ,::.' __ · ' '-:-:· _- :`#
|- ·,-+-, '- '- :. '_/. _- _-#
'/ , ·_· : · / ':- '-. /#
: ; , __ -' : -- ./. `,.` /#
.- '' ' ·.· '-'''' ': . ./-.-.· /#
`:` ,,-'. ·- __ ''../...'''____-. '' +· /#
':- '·''· / __' .: '/ ·_ :'/ -.#
/.;;' - '- : / ''_/'' -.': '/#
;;-·'·--'' , : __ .: _''':''''___` : :' '' _'' '/#
'√' ·--+♪ ': `: /. : _-_ : / -.-... -:#
'; ♪ :' :: .: - :: :' :' :.` ,:.#
: '; / .-: .: - - :/ __ / ` _-:.#
-- :` ': ':.` -.: / ` ::` / `: :---`..#
'; '; /` -./ : : : '' /.: -` / `: -#
'♪ ,;' / : / .: : `: '' /': ' / : ''#
'' .-- _.'- / :-'/ /'': -; / : : -' '-#
♪·--' '_; _ .- /`-: ' :'': // _` :'- -` : _ -.#
,·' '..'. '. .' -.':. .: --'-: /\ :- / _' '' : : :#
._..' ·,· ; /'':',,,,:/''/.'/- /\` :: / _ _ / _ .-#
'''·-···-·----- ♪ ; ··`.:.'''-:-.-:-:-- /\` /- / '_ -: / _ /#
: ''''' :/- '-::___:.-::/-/-::-.:-.:.- //` '.:/___:'': :: _- _` /#
:' //-. .':/-__/-'../..':/'':''::- `::` '.:/''_:-': :/ :` __ .:`#
.: ::/-: - -::-.-/'''---+-+::/--+--' '-.' :-//:-'-:-,: :`: / __ '---#
/' ':::-/ --//.... -: / .' '.--· _--++·`/./`:-'-/--/..''':': / .:'''.-/#
:. :::-./ .` :'-... -: '_.'/ . ''.'.h:-.u/::-''/''+++::· `: .:....·#
'- -/.'.'/ - __ '/'''' :_.': '' ';----';''''-.:-.-::· :' _·#
'· ; ·/:'/.·/ ' .' -://::-' ':''' :'__' _: ' ': :.`:··:/: : :`#
'; . '/:- - / '' ___.- ''-.'-:''' :-.:. -: -::''/ - .:--:' / /#
_< . :-·' :· · ·_,,,,,:-:-'' :` .:''''./ ./:..` /-''/ / /#
., · `" .- ·/ · ':'--:::/: '+-.` .-.'': :::-#
'·/ / /· .' '_ · .·. . '-4 ''''/.:_,,' : ''-- `;/ `#
:^:^ ;/;. "' |' ': - ·____; ...--:--' _· · - -/#
·:·;. .2'-- '^ ·__··/ · : .,,.. ' _ '' : ::#
__· ;♪ --.' ''..: ,,, :` ''': ♪#
·__· ·,_'// '' '-- - - _- - / '' / ·#
_,_';/':, ' ''' _/ ... .- :.'' / ..#
_:;;:/' ' ' ':. : '' :'' '/ :#
.:.:''--_____'/ : ./ ' -' :#
'____...../. . ..:. '-' -: ''''- ♪#
__. / : `--. '----:/ `-._ '''__ :#
'..." _. · .' '...' ': + `--;-' _ _♪ `:#
.../ : ./. ___'_ '. ./~ `-.--.'' `/'-/ ♪#
·...:' :. /'''''''.',,,/:;..:'''''''''''_'..-/`---''''' -:''" :#
': :. :-----" --::---------:-/`'': _#
/ :.' -'''' '''''''' /`'.: :#
·- :-" `- `- ' .-#
:':.:. " :'' :#
'.: -.'" /''.- .-#
··· --.♪ /#
.: ♪#
:__#
·u·#

BIN
lights-out.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB