forked from natrixdev/Discord-Server-Boost-Botter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
natrix_booster.py
87 lines (70 loc) · 4.33 KB
/
natrix_booster.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import os
os.system("pip install tasksio")
os.system("pip install aiohttp")
os.system("pip install colorama")
import aiohttp
import asyncio
import sys
from colorama import Fore
import tasksio
import asyncio
from typing import Optional
def setTitle(title: Optional[any]=None):
os.system("title "+title)
setTitle("Server Booster - [natrix#4526]")
def clear():
if sys.platform in ["linux", "linux2"]:
os.system("clear")
else:
os.system("cls")
clear()
async def join_server(token, inv):
headers = {"Authorization": token, "accept": "*/*", "accept-language": "en-US", "connection": "keep-alive", "cookie": f'__cfduid={os.urandom(43).hex()}; __dcfduid={os.urandom(32).hex()}; locale=en-US', "DNT": "1", "origin": "https://discord.com", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "referer": "https://discord.com/channels/@me", "TE": "Trailers", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9001 Chrome/83.0.4103.122 Electron/9.3.5 Safari/537.36", "X-Super-Properties": "eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiRGlzY29yZCBDbGllbnQiLCJyZWxlYXNlX2NoYW5uZWwiOiJzdGFibGUiLCJjbGllbnRfdmVyc2lvbiI6IjEuMC45MDAxIiwib3NfdmVyc2lvbiI6IjEwLjAuMTkwNDIiLCJvc19hcmNoIjoieDY0Iiwic3lzdGVtX2xvY2FsZSI6ImVuLVVTIiwiY2xpZW50X2J1aWxkX251bWJlciI6ODMwNDAsImNsaWVudF9ldmVudF9zb3VyY2UiOm51bGx9"}
async with aiohttp.ClientSession(headers=headers) as serverjoinersession:
async with serverjoinersession.post(f"https://discord.com/api/v9/invites/{inv}") as response:
if response.status in (204, 200, 201):
print(f"[-] natrix#4526 | Successfully Joined Server")
else:
print(f"[-] natrix#4526 | Failed To Join Server, Status Code: {response.status}")
async def boost_server(guildid, token):
headers = {"Authorization": token, "accept": "*/*", "accept-language": "en-US", "connection": "keep-alive", "cookie": f'__cfduid={os.urandom(43).hex()}; __dcfduid={os.urandom(32).hex()}; locale=en-US', "DNT": "1", "origin": "https://discord.com", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "referer": "https://discord.com/channels/@me", "TE": "Trailers", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9001 Chrome/83.0.4103.122 Electron/9.3.5 Safari/537.36", "X-Super-Properties": "eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiRGlzY29yZCBDbGllbnQiLCJyZWxlYXNlX2NoYW5uZWwiOiJzdGFibGUiLCJjbGllbnRfdmVyc2lvbiI6IjEuMC45MDAxIiwib3NfdmVyc2lvbiI6IjEwLjAuMTkwNDIiLCJvc19hcmNoIjoieDY0Iiwic3lzdGVtX2xvY2FsZSI6ImVuLVVTIiwiY2xpZW50X2J1aWxkX251bWJlciI6ODMwNDAsImNsaWVudF9ldmVudF9zb3VyY2UiOm51bGx9"}
async with aiohttp.ClientSession(headers=headers) as ClientSession:
async with ClientSession.get(f"https://discord.com/api/v9/users/@me/guilds/premium/subscription-slots") as nvmmm:
if nvmmm.status == 200:
idk_var = await nvmmm.json()
for varr in idk_var:
id__ = varr['id']
payload = {"user_premium_guild_subscription_slot_ids": [id__]}
async with ClientSession.put(f"https://discord.com/api/v9/guilds/{guildid}/premium/subscriptions", json=payload) as boost_req:
btxt = await boost_req.text()
if "id" in btxt:
print(f"[-] natrix#4526 | Successfully Boosted Server")
else:
print("[-] natrix#4526 | Failed To Boost Server, Unknown Error Occurred")
banner = f"""{Fore.RED}[-]{Fore.RESET} Created By natrix#4526\n\n{Fore.BLUE}[1]{Fore.RESET} Server Joiner\n\n{Fore.BLUE}[2]{Fore.RESET} Boost Server\n"""
async def start_join(inv):
async with tasksio.TaskPool(10_000) as pool:
for token in open('tokens.txt', 'r').readlines():
tk = token.strip()
await pool.put(join_server(tk, inv))
async def start_boost(id):
async with tasksio.TaskPool(10_000) as pool:
for token in open('tokens.txt', 'r').readlines():
tk = token.strip()
await pool.put(boost_server(id, tk))
print(banner)
ch = input("[-] natrix#4526 | Choice: ")
try:
c = int(ch)
except ValueError:
print("natrix#4526 | Use Number To Choose.")
sys.exit()
if c == 1:
invv = input("[-] natrix#4526 | Enter Invite Code: discord.gg/")
asyncio.run(start_join(invv))
elif c == 2:
g = int(input("[-] natrix#4526 | Enter Guild ID: "))
asyncio.run(start_boost(g))
else:
print("[-] natrix#4526 | Invaild Option")
exit(0)