Skip to content

Instantly share code, notes, and snippets.

@pp0236
Created April 26, 2024 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pp0236/64316766adeeaa3c38f58e926afba36b to your computer and use it in GitHub Desktop.
Save pp0236/64316766adeeaa3c38f58e926afba36b to your computer and use it in GitHub Desktop.
# thanks to https://github.com/Discord-Build-Logger/ and https://github.com/Discord-Datamining/ lol
# still working 4/14/2024
# patched 4/26/2024
# clown decoration will be remove in may so.... 'useless'
import requests, re, base64, time, os
# prob does nothing but still..
def get_super_prop():
discord_site = requests.get("https://discord.com/app").text
some_script = re.findall(r"src=\"([^\"]+)\"", discord_site)[-2]
some_script_source = requests.get("https://discord.com" + some_script).text
try:
discord_build = re.findall(r"\"buildNumber\",\(_=\"([0-9]+)\",\"[0-9]+\"\)", some_script_source)[0]
except:
print("ᓀꞈᓂ")
return None # fuck
base = """{"os":"Windows","browser":"Discord Client","release_channel":"stable","client_version":"1.0.9041","os_version":"10.0.19045","os_arch":"x64","app_arch":"ia32","system_locale":"en-US","browser_user_agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9041 Chrome/120.0.6099.291 Electron/28.2.10 Safari/537.36","browser_version":"28.2.10","client_build_number":%build%,"native_build_number":46355,"client_event_source":null}""" \
.replace("%build%", discord_build)
return base64.b64encode(base.encode()).decode()
ses = requests.Session()
ses.headers = {
"Authorization": input("your account token: "),
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9041 Chrome/120.0.6099.291 Electron/28.2.10 Safari/537.36",
"X-Debug-Options": "bugReporterEnabled",
"X-Discord-Locale": "en-US",
"X-Discord-Timezone": "Australia/Sydney",
"X-Super-Properties": get_super_prop()
}
resp = ses.get("https://discord.com/api/v9/users/@me/lootboxes").json()
if resp["redeemed_prize"]:
print("u already own the useless clown decoration :(")
os.system("pause>nul|echo enter to exit ;3")
exit()
useless_variable = 0
while 1:
resp = ses.post("https://discord.com/api/v9/users/@me/lootboxes/open").json()
if resp.get("retry_after"):
# print(resp)
time.sleep(1)
continue
# if resp["user_lootbox_data"]["redeemed_prize"]:
# print("u already own the useless clown decoration :(")
# break
items = len(resp["user_lootbox_data"]["opened_items"])
if useless_variable != items:
useless_variable = items
print(f">> {items}/9 :3")
if items == 9:
resp = ses.post("https://discord.com/api/v9/users/@me/lootboxes/redeem-prize").json()
if resp["redeemed_prize"]:
print("yay u got the useless clown decoration")
break
time.sleep(2)
os.system("pause>nul|echo enter to exit ;3")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment