简体   繁体   English

发送记录的数据包

[英]Sending recorded packets

是否有一个库或一个类可以让我记录来自我的计算机的数据包(这是在 ETHEREAL[WIRESHARK] 和 WPE PRO 等工具上完成的(如果你碰巧是游戏玩家)。然后在一个循环。我正在尝试提供一项能够及时与我的路由器交互的服务。谢谢 ;)。

"

Following clarification that this is for replay of TCP traffic I think your suggested approach is not suitable. 在澄清这是为了重播TCP流量之后,我认为您建议的方法不适合。

TCP is connection oriented and uses a random sequence number on establishing the connection so replaying the packets from an earlier session won't work. TCP是面向连接的,并在建立连接时使用随机序列号,因此无法播放较早会话中的数据包。

If you really want to resend packets from a .pcap file in a loop in C# you can use Pcap.Net . 如果您真的想在C#中以循环方式重新发送来自.pcap文件的数据包,则可以使用Pcap.Net

See Reading packets from a dump file in Pcap.Net tutorial to understand how to read the packets from the .pcap file and Sending Packets in Pcap.Net tutorial to understand how to send the packets. 请参阅Pcap.Net教程中的从转储文件中读取数据包以了解如何从.pcap文件中读取数据包,以及Pcap.Net教程中的发送数据包以了解如何发送数据包。

I hope this would help you. 希望对您有帮助。

使用 WPE PRO,您可以多次发送相同的包,但(socket id)会随着您关闭和打开游戏而不断变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM