62 字
1 分钟
秋名山车神

打开网页发现有随机数学计算题,刷新几次后会出现新的。


用 F12 查看请求头,发现 Cookie 有点特别:

有 Timeout=alive。

知道这个规律就可以写脚本了:
import reimport requests
url = 'http://117.72.52.127:12222'headers = { 'Cookie': 'PHPSESSID=uphbeui9h76bthqeqtejrhbhr6; Timeout=alive'}
response = requests.get(url, headers=headers)
math_expr = re.search(r"Give me value post about (.*?)=\?", response.text, re.S)if math_expr: value = eval(math_expr.group(1)) data = {"value": value} response = requests.post(url, headers=headers, data=data) response.encoding = 'utf-8' print(response.text)else: print("Mathematical expression not found in response")拿到 flag:

flag{8a64d612d7aab0eb9e541e9fed09f528}
分享
如果这篇文章对你有帮助,欢迎分享给更多人!
部分信息可能已经过时
相关文章 智能推荐









