misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-23 00:07:09 +01:00
parent f3dd84ebc4
commit 63cea73f8e
75 changed files with 179 additions and 179 deletions

View file

@ -8,14 +8,14 @@ function onRequest(req, res) {
if( req.Path == "/test-page" ){
res.Status = 200;
res.ContentType = "text/html";
res.Headers = "Server: bettercap-ng\r\n" +
res.Headers = "Server: bettercap\r\n" +
"Connection: close";
res.Body = "<html>" +
"<head>" +
"<title>Test Page</title>" +
"</head>" +
"<body>" +
"<div align=\"center\">Hello world from bettercap-ng!</div>" +
"<div align=\"center\">Hello world from bettercap!</div>" +
"</body>" +
"</html>";
}
@ -25,14 +25,14 @@ function onRequest(req, res) {
function onResponse(req, res) {
if( res.Status == 404 ){
res.ContentType = "text/html";
res.Headers = "Server: bettercap-ng\r\n" +
res.Headers = "Server: bettercap\r\n" +
"Connection: close";
res.Body = "<html>" +
"<head>" +
"<title>Test 404 Page</title>" +
"</head>" +
"<body>" +
"<div align=\"center\">Custom 404 from bettercap-ng.</div>" +
"<div align=\"center\">Custom 404 from bettercap.</div>" +
"</body>" +
"</html>";
}