Digging into HTTP

f12找到<!--API Endpoint /api/entrance-->,访问http://202.120.222.171:31876/api/entrance,显示要以LeMMIH/0.1 or higher version访问,问gpt一些基础curl,运行

curl.exe -A "LeMMIH/0.1" "http://202.120.222.171:31876/api/entrance"

一直502,加上--noproxy "*"。

显示Unauthorized access, please access this endpoint from lemu.de。加上-e "https://lemu.de/"。

显示Please GRAB instead of GET,加上-X GRAB。

得到flag。

后续在做Flag免费送时学到,也可以用以下代码实现:

import requests

url = "http://202.120.222.171:31876/api/entrance"
headers = {
    "User-Agent": "LeMMIH/0.1",
    "Referer": "https://lemu.de/",
}
s = requests.Session()
s.trust_env = False  #等价 --noproxy "*"
r = s.request("GRAB", url, headers=headers, timeout=10)
print(r.status_code)
print(r.text)