1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Sending packets with Scapy within Python environment

Discussão em 'Python' iniciado por Stack, Setembro 16, 2025.

  1. Stack

    Stack Membro Participativo

    I am playing around with Scapy and I want to use it within a Python script but sending packets seem to be a problem. Here is my code.

    Scapy Shell:

    send(IP(src="10.0.99.100",dst="10.1.99.100")/ICMP()/"Hello World")


    This works fine and sends the packet.

    Python script:

    #! /usr/bin/env python

    from scapy.all import sr1,IP,ICMP

    p=sr1(IP(src="10.0.99.100",dst="10.1.99.100")/ICMP()/"Hello World")


    This runs fine but when it tries to send the packet I get:

    WARNING: No route found for IPv6 destination :: (no default route?)
    Begin emission:
    .Finished to send 1 packets.
    ....^C
    Received 5 packets, got 0 answers, remaining 1 packets

    Continue reading...

Compartilhe esta Página