-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflag_3.php
More file actions
66 lines (59 loc) · 1.41 KB
/
flag_3.php
File metadata and controls
66 lines (59 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
$cookie_name = "user";
$cookie_value = "9b7e21866926df6dc3f12babaeafe2b9";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
font-family: Arial;
background-image: url(images/cookies.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
* {
box-sizing: border-box;
}
form.cmd button {
margin-top: 20%;
width: 20%;
padding: 20px;
background: #2196F3;
color: white;
font-size: 17px;
border: 1px solid grey;
border-left: none;
cursor: pointer;
}
form.cmd button:hover {
background: #0b7dda;
}
form.cmd::after {
content: "";
clear: both;
display: table;
}
</style>
</head>
<body>
<center>
<form class="cmd" action="flag_3.php" method="POST">
<button type="submit" name="btn" onclick="alert('Hmm Yammy Thanks Alex Porter but admin cookies were more tasty');">Feed Me</button>
</form>
<?php
if(!isset($_COOKIE[$cookie_name])) {
echo "Cookie named '" . $cookie_name . "' is not set!";
} else {
if($_COOKIE[$cookie_name] == "21232f297a57a5a743894a0e4a801fc3"){
echo "<br><h1>Okay You Got Me Here is your Flag </h1><!--UGFydC0zIGxpdHRsZV9HZWVreUFzcw== -->";
}
}
?>
</center>
</body>
</html>