码迷,mamicode.com
首页 > Web开发 > 详细

php file_get_contents 绕过

时间:2016-10-19 01:33:05      阅读:2464      评论:0      收藏:0      [点我收藏+]

标签:

http://www.shiyanbar.com/ctf/1837

想到了经常出现的残留文件问题,于是尝试了一下:index.php~,index.php.bak,


$flag=‘xxx‘;
extract($_GET);
if(isset($shiyan))
{ $content=trim(file_get_contents($flag));

  if($shiyan==$content)
  { echo‘ctf{xxx}‘;
  }
  else{ echo‘Oh.no‘;}
}

file_get_contents 来获取网页文件 此时输入php://test  这样content就是空的  shiyan 参数不给他 这样空=空  输出了flag

脑洞啊脑洞

 

php file_get_contents 绕过

标签:

原文地址:http://www.cnblogs.com/test404/p/5975362.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!