代码如下
$secret = "XXXXXXXXXXXXXXX";
$username = $_POST["username"];
$password = $_POST["password"];
if (!empty($_COOKIE["getmein"])) {
if (urldecode($username) === "admin" && urldecode($password) != "admin") {
if ($COOKIE["getmein"] === md5($secret . urldecode($username . $password))) {
echo "Congratulations! You are a registered user.\n";
die ("The flag is ". $flag);
}
else {
die ("Your cookies don't match up! STOP HACKING THIS SITE.");
}
}
else {
die ("You are not an admin! LEAVE.");
}
}
主要是 if ($COOKIE["getmein"] === md5($secret . urldecode($username . $password))) 这句怎么理解?$secret.urldecode($username . $password),这里的函数调用方式怎么这么奇怪?那个 " . "是什么意思?