我感觉到一个X Y问题。UI是为用户设计的,而不是以编程方式操作的。在
不如看看。。。。在
Wireshark工具tshark - Dump and analyze network traffic
TShark is a network protocol analyzer. It lets you capture packet data
from a live network, or read packets from a previously saved capture
file, either printing a decoded form of those packets to the standard
output or writing the packets to a file. TShark's native capture file
format is pcap formatdumpcap - Dump network traffic
Dumpcap is a network traffic dump tool. It lets you capture packet
data from a live network and write the packets to a file. Dumpcap's
default capture file format is pcapng format. When the -P option is
specified, the output file is written in the pcap format.
小提琴手(见评论)Fiddler supports a variety of command line arguments that control
various options:
Fiddler Command-Line Help
Usage:fiddler.exe [options] [FileToLoad.saz]
其他
tcpdump(以上大部分基于此或使用此)This is the official web site of tcpdump, a powerful command-line
packet analyzer; and libpcap, a portable C/C++ library for network
traffic capture.