A Python script to check if words from a wordlist are available as a Discord username
GNU General Public License v3.0
5
stars
6
forks
source link
was trying to add proxy support to the code, but imma noob. Let me know if this helps or you can help me figure this out. #3
Open
Zyfea opened 1 year ago
import time import requests import requests
Set the Discord authorization token
token = "" # INSERT YOUR TOKEN INTO THE QUOTES. DO NOT SHARE THIS TOKEN.
IF SHARING THIS FILE, REMEMBER TO REMOVE YOUR TOKEN
headers = {"Authorization": token}
with open("proxies.txt") as proxy: proxies = [line.strip() for line in proxy]
Discord username API endpoint
endpoint = "https://discord.com/api/v10/users/@me/pomelo"
Load the list of usernames from the file
with open("usernames.txt") as file: usernames = [line.strip() for line in file]
available_usernames = []
Loop through each username in the list and check availability
for username in usernames: url = endpoint body = { "username": username } response = requests.post(url, headers=headers, json=body, proxies={"http": proxies, "https":proxies},timeout=3)
Write available usernames to a file
with open("available_usernames.txt", "w") as file: file.write("\n".join(available_usernames))