- 题目内容:
- 查看源码:
</br>我感觉你得快点!!!<!-- OK ,now you have to post the margin what you find -->
一头雾水的我去看了大佬的博客
- 抓包看看头:
import requests
res = requests.get("http://123.206.87.240:8002/web6/")
print(res.headers)
base64加密:decode一下得到 “ 跑的还不错,给你flag吧: NzUyOTYw ”
再次解密后是一串数字,事实证明人要的是那串数字,我也不知道为什么
手动抓包后在添加margin属性后再推出去速度不够快,不符合要求,只能用脚本
- 脚本保持session的同时使用post(网页源码里的提示:post the margin what you find)
import requests
import base64
url = "http://123.206.87.240:8002/web6/"
session = requests.Session()
myrequests = session.get(url) # 记录下session
header_flag = myrequests.headers['flag']
header_flag_decode = base64.b64decode(header_flag) # python3这个操作会导致生成bytes对象,python2直接可以使用decodestring
header_flag_decode = header_flag_decode.decode() # 因为上一步解码时生成了bytes类型对象,需要转化为string,decode()默认编码是utf-8
margin_value = header_flag_decode.split(": ")[1] # 取他说的flag内容,作为margin参数值
page = session.post(url, {"margin": base64.b64decode(margin_value)})
print(page.text)