const express = require('express') var hbs = require('hbs'); var bodyParser = require('body-parser'); const md5 = require('md5'); var morganBody = require('morgan-body'); const app = express(); var user = []; //empty for now
var matrix = []; for (var i = 0; i < 3; i++){ matrix[i] = [null , null, null]; }
functiondraw(mat) { var count = 0; for (var i = 0; i < 3; i++){ for (var j = 0; j < 3; j++){ if (matrix[i][j] !== null){ count += 1; } } } return count === 9; }
for (var i = 0; i < 3; i++){ matrix[i] = [null , null, null];
} res.render('index'); })
app.get('/admin', (req, res) => { /*this is under development I guess ??*/ console.log(user.admintoken); if(user.admintoken && req.query.querytoken && md5(user.admintoken) === req.query.querytoken){ res.send('Hey admin your flag is <b>flag{prototype_pollution_is_very_dangerous}</b>'); } else { res.status(403).send('Forbidden'); } } )
app.post('/api', (req, res) => { var client = req.body; var winner = null;