Skip to content
Snippets Groups Projects
Commit 33841691 authored by Lukas Ruge's avatar Lukas Ruge
Browse files

basic infra for liftoff capture idea

parent 1f972eec
No related branches found
No related tags found
No related merge requests found
Pipeline #32947 passed
<script>
var subdomain = "liftoff.chaotikum.org"
var timeToAdd = 1000 * 60 * 60 * 24 * 7 * 4 * 6; //six month
......@@ -42,6 +43,9 @@ function markMissionAcc(mission) {
$( "#missionsy"+mission ).addClass('fa')
$( "#missionsy"+mission ).addClass('fa-check')
$( "#missionexplain"+mission ).hide();
if(mission == '86eba875-caad-45fb-a6ca-707c2a4af2c2') {
$( "#capturetheflag" ).hide();
}
}
jQuery(document).ready(function($) {
......@@ -229,6 +233,12 @@ jQuery(document).ready(function($) {
location.reload();
}
function correctresult() {
var captureValue = $("#capturetheflag").val();
var captureValueMD5 = md5(captureValue);
return captureValueMD5 == '5117c32dc80c20cc0b3ed5e653365c18';
}
function yesCookiesPlz() {
document.cookie = "noCookiesLiftoff=False;domain="+window.location.hostname+";path=/nobreakspace/liftoff/;expires="+utcTime+";SameSite=Strict"+cookiesecure;
document.cookie = "yesCookieLiftoff=True;domain="+window.location.hostname+";path=/nobreakspace/liftoff/;expires="+utcTime+";SameSite=Strict"+cookiesecure;
......@@ -262,6 +272,13 @@ jQuery(document).ready(function($) {
console.log(mission)
console.log(doneMissions)
if(mission == '86eba875-caad-45fb-a6ca-707c2a4af2c2') {
//this is the capture the flag
if(!correctresult()) {
return;
}
}
if(!doneMissions.includes(mission)) {
doneMissions.push(mission)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment