Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Replay" tcpdump file

I am writing a program for analyzing certain type of packets. I got the dump file containing test packets in tcpdump format. is there any way to send this dump into one of the interfaces? I thought tcpdump would be able to do this on its own (unfortunately it isn't). Only thing I managed to do is to look at packets via wireshark (which obviously isn't the way to go).

I could use libpcap function pcap_open_offline(), unfortunately I use pcap_loop() which doesn't seem to work with pcap_open_offline() and rewriting code to pcap_next() would be very painful. Is there any program that could send packets to the interface?

like image 988
Blackie123 Avatar asked Dec 27 '22 09:12

Blackie123


1 Answers

Did you try to take a look to tcpreplay that is done to :

Replay network traffic stored in pcap files

like image 168
Cédric Julien Avatar answered Jan 11 '23 00:01

Cédric Julien