-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
79 lines (69 loc) · 2.18 KB
/
main.py
File metadata and controls
79 lines (69 loc) · 2.18 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
import requests,json,tabulate
print('''
.--. .--.
_ ` \ / ` _
`\.===. \.^./ .===./`
\/`"`\/
, | | ,
/ `\|;-.-'|/` \\
/ |::\ | \\
.-' ,-'`|:::; |`'-, '-.
| |::::\| |
| |::::;| |
| \::::// |
| `.://' |
.' `.
_,' `,_
+ Hypesquad Changer Script +
- By Ho3einWave -
''')
config = ''
token = ''
try:
with open('config.json', 'r') as file:
jsonfile = file.read()
try:
config = json.loads(jsonfile)
except json.decoder.JSONDecodeError as error:
print('Token String in config.json is not valid enter the token again!')
token = input('Enter Token: ')
config = {'token': token}
with open('config.json', 'w') as file:
file.write(json.dumps(config))
except FileNotFoundError as error:
token = input('Enter Token: ')
config = {'token': token}
with open('config.json', 'w') as file:
file.write(json.dumps(config))
hypeSquad = int(input('With Type Of Hype Squad You Want? [3:Balance, 2:Bravery, 1:Brilliance] : '))
headers = {
'authorization': config['token']
}
body = {
'house_id': hypeSquad
}
meResponse = requests.get(
'https://canary.discordapp.com/api/v6/users/@me', headers=headers)
if meResponse.status_code == 401:
print('Token is Invalid! Exiting...')
with open('config.json', 'w') as file:
file.write('')
exit()
userinfo = meResponse.json()
print('[+] USER ACCOUNT INFO ')
table = [
['Username', userinfo['username']],
['Tag', userinfo['discriminator']],
['UserID', userinfo['id']],
['Email', userinfo['email']],
['Phone', userinfo['phone']]
]
print(tabulate.tabulate(table,tablefmt='pretty'))
response = requests.post(
'https://discord.com/api/v9/hypesquad/online', headers=headers, json=body)
if response.status_code == 204:
print('Hypesquad Changed Successfuly!')
elif response.status_code == 401:
print('Token is invalid or expire!')
elif response.status_code == 429:
print('Too many requests please try after 5 mins!')