-
Notifications
You must be signed in to change notification settings - Fork 0
/
normal.py
33 lines (24 loc) · 1.14 KB
/
normal.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
import requests, time, re
# - - - - - - - - - #
TOKEN = ""
NAME = ""
# - - - - - - - - - #
all_options = []
apiv = str(re.search(re.compile("(?<=API_VERSION: ')([0-9]|[1-9][0-9])(?=')"), requests.get("https://discord.com/").text).group())
def addF(name, tag, token):
headers = { "Accept": "*/*", "Content-Type": "application/json", "Authorization": token }
res = requests.post("https://discord.com/api/"+apiv+"/users/@me/relationships", headers=headers, json={"username": name, "discriminator": tag}) #send a friend request
if(res.status_code == 429): #if program is sending too many requests to discord sleep for 20s and call recursion
time.sleep(20)
addF(name, tag, token)
else:
return res
def main():
for i in range(1, 10000): #for every tag option
res = addF(NAME, i, TOKEN)
if(str(res.status_code) == "204"): #if request response code returns 204 no content
print(NAME+"#"+str(i))
all_options.append(NAME+"#"+str(i)) #save newly found user to the list of all users found
time.sleep(5)
if(__name__ == "__main__"):
main()