Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 7ca4af5d authored by Sam Brow's avatar Sam Brow
Browse files

[ADD] Add challenge logic

parent 8d21359a
......@@ -2,15 +2,30 @@ let express = require('express')
let app = express()
app.get('/', function(req, res) {
res.sendFile(__dirname + '/index.html');
res.sendFile(__dirname + '/index.html')
});
app.get('/source', function(req, res) {
res.sendFile(__dirname + '/index.js');
res.sendFile(__dirname + '/index.js')
});
app.get('/flag', function(req, res) {
res.sendFile(__dirname + '/flag.txt');
let foundFlag = false
let text = req.param('text', '')
const targetText = "hacks_with_friends2020";
if (text.toLowerCase() === targetText.toLowerCase()) {
if (text.toUpperCase() !== targetText.toUpperCase()) {
foundFlag = true
}
}
if (foundFlag) {
res.sendFile(__dirname + '/flag.txt')
}
else {
res.send('Sorry, you did not find the flag!')
}
});
var server = app.listen(8081)
\ No newline at end of file
for (i = 1; i < 65535; i++) {
let c = String.fromCharCode(i)
let lowerC = c.toLowerCase()
let upperC = c.toUpperCase()
if (lowerC.toUpperCase() != upperC) {
console.log(c + ": " + i)
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment