write-ups-challenges-2020-2021/break_the_gate/2.php

73 lines
1.8 KiB
PHP
Raw Permalink Normal View History

2022-11-24 17:03:20 +00:00
<?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:
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;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Level 2</title>
<meta charset="UTF-8">
<meta name="author" content="Benjamin Ver">
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script type="text/javascript" src="script/jquery.js"></script>
<script type="text/javascript" src="script/jquery-ui.js"></script>
<script type="text/javascript" src="script/main.js"></script>
<script type="text/javascript"> var userDb = {}; </script>
<script type="text/javascript" src="script/2.js"></script>
<script type="text/javascript" src="script/ssdb.js"></script>
</head>
<body>
<div class="front">
<div class="lock intel">
<img src="img/lock_locked.jpg">
</div>
<table class="unlockpad intel">
<tr>
<td class='formInfo'>Username:</td>
<td><input type="text" name="user" id="inp_user"></td>
</tr>
<tr>
<td class='formInfo'>Password:</td>
<td><input type="password" name="passw" id="inp_passw"></td>
</tr>
<tr>
<td colspan='2'>
<button id='submit'>Give it a shot...</button>
</td>
</tr>
</table>
</div>
<div class="half left"></div>
<div class="half right"></div>
</body>
</html>