diff --git a/code/discordchecker.py b/code/discordchecker.py index 6964cfa..c2c0fbc 100644 --- a/code/discordchecker.py +++ b/code/discordchecker.py @@ -3,6 +3,7 @@ import string import requests from code.colors import * + def main(): @@ -41,31 +42,33 @@ def main(): wbk = webhook try: - if psd >= "10": - try: - for i in range(int(psd)): - gen = ''.join(random.choices(string.digits + string.ascii_lowercase, k=4)) - - url = "https://discord.com/api/v9/unique-username/username-attempt-unauthed" - - payload = {"username": gen} - - response = requests.post(url, json=payload, timeout=10) - - data = response.json() - - if response.status_code == 200: - data = { - "content": data, - "username": "WhiteWolf", - "avatar_url": "https://i.postimg.cc/nhfNtJbK/f65aba67730462b50f7ec15c4bdb605d.jpg" - } - requests.post(wbk, json=data) - else: - print("Le pseudo ne marché pas passont a un autre", gen) - except Exception as e: - print(f"Error {e}") + nombre = int(psd) + for i in range(nombre): + gen = ''.join(random.choices(string.digits + string.ascii_lowercase, k=4)) + + url = "https://discord.com/api/v9/unique-username/username-attempt-unauthed" + + payload = {"username": gen} + + response = requests.post(url, json=payload, timeout=10) + + data = response.json() + + if response.status_code == 200: + if data.get("taken") == False: + data_to_send = { + "content": f"**PSEUDO DISPONIBLE !** `{gen}`\n{data}", + "username": "WhiteWolf", + "avatar_url": "https://i.postimg.cc/nhfNtJbK/f65aba67730462b50f7ec15c4bdb605d.jpg" + } + requests.post(wbk, json=data_to_send) + print(f"Trv env : {gen}") + else: + print(f"Pris : {gen}") + else: + print("Le pseudo ne marché pas passont a un autre", gen) except Exception as e: print(f"Error {e}") + if __name__ == "__main__": main() \ No newline at end of file diff --git a/code/webstatus.py b/code/webstatus.py index f9f51d4..4a830bc 100644 --- a/code/webstatus.py +++ b/code/webstatus.py @@ -16,18 +16,48 @@ def webstatus(): Choisis l'url du site que tu veux check : """) except ValueError as e: print(f"Error {e}") - + url = site response = requests.get(url) try: - if response.ok: - print(f"Le site a répondu en : {response.elapsed.total_seconds() * 1000:.2f} ms") - time.sleep(3) + if response.status_code == 200: + print(f"Le site répond en : {response.time} ") + time.sleep(2) else: - print("Le site na pas répondu présents") - time.sleep(3) + print(f"Le site ne répond pas {response.status_code}") + time.sleep(2) except Exception as e: print(f"Error {e}") if __name__ == "__main__": - webstatus() \ No newline at end of file + webstatus() + + +# OLD LOGIC + +# def webstatus(): +# os.system("cls") +# try: +# site = input(""" +# ██╗ ██╗███████╗██████╗ ███████╗████████╗ █████╗ ████████╗██╗ ██╗███████╗ +# ██║ ██║██╔════╝██╔══██╗ ██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝██║ ██║██╔════╝ +# ██║ █╗ ██║█████╗ ██████╔╝ ███████╗ ██║ ███████║ ██║ ██║ ██║███████╗ +# ██║███╗██║██╔══╝ ██╔══██╗ ╚════██║ ██║ ██╔══██║ ██║ ██║ ██║╚════██║ +# ╚███╔███╔╝███████╗██████╔╝ ███████║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║ +# ╚══╝╚══╝ ╚══════╝╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ + +# Choisis l'url du site que tu veux check : """) +# except ValueError as e: +# print(f"Error {e}") + +# url = site +# response = requests.get(url) +# try: +# if response.ok: +# print(f"Le site a répondu en : {response.elapsed.total_seconds() * 1000:.2f} ms") +# time.sleep(3) +# else: +# print("Le site na pas répondu présents") +# time.sleep(3) +# except Exception as e: +# print(f"Error {e}") \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index fefbe56..ff22943 100644 --- a/docs/index.html +++ b/docs/index.html @@ -326,6 +326,7 @@