src/source.txt
This commit is contained in:
parent
722a41f0bc
commit
bb6d19b4aa
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
$flag = "XXXXXXXXXXXXXXXXXXXXXX";
|
||||
$secret = "XXXXXXXXXX";
|
||||
|
||||
if(!isset($_POST["username"]) || !isset($_POST["password"])){
|
||||
exit();
|
||||
}
|
||||
$username = $_POST["username"];
|
||||
$password = $_POST["password"];
|
||||
|
||||
if (!empty($_COOKIE["check"])) {
|
||||
|
||||
|
||||
if (urldecode($username) === "admin" && urldecode($password) != "admin") {
|
||||
if ($_COOKIE["check"] === md5($secret . urldecode($username . $password))) {
|
||||
echo "Login successful.\n";
|
||||
die ("The flag is ". $flag);
|
||||
}
|
||||
else {
|
||||
die ("Wrong Cookies. Get out!");
|
||||
}
|
||||
}
|
||||
else {
|
||||
die ("Admins only");
|
||||
}
|
||||
}
|
||||
|
||||
setcookie("ahash", md5($secret . urldecode("admin" . "admin")), time() + (60 * 60 * 24 * 7));
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user