0

In Linux, I have a problem with scapy using sendpfast Is there anyone who experiences the same problem as me?

I will be very grateful to someone who has a solution to this.

my code after I implemented python on Linux terminal

import sys

from scapy.all import *

pkt = Ether(src="00:00:00:00:00:01", dst="00:00:00:00:00:02")/IP(src="10.1.1.1", dst="10.1.1.2")/UDP(sport=5001, dport=5002)/Raw(RandString(size=1460))

sendpfast(pkt, pps=1000, loop=10000)

and this is a error code written on terminal.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/scapy/sendrecv.py", line 398, in sendpfast
    log_runtime.info(stdout.decode())
  File "/usr/local/lib/python2.7/dist-packages/scapy/utils.py", line 555, in __exit__
    raise OSError(msg)
OSError: sendpfast(): executing 'tcpreplay' failed`

I reinstalled tcpreplay(version 4.4.2) with the scapy. My python version is 2.7 and I don't know what's the problem.

  • "`2.7`". Ummm, you heard about the whole [sunsetting](https://www.python.org/doc/sunset-python-2) thing, right? – J_H Jan 13 '23 at 06:40
  • you mean I'm having a problem from not using python3? – kyeong tak Lee Jan 13 '23 at 06:44
  • 1
    I'm suggesting that you might not want to devote effort to a python 2.7 codebase. For example, you might find that you obtain better support from the ecosystem when you target a python3 interpreter. – J_H Jan 13 '23 at 06:46
  • Are you running this as root? Also check that `conf.prog.tcpdump` looks correct – Cukic0d Jan 19 '23 at 00:32

0 Answers0