Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Jul 18, 2026. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathBitBoost.py
More file actions
Latest commit
135 lines (112 loc) · 4.54 KB
/
Copy pathBitBoost.py
File metadata and controls
135 lines (112 loc) · 4.54 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
"""
GNU License
Copyright (c) 2022 DaniDuese
"""
fromab5importhgratient
fromtypingimportOptional
importcolorama
importsys
frompystyleimportCenter, Colorate, Colors, Write
importtls_client
importos
defsetTitle(title: Optional[any] =None):
os.system("title "+title)
setTitle("BitBoost V2 | Server Booster")
defclear():
ifsys.platformin ["linux", "linux2", "darwin"]:
os.system("clear")
else:
os.system("cls")
clear()
sub_ids= []
logo= ("""__________.__ __ __________ __
\______ \__|/ |\______ \ ____ ____ _______/ |_
| | _/ \ __\ | _// _ \ / _ \/ ___/\ __\
| | \ || | | | ( <_> | <_> )___ \ | |
|______ /__||__| |______ /\____/ \____/____ > |__|
\/ \/ \/ """)
banner= ("""Please make sure that all your tokens are already in the server you want to boost.\n""")
print(hgratient(logo, [0, 223, 50], [0, 25, 222]))
print(banner)
__guild_id__=Write.Input("Guild ID: ", Colors.blue_to_green, interval=0.05)
colorama.init(convert=True)
classNitro:
def__init__(self, token: str):
self.token=token
self.headers= {
"accept": "*/*",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-US",
"authorization": token,
"referer": "https://discord.com/channels/@me",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9007 Chrome/91.0.4472.164 Electron/13.6.6 Safari/537.36",
"x-debug-options": "bugReporterEnabled",
"x-discord-locale": "en-US",
"x-super-properties": "eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiRGlzY29yZCBDbGllbnQiLCJyZWxlYXNlX2NoYW5uZWwiOiJzdGFibGUiLCJjbGllbnRfdmVyc2lvbiI6IjEuMC45MDA3Iiwib3NfdmVyc2lvbiI6IjEwLjAuMTkwNDMiLCJvc19hcmNoIjoieDY0Iiwic3lzdGVtX2xvY2FsZSI6ImVuLVVTIiwiY2xpZW50X2J1aWxkX251bWJlciI6MTYxODQyLCJjbGllbnRfZXZlbnRfc291cmNlIjpudWxsfQ=="
}
self.session=tls_client.Session(client_identifier="chrome_107")
self.sub_ids= []
defremoveTokenFromTxt(self):
withopen("tokens.txt", "r") asf:
lines=f.readlines()
withopen("tokens.txt", "w") asf:
forlineinlines:
ifline.strip("\n") !=self.token:
f.write(line)
defhasNitro(self):
sex=self.session.get(
"https://discord.com/api/v9/users/@me/guilds/premium/subscription-slots",
headers=self.headers,
)
ifsex.status_codein [403, 401]:
returnself._extracted_from_hasNitro_7('Token is invalid, removing.')
try:
forsubinsex.json():
self.sub_ids.append(sub["id"])
exceptExceptionase:
print(e)
print(sex.text)
iflen(self.sub_ids) ==0:
returnself._extracted_from_hasNitro_7('Token has no nitro, removing.')
log(f"{colorama.Fore.GREEN}Token has nitro.")
returnTrue
# TODO Rename this here and in `hasNitro`
def_extracted_from_hasNitro_7(self, arg0):
log(f"{colorama.Fore.RED}{arg0}")
self.removeTokenFromTxt()
returnFalse
defboostServer(self, guildID):
foriinrange(len(self.sub_ids)):
self.headers["Content-Type"] ="application/json"
r=self.session.put(
url=f"https://discord.com/api/v9/guilds/{guildID}/premium/subscriptions",
headers=self.headers,
json={
"user_premium_guild_subscription_slot_ids": [f"{self.sub_ids[i]}"]
},
)
ifr.status_code==201:
log(
f"{colorama.Fore.GREEN}Boosted {i+1} of {len(sub_ids)} from {self.token[25:]}"
)
elifr.status_code==400:
log(
f"{colorama.Fore.YELLOW}Boost already used {i+1} of {len(sub_ids)} from {self.token[25:]}"
)
else:
log(f"{colorama.Fore.RED}ERROR: {r.status_code}")
deflog(text):
print(f"{text}{colorama.Fore.RESET}")
defmain():
withopen("tokens.txt", "r") asf:
tokens=f.read().splitlines()
fortokenintokens:
nitro=Nitro(token)
ifnitro.hasNitro():
nitro.boostServer(__guild_id__)
if__name__=="__main__":
main()
input("Press enter to exit.")