appneta / tcpreplay

Pcap editing and replay tools for *NIX and Windows - Users please download source from
http://tcpreplay.appneta.com/wiki/installation.html#downloads
1.15k stars 268 forks source link

[Bug] pcap files being skipped when replaying a directory or using wildcards #746

Closed showipintbri closed 1 year ago

showipintbri commented 1 year ago

Describe the bug When executing tcpreplay against a source directory or wildcards some pcap files are being skipped. I have verified the capture files are indeed all pcap and not pcapng via: file *.* All files open correctly in wireshark and tcpdump for analysis.

Tcpreplay will replay the skipped files individually without error but not when invoked as shown below.

I have tried renaming stream.pcap and web.pcap to abc_04.pcap and abc_05.pcap but still they are skipped.

To Reproduce Steps to reproduce the behavior:

  1. ls
    abc_01.pcap
    abc_02.pcap
    abc_03.pcap
    stream.pcap
    web.pcap
  2. Replay:
    tcpreplay -i eno7 /pcaps/
    or
    tcpreplay -i eno7 /pcaps/*.*
  3. Files skipped:
    stream.pcap
    web.pcap

Expected behavior When running against a source directory or using wildcards, replay each file in the directory or matches the wildcard.

System:

fklassen commented 1 year ago

Works for me.

Try copying abc_01.pcap to stream.pcap and web.pcap. I suspect that the last 2 files are unsupported PCAP formats (e.g. PCAPNG).