-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
71 lines (58 loc) · 2.19 KB
/
main.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
import asyncio
import ctypes
import sys
import aiohttp
import fade
import requests
claimed = 0
with open('tokens.txt', 'r', encoding='utf-8') as f:
lines = f.readlines()
globlines = len(lines)
print(fade.purpleblue("""
░█████╗░░█████╗░░█████╗░██╗░░██╗
██╔══██╗██╔══██╗██╔══██╗██║░██╔╝
██║░░╚═╝██║░░██║██║░░╚═╝█████═╝░
██║░░██╗██║░░██║██║░░██╗██╔═██╗░
╚█████╔╝╚█████╔╝╚█████╔╝██║░╚██╗
░╚════╝░░╚════╝░░╚════╝░╚═╝░░╚═╝
"""))
ctypes.windll.kernel32.SetConsoleTitleW(f'Haunt Xbox Code Claimer | Claimed: {claimed}')
def get_token():
with open('tokens.txt', 'r', encoding='utf-8') as f:
lines = f.readlines()
if(len(lines) > 0):
return lines[0].strip()
else:
return False
def lol(code):
with open("tokens.txt", "r") as f:
lines = f.readlines()
with open("tokens.txt", "w") as f:
for line in lines:
if line.strip("\n") != code:
f.write(line)
def get_code():
token = get_token()
if not token:
sys.exit(fade.red("[!] No token found!"))
headers = {
'authorization': token
}
try:
req = requests.post("https://discord.com/api/v9/outbound-promotions/890374599315980288/claim", headers=headers)
r = req.json()
global claimed
claimed += 1
lol(token)
ctypes.windll.kernel32.SetConsoleTitleW(f'Haunt Xbox Code Claimer | Claimed: {claimed}')
with open('output/codes.txt', 'r', encoding='utf-8') as f:
lines = f.read()
data = lines + r['code'] + '\n'
with open('output/codes.txt', 'w', encoding='utf-8') as f:
f.write(data)
return r['code']
except Exception as e:
print((f"[!] {e}"))
while(globlines > 0):
print(get_code())
globlines -= 1