write-ups-challenges-2020-2021/break_the_gate/index.php
2022-11-24 18:03:20 +01:00

33 lines
565 B
PHP

<?php
require('flags.php');
if(!isset($_COOKIE['currentLevel'])) {
setcookie("currentLevel", "Flags_will_appear_here_when_you_complete_a_level...", time()+24*60*60);
}
switch ($_COOKIE['currentLevel']) {
case $flag_1:
header('Location: 2.php');
break;
case $flag_2:
header('Location: 3.php');
break;
case $flag_3:
header('Location: 4.php');
break;
case $flag_4:
header('Location: 5.php');
break;
case $flag_5:
header('Location: final.php');
break;
default:
header('Location: 1.php');
break;
}
exit()
?>