Почему сервер выдает разные ответы на один и тот же запрос ?
Пример реализации запроса в burpsuit, на который сервер выдает код 200:
PUT /api/v9/guilds/679875946597056683/members/@me?lurker=false HTTP/2
Host: discord.com
Cookie: __dcfduid=a2edb0f624a011ed84302a88ea10ddfb; __sdcfduid=a2edb0f624a011ed84302a88ea10ddfb395047cae47b197c2878c3f23c8ff569a3d150b390a75c1e0e7e23c490797799
Content-Length: 6
X-Super-Properties: eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiQ2hyb21lIiwiZGV2aWNlIjoiIiwic3lzdGVtX2xvY2FsZSI6InJ1LVJVIiwiYnJvd3Nlcl91c2VyX2FnZW50IjoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwNC4wLjUxMTIuMTAyIFNhZmFyaS81MzcuMzYiLCJicm93c2VyX3ZlcnNpb24iOiIxMDQuMC41MTEyLjEwMiIsIm9zX3ZlcnNpb24iOiIxMCIsInJlZmVycmVyIjoiaHR0cHM6Ly9kaXNjb3JkLmNvbS9sb2dpbiIsInJlZmVycmluZ19kb21haW4iOiJkaXNjb3JkLmNvbSIsInJlZmVycmVyX2N1cnJlbnQiOiJodHRwczovL21haWwucmFtYmxlci5ydS9mb2xkZXIvSU5CT1gvNC8/Zm9sZGVyTmFtZT1JTkJPWCIsInJlZmVycmluZ19kb21haW5fY3VycmVudCI6Im1haWwucmFtYmxlci5ydSIsInJlbGVhc2VfY2hhbm5lbCI6InN0YWJsZSIsImNsaWVudF9idWlsZF9udW1iZXIiOjE0MzU5MiwiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0=
Authorization: token
Content-Type: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36
{}
Пример реализации запроса на python , на который сервер выдает код 400:
import requests
url = "https://discord.com:443/api/v9/guilds/679875946597056683/members/@me?lurker=false"
cookies = {"__dcfduid": "a2edb0f624a011ed84302a88ea10ddfb", "__sdcfduid": "a2edb0f624a011ed84302a88ea10ddfb395047cae47b197c2878c3f23c8ff569a3d150b390a75c1e0e7e23c490797799"}
headers = {"X-Super-Properties": "eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiQ2hyb21lIiwiZGV2aWNlIjoiIiwic3lzdGVtX2xvY2FsZSI6InJ1LVJVIiwiYnJvd3Nlcl91c2VyX2FnZW50IjoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwNC4wLjUxMTIuMTAyIFNhZmFyaS81MzcuMzYiLCJicm93c2VyX3ZlcnNpb24iOiIxMDQuMC41MTEyLjEwMiIsIm9zX3ZlcnNpb24iOiIxMCIsInJlZmVycmVyIjoiaHR0cHM6Ly9kaXNjb3JkLmNvbS9sb2dpbiIsInJlZmVycmluZ19kb21haW4iOiJkaXNjb3JkLmNvbSIsInJlZmVycmVyX2N1cnJlbnQiOiJodHRwczovL21haWwucmFtYmxlci5ydS9mb2xkZXIvSU5CT1gvNC8/Zm9sZGVyTmFtZT1JTkJPWCIsInJlZmVycmluZ19kb21haW5fY3VycmVudCI6Im1haWwucmFtYmxlci5ydSIsInJlbGVhc2VfY2hhbm5lbCI6InN0YWJsZSIsImNsaWVudF9idWlsZF9udW1iZXIiOjE0MzU5MiwiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0=", "Authorization": token, "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36"}
json={}
print(requests.put(url, headers=headers, cookies=cookies, json=json).status_code)