How to send pcap file packets on NIC?

醉酒当歌 提交于 2019-12-03 00:38:55

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

bit-twist can do this.

just install it and inject your packet like this :

# bittwist -i eth0 pcap-file.pcap 

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

Anand

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!