实验吧CTF–天下武功唯快不破
好久之前的写的程序找不到了,额。。。还是写在博客中吧
题目虽然是归到web类的,题目需要编程完成
链接:天下武功唯快不破
(1)根据提示,查看响应头,在响应头中看到一个FLAG属性
后边的值是base64编码后的,解码得到
根据解码后的提示,需要将解码后的值POST提交
(2)查看网页源代码,发现注释处有提示
需要POST提交的是以key作为值,即{key:value}
(3)根据分析,编写程序
import requests import base64 url = 'http://ctf4.shiyanbar.com/web/10.php' flag = requests.get(url).headers['FLAG'] flag = base64.decodestring(flag).split(':')[1] postdata = {"key":flag} print requests.post(url,postdata).text
(4)运行得到flag的值