这是什么?点一下。
?file=show.php。试试能不能回到上级目录。
看来被过滤了,那没办法了,直接构造伪协议:
明文读取不行,我们试一下编码读取:
可以看到返回了一串base64编码,我们对其进行解码,得到如下代码:
<?php
error_reporting(0);
if(!$_GET[file]){echo '<a href="./index.php?file=show.php">click me? no</a>';}
$file=$_GET['file'];
if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data")){
echo "Oh no!";
exit();
}
include($file);
//flag:flag{f285b417425153e41a60b28032c76395}
?>
</html>
得到flag{f285b417425153e41a60b28032c76395}