[Python] How to send a raw TCP packet over IPv6 using Scapy?

Discussão em 'Python' iniciado por Stack, Maio 20, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to send a raw tcp packet over Ipv6 using Scapy. But I always get the warning: No route found for IPv6 destination (ipv6 address) (no default route?)

    I am deploying in Kali Linux.

    My current code:

    localPort = 24
    port = 300
    size = 30
    localIpv6 = #my local ipv6 address with the interface (%eth0)
    dstIpv6 = #ipv6 address of the target device

    ip = IPv6(src=localIpv6 , dst = dstIpv6)
    tcp = TCP(sport = localPort, dport = port, flags = "S")
    raw = Raw(b"x" * size)
    packet = ip / tcp / raw

    send(packet, iface="eth0", verbose = True)


    I also tried send without the iface and the localIpv6 without the interface.

    I run the script with sudo and the ping to the target device is working. I expecting to see a packet in Wireshark.

    Continue reading...

Compartilhe esta Página