Advertisement
Guest User

code

a guest
Dec 19th, 2020
1,402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.88 KB | None | 0 0
  1. import pyautogui , time , sys  , os , colorama , requests ,discord , asyncio
  2. from pathlib import Path
  3. from os import system
  4. from discord.ext import commands, tasks
  5.  
  6. #self bot command prefix
  7.  
  8. CEND      = '\33[0m'
  9. CGREEN2  = '\33[92m'
  10. CBLUE   = '\33[34m'
  11. CRED    = '\33[31m'
  12. CYELLOW = '\33[33m'
  13.  
  14. def fivesectimer():
  15.     num = ['5',
  16.            '4',
  17.            '3',
  18.            '2',
  19.            '1']
  20.    
  21.     for i in num:
  22.         sys.stdout.write("\r\x1b[K" + "starting in " + i + " second")
  23.         sys.stdout.flush()
  24.         time.sleep(1)
  25.  
  26.     os.system("cls")
  27.  
  28. def tensectimer():
  29.     num = ['10',
  30.             '9',
  31.             '8',
  32.             '7',
  33.             '6',
  34.             '5',
  35.             '4',
  36.             '3',
  37.             '2',
  38.             '1']
  39.    
  40.     for i in num:
  41.         sys.stdout.write("\r\x1b[K" + "Program is closing in " + i + " second")
  42.         sys.stdout.flush()
  43.         time.sleep(1)
  44.    
  45.     os.system("cls")
  46.  
  47. def normalspam():
  48.  
  49.     print("What do you want to spam ? ")
  50.     word = input(CRED + ">>> " + CEND)
  51.     print("How many time do you want to spam ? ")
  52.     x = int(input(CRED + ">>> " + CEND))
  53.  
  54.     fivesectimer()
  55.  
  56.     for i in range(x):
  57.         pyautogui.typewrite(word)
  58.         pyautogui.press("enter")
  59.  
  60.  
  61. def wordlistspam():
  62.     print("Enter the .txt file name (without .txt)")
  63.     filename = input(CRED + ">>> " + CEND)
  64.     filenames = (filename+".txt")
  65.  
  66.     if Path(filenames).exists():
  67.  
  68.         print("Do you wish to start now ? [ Y / N ]")
  69.         yn = input(CRED + ">>> " + CEND)
  70.         yn = yn.lower()
  71.  
  72.         if yn == ("y"):
  73.             fivesectimer()
  74.  
  75.             f = open(filenames, 'r')
  76.             for i in f:
  77.                 pyautogui.typewrite(i)
  78.                 pyautogui.press("enter")
  79.  
  80.             fin = input("The task is finish press enter to close")
  81.             exit()
  82.  
  83.         if yn == ("n"):
  84.             tensectimer()
  85.             exit()
  86.        
  87.         else:
  88.             v = input("invalid choice press enter to close")
  89.  
  90.  
  91.    
  92.     if not Path(filenames).exists():
  93.         print(filenames + ".txt do not exist do you want to create new .txt with that name ? [ Y / N ]")
  94.         respond = input(CRED + ">>> " + CEND)
  95.         respond = respond.lower()
  96.  
  97.         if respond == ("y"):
  98.             file = open(filenames ,'w')
  99.             w = input("Please write the wordlist in " + filenames + " and run the program again")
  100.  
  101.             tensectimer()
  102.             exit()
  103.        
  104.         if respond == ("n"):
  105.             c = input("Press enter to close.")
  106.  
  107. def discordwebhookspam():
  108.     x = 0
  109.     WEBHOOK_URL = str(input("Webhook URL : "))
  110.     WEBHOOK_USERNAME = str(input("Name : "))
  111.     WEBHOOK_AVATAR = str(input("Avatarurl : "))
  112.     WEBHOOK_CONTENT = str(input("What to spam : "))
  113.     SPAM = int(input("How many time to spam : "))
  114.     while x < SPAM:
  115.         try:
  116.             payload = {"content":WEBHOOK_CONTENT,"username":WEBHOOK_USERNAME,"avatar_url":WEBHOOK_AVATAR}
  117.             r = requests.post(WEBHOOK_URL,data=payload)
  118.             x +=1
  119.             print(WEBHOOK_CONTENT + "have been sent to webhook")
  120.         except:
  121.             print("Spam failed")
  122.             pass
  123.     os.system("cls")
  124.     print("Spam finished")
  125.  
  126. def Bot_run():
  127.     Token = input("DISCORD TOKEN : ")
  128.     request_url = "https://canary.discordapp.com/api/v6/users/@me"
  129.    
  130.  
  131.     req = requests.get(request_url, headers={'authorization': Token})
  132.     if req.status_code == 401:
  133.         print(f"The token : {Token} is invalid")
  134.         inv = input("press enter to close")
  135.         exit()
  136.     if req.status_code == 200:
  137.         print(f"The token : {Token} is valid")
  138.     client = commands.Bot(command_prefix='.r ')
  139.  
  140.     @client.event
  141.     async def on_ready():
  142.         print('status : online')
  143.  
  144.     @client.command()
  145.     async def dm_all(ctx, message):
  146.         for member in ctx.guild.members:
  147.             try:
  148.                 await member.send("message")
  149.                 print("Message has been sent to "+ member)
  150.             except:
  151.                 print("Message failed to sent to "+ member)
  152.  
  153.     try:
  154.         client.run(Token, bot=False, reconnect=True)
  155.         print("Login success")
  156.     except discord.errors.LoginFailure:
  157.         print("Unable to connect")
  158.        
  159.  
  160.  
  161.  
  162. def credit():
  163.     print("")
  164.     print("               [*]=----------------------------------------------------------------------------------=[*]")
  165.     print("                |                                                                                      |")
  166.     print("                |                 Discord : REACT#1120                                                 |")                    
  167.     print("                |                 Github : https://github.com/reactxsw                                 |")
  168.     print("                |                 steam : https://steamcommunity.com/id/reactswthegod/                 |")
  169.     print("                |                                                                                      |")
  170.     print("                |                 Discord server invite link :                                         |")
  171.     print("                |                 https://discord.com/invite/R8RYXyB4Cg                                |")
  172.     print("                |                                                                                      |")
  173.     print("               [*]=----------------------------------------------------------------------------------=[*]")
  174.     print("")
  175.     ic = input("")
  176.  
  177. def choice():
  178.     print("               [*]=--------------------------------------------------=[*]")
  179.     print("                |                                                      |")
  180.     print("                |                 1. Normal spambot                    |")                    
  181.     print("                |                 2. Wordlist spambot                  |")
  182.     print("                |                 3. Discord webhook spam              |")
  183.     print("                |                 4. Discord self bot                  |")
  184.     print("                |                 5. Credit                            |")
  185.     print("                |                                                      |")
  186.     print("                |                                                      |")
  187.     print("               [*]=--------------------------------------------------=[*]")
  188.     print("")
  189.     spamchoice = input(CRED + ">>> " + CEND)
  190.    
  191.     if spamchoice == ("1"):
  192.         os.system("cls")
  193.         normalspam()
  194.  
  195.     if spamchoice == ("2"):
  196.         os.system("cls")
  197.         wordlistspam()
  198.    
  199.     if spamchoice == ("3"):
  200.         os.system("cls")
  201.         discordwebhookspam()
  202.    
  203.     if spamchoice == ("4"):
  204.         os.system("cls")
  205.         Bot_run()
  206.     if spamchoice == ("5"):
  207.         os.system("cls")
  208.         credit()
  209.  
  210.  
  211.  
  212.  
  213. choice()
  214.  
  215.    
  216.  
  217.  
  218.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement