
打开网页发现有随机计算,刷新两次后会出现新的

之后这是特殊的

使用 F 12 来查看请求头,发现 cookie 有点特别

有 Timeout=alive

知道这个就可以写脚本了
import re
import requests
url = 'http://117.72.52.127:12222'
headers = {
'Cookie': 'PHPSESSID=uphbeui9h76bthqeqtejrhbhr6; Timeout=alive'
}
# Get the initial page with mathematical expression
response = requests.get(url, headers=headers)
# Extract and evaluate the mathematical expression
math_expr = re.search(r"Give me value post about (.*?)=\?", response.text, re.S)
if math_expr:
value = eval(math_expr.group(1))
# Send POST request with calculated value
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{8 a 64 d 612 d 7 aab 0 eb 9 e 541 e 9 fed 09 f 528}


Comments NOTHING