How to send pcap file packets on NIC?

2019-03-14 03:43发布

I have some network traffic captured pcap file and want to send its packets on NIC; is it possible? Is there any application to do this?

5条回答
Fickle 薄情
2楼-- · 2019-03-14 04:14

bit-twist can do this.

just install it and inject your packet like this :

# bittwist -i eth0 pcap-file.pcap 
查看更多
乱世女痞
3楼-- · 2019-03-14 04:27

I use tcpreplay on Linux/Freebsd eg:

#tcpreplay -l 0 -i eth1 path-to-your-captured-file.pcap

-l loop how many times, 0 for infinite
-i interface where you want to send out

查看更多
可以哭但决不认输i
4楼-- · 2019-03-14 04:29

There is a libpcap/winpcap library, that allows the programmer to send/receive packets and work directly with NDIS-level driver. http://www.winpcap.org

查看更多
啃猪蹄的小仙女
5楼-- · 2019-03-14 04:31

Yes there is a way - sending a packet to NIC means injecting it to an interface.

You can do this with the help of libnet packege in linux. I myself am working on the same these days. Try Googling with this term, you'll surely get some good stuff to share.

查看更多
做个烂人
6楼-- · 2019-03-14 04:32

You should be able to use some kind of replay application like this one (tcpreplay).

查看更多
登录 后发表回答