进入题目,提示cookies伪造
查看url发现filename为base64加密,发现参数line
尝试查看index.php,base64加密
对参数line进行遍历
得到源码
error_reporting(0);
$file=base64_decode(isset($_GET['filename'])?$_GET['filename']:"");
$line=isset($_GET['line'])?intval($_GET['line']):0;
if($file=='') header("location:index.php?line=&filename=a2V5cy50eHQ=");
$file_list = array(
'0' =>'keys.txt',
'1' =>'index.php',
);
if(isset($_COOKIE['margin']) && $_COOKIE['margin']=='margin'){
$file_list[2]='keys.php';
}
if(in_array($file, $file_list)){
$fa = file($file);
echo $fa[$line];
}
?>
发现$_COOKIE['margin']=='margin'
于是cookie传参
发送但得不到flag 环境的问题
标签:cookies,GET,filename,file,line,php,margin From: https://www.cnblogs.com/v3n0m-cccccc/p/18288420