Open source

This commit is contained in:
Kaan Soral
2023-10-15 13:06:58 +03:00
parent 256ce800e7
commit 553b121f17
2633 changed files with 769945 additions and 454 deletions
+43
View File
@@ -0,0 +1,43 @@
var server_password="adventureland";
var account_email="hello@adventure.land";
var account_password="gg123456";
var server_port=9012;
var url=require('url');
var app=require('http').createServer(http_handler);
app.listen(server_port);
function http_handler(request,response)
{
var body = [];
request.on('error', function(err) {
console.log("http_err: "+err,1);
}).on('data', function(chunk) {
body.push(chunk);
}).on('end', function() {
body = Buffer.concat(body).toString();
try{
var url_parts=url.parse(request.url,true),args=url_parts.query,cookies={},output="";
(body||"").split("&").forEach(function(pv){
var pvp=pv.split("=");
args[pvp[0]]=pvp[1];
});
if(cookies.password!=server_password)
{
response.writeHead(200);
response.end(html_password());
}
response.writeHead(200);
response.end(output);
}catch(e){
console.log("chttp_err: "+e,1);
}
});
}
function html_password()
{
return "What is the password?";
}