这道题十分简单,按要求先F12查看源码,这样看着就方便多了
I put something in F12 for you
include 'flag.php';
$flag='MRCTF{xxxxxxxxxxxxxxxxxxxxxxxxx}';
if(isset($_GET['gg'])&&isset($_GET['id'])) {
$id=$_GET['id'];
$gg=$_GET['gg'];
if (md5($id) === md5($gg) && $id !== $gg) {
echo 'You got the first step';(md5绕过)
if(isset($_POST['passwd'])) {
$passwd=$_POST['passwd'];
if (!is_numeric($passwd))(php弱比较)
{
if($passwd==1234567)
{
echo 'Good Job!';
highlight_file('flag.php');
die('By Retr_0');
}
else
{
echo "can you think twice??";
}
}
else{
echo 'You can not get it !';
}
}
else{
die('only one way to get the flag');
}
}
else {
echo "You are not a real hacker!";
}
}
else{
die('Please input first');
}
}Please input first
上述代码中只有两个要绕过的地方,一是md5二是is_numeric,俩个都是简单的绕过,在之前的题目中都有出现过。
这里md5是三个等于号,需要用数组绕过。
?gg[]=2&&id[]=1
接着php弱比较在1234567后面加个字母绕过就行,不过这里要用post的方式传入
最后会高亮起flag