write-ups-challenges-2019-2020/Padlock/success.php
2022-11-24 22:43:03 +01:00

44 lines
895 B
PHP

<?php
$stay = False;
$try = intval($_POST['try1']);
$try += intval($_POST['try10']) * 10;
$try += intval($_POST['try100']) * 100;
switch ($try) {
case 329:
$stay = True;
break;
case 420:
setcookie("fu", "TmlDZSBUclkgbG9s", time()+3600);
header ("location: bamboozle.php");
die();
break;
case 690:
case 69:
setcookie("fu", "Tm90RXZlbkNsb3NlLi4u", time()+3600);
header ("location: bamboozle.php");
die();
break;
default:
break;
}
if (!$stay) {
header ("location: index.php?try=" . $try);
die();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Page unlocked!</title>
<meta name="author" content="BenjaminVer">
<link rel="shortcut icon" href="assets/open.png">
<link type="text/css" rel="stylesheet" href="CSS/main.css"/>
</head>
<body>
<div class="full">
<div id="solution">IG{w31C0mE_7O_tH3_m47R1x}</div>
</div>
</body>
</html>