打开题目
第一个if是让我们提交text值,text不为空,并且file_open_concents的返回值为'welcome to the zjctf',但这text是个变量,这里就需要用到php://input协议,以POST方式提交'welcome to the zjctf'。
第二个if是过滤了flag,如果检测flag,则返回"Not now",这里还发现了一个文件包含。
先将useless.php拖拽下来。
?text=php://input&file=php://filter/read=convert.base64-encoe/resource=useless.php
用bp拦截,并提交'welcome to the zjctf'
拿到源码后解码,构造序列化
访问此php文件即可得到
我们用$file提交password值获取flag