Scapy lacks support for interface scoping such as fe80: :1%eth0. Instead, remove %eth0 and define the interface individually
For link-local addresses, use sendp() (Layer 2) because routing can’t be resolved at Layer 3 without scoping.
from scapy.all import *
localPort = 24
port = 300
size = 30
# Link-local IPv6 addresses (without %eth0)
localIpv6 = "fe80::1ab:2c3d:4e5f:6789"
dstIpv6 = "fe80::abcd:1234:5678:9abc"
ip = IPv6(src=localIpv6, dst=dstIpv6)
tcp = TCP(sport=localPort, dport=port, flags="S")
raw = Raw(b"x" * size)
packet = ip / tcp / raw
# Use Ether() + sendp for link-local
sendp(Ether() / packet, iface="eth0", verbose=True)
use this
Execute the script using sudo.
Make sure Wireshark is recording on eth0.
Apply the display filter: ipv6 && tcp
For global IPv6 (2001::/), send() functions if a default route is present.