1. 程式人生 > >BugKu中套路滿滿的題-------速度要快

BugKu中套路滿滿的題-------速度要快

這一題,首先進入的介面只有一句話,


我感覺你得快點!!!

檢視原始碼發現下面還有一句話:

 OK ,now you have to post the margin what you find

(上面個這句話是說明需要有post提交,引數為margin)

那就抓包試試,,當你抓包傳送出去的時候,你會發現,他給你返回base64加密的flag,嘿嘿。。。

解密提交後發現是錯誤的!!

那就再抓一次包看看吧,發現還是有flag,但是和上次是不一樣的flag。。。。

這時,應該就要上python指令碼了吧,,,畢竟機器執行的始終比人的速度快,用指令碼把flag跑出來。

import requests
import base64

url = 'http://123.206.87.240:8002/web6/'
req = requests.session()
res = req.get(url)
flag = res.headers['flag']

txt = base64.b64decode(flag)
txt = txt[txt.index(":") + 2:]
txt = base64.b64decode(txt)

data = {'margin': txt}
ans = req.post(url, data)
print ans.content

跑完之後,就可以得到flag了。