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

46 lines
1.2 KiB
PHP

<?php
if(!isset($_COOKIE['fu'])) {
header ("location: index.php");
die();
} elseif ($_COOKIE['fu'] == "TmlDZSBUclkgbG9s") {
$img = "ganja";
} elseif ($_COOKIE['fu'] == "Tm90RXZlbkNsb3NlLi4u") {
$img = "smirk";
} else {
header ("location: index.php");
die();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Nice try, but no...</title>
<meta name="author" content="BenjaminVer">
<link rel='shortcut icon' href='assets/lock.png'>
<link type="text/css" rel="stylesheet" href="CSS/main.css"/>
<script type='text/Javascript' src='script/jQuery.js'></script>
<script type="text/javascript">
$(document).ready(function(){
setTimeout(function(){
window.location.href = "index.php?try=0";
}, 10000);
$('.full').click(function(){
window.location.href = "index.php?try=0";
})
})
</script>
</head>
<body>
<!-- Sure, because life just is that easy... -->
<div class="full">
<div id="nosolution">
Nice try, but no...<br>
<img src='assets/<?php echo $img; ?>.png'>
<img src='assets/<?php echo $img; ?>.png'>
<img src='assets/<?php echo $img; ?>.png'>
</div>
</div>
<footer>The code just got harder now... (click anywhere)</footer>
</body>
</html>