[BSidesCF 2020]Had a bad day
https://github.com/BSidesSF/ctf-2020-release/
点击两个按钮,url栏的category= 会发生变化
这里是伪协议的知识点:
——摘自:https://blog.csdn.net/weixin_44508748/article/details/108162951.
本题用到的就是filter这个伪协议
但是并没有正常得到,看一下报错信息
去掉一个php
然后得到
解码
找到关键部分
<?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.";
}
}
?>
那就是只要构造的url中伪协议的参数部分包含woofers meowers index任意一个即可