简体   繁体   English

从命令行重播pcap(wireshark)捕获的文件

[英]replay pcap (wireshark) captured files from commandline

I've got software that listens for SNMP Traps and performs certain functions on receiving them. 我有监听SNMP陷阱并在接收它们时执行某些功能的软件。 for testing, I am able to replay pcap files from wireshark using playcap, but I'd like to automate this testing and execute specific files and then test the results for what is expected behaviour. 对于测试,我可以使用playcap从wirehark重放pcap文件,但是我想自动执行此测试并执行特定的文件,然后对预期行为进行测试。

I've played around with playcap and see that if I run playcap from commandline, it's first parameter is the filename. 我玩过playcap,看到如果我从命令行运行playcap,它的第一个参数是文件名。 What seems to be missing is the step of specifying which interface to play the file on and actually running the file. 似乎缺少的是指定在哪个接口上播放文件并实际运行文件的步骤。 adding additional params at commandline doesn't have any apparent affect. 在命令行中添加其他参数不会产生任何明显的影响。 (this was all tested within windows). (所有这些都在Windows中进行了测试)。

Any alternate methods of replaying pcap files that could be executed from commandline would be great. 可以从命令行执行的重放pcap文件的任何其他方法都很好。 Please consider that I need to add this to my automated testing of a windows based system. 请考虑我需要将此添加到基于Windows的系统的自动测试中。

playcap indeed accepts no other arguments than the file. playcap实际上不接受文件以外的其他参数。 There's some links on the Wireshark wiki to other tools (under "traffic generators"), it looks like Bit-Twist might serve your needs. Wireshark Wiki上有一些指向其他工具的链接 (在“流量生成器”下),看来Bit-Twist可以满足您的需求。 Disclaimer: no personal experience. 免责声明:没有亲身经历。

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

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