天下武功唯快不破分值:10
- 來源: 北郵天樞戰隊
- 難度:易
- 參與人數:10787人
- Get Flag:2264人
- 答題人數:3373人
- 解題通過率:67%
看看響應頭
格式:CTF{ }
解題鏈接: http://ctf5.shiyanbar.com/web/10/10.php
原題鏈接:http://www.shiyanbar.com/ctf/1854
【解題報告】
這是我入門Web以來寫的第十六題,打開解題鏈接,,發現頁面中提示 :
There is no martial art is indefectible, while the fastest speed is the only way for long success. >>>>>>----You must do it as fast as you can!----<<<<<<
查看網頁源碼 , 發現結尾處有一段注釋 :
<!-- please post what you find with parameter:key -->
提示讓我們查看"響應頭" , 並將數據以POST的形式發送 :

在響應頭中發現了KEY, 看起來像是一個Base64編碼, 多次嘗試后發現數據是隨機生成的
嘗試是用Chrome瀏覽器的PostMan插件進行Post方式提交 :
(也可以利用其他的工具 : 火狐/自定義相應頭是用nc進行提交/利用Python腳本)
但是並沒有出現結果 , 又想到剛才的提示中提到 , 要盡可能得快速提交 , 因此開始寫腳本 :
1 import requests 2 import base64 3 r = requests.post('http://ctf5.shiyanbar.com/web/10/10.php') 4 key = r.headers['FLAG'] 5 flag = base64.b64decode(key).decode().split(':')[1] 6 para = {'key':flag} 7 r = requests.post('http://ctf5.shiyanbar.com/web/10/10.php',data = para) 8 print r.text

這樣就拿下了flag的值!!!

