tshark -T 命令如何能够返回text内容一样的json数据
{
"code": "200",
"msg": "Success!",
"data": [
"Frame 1: 62 bytes on wire (496 bits), 62 bytes captured (496 bits) on interface 0",
" Interface id: 0 (unknown)",
" Interface name: unknown",
" Encapsulation type: Linux cooked-mode capture (25)",
" Arrival Time: Apr 5, 2022 18:52:44.765045000 PDT",
" [Time shift for this packet: 0.000000000 seconds]",
" Epoch Time: 1649209964.765045000 seconds",
" [Time delta from previous captured frame: 0.000000000 seconds]",
" [Time delta from previous displayed frame: 0.000000000 seconds]",
" [Time since reference or first frame: 0.000000000 seconds]",
" Frame Number: 1",
" Frame Length: 62 bytes (496 bits)",
" Capture Length: 62 bytes (496 bits)",
" [Frame is marked: False]",
" [Frame is ignored: False]",
" [Protocols in frame: sll:ethertype:ip:tcp:vssmonitoring]",
"Linux cooked capture",
" Packet type: Unicast to us (0)",
" Link-layer address type: 1",
" Link-layer address length: 6",
" Source: Vmware_c0:00:08 (00:50:56:c0:00:08)",
" Unused: 0000",
" Protocol: IPv4 (0x0800)",
" Padding: 00000000",
"Internet Protocol Version 4, Src: 192.168.150.1, Dst: 192.168.150.128",
" 0100 .... = Version: 4",
" .... 0101 = Header Length: 20 bytes (5)",
" Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)",
" 0000 00.. = Differentiated Services Codepoint: Default (0)",
" .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)",
" Total Length: 40",
" Identification: 0x99ed (39405)",
" Flags: 0x4000, Don't fragment",
" 0... .... .... .... = Reserved bit: Not set",
" .1.. .... .... .... = Don't fragment: Set",
" ..0. .... .... .... = More fragments: Not set",
" ...0 0000 0000 0000 = Fragment offset: 0",
" Time to live: 64",
" Protocol: TCP (6)",
" Header checksum: 0xf30f [validation disabled]",
" [Header checksum status: Unverified]",
" Source: 192.168.150.1",
" Destination: 192.168.150.128",
"Transmission Control Protocol, Src Port: 61133, Dst Port: 9091, Seq: 1, Ack: 1, Len: 0",
" Source Port: 61133",
" Destination Port: 9091",
" [Stream index: 0]",
" [TCP Segment Len: 0]",
" Sequence number: 1 (relative sequence number)",
" [Next sequence number: 1 (relative sequence number)]",
" Acknowledgment number: 1 (relative ack number)",
" 0101 .... = Header Length: 20 bytes (5)",
" Flags: 0x010 (ACK)",
" 000. .... .... = Reserved: Not set",
" ...0 .... .... = Nonce: Not set",
" .... 0... .... = Congestion Window Reduced (CWR): Not set",
" .... .0.. .... = ECN-Echo: Not set",
" .... ..0. .... = Urgent: Not set",
" .... ...1 .... = Acknowledgment: Set",
" .... .... 0... = Push: Not set",
" .... .... .0.. = Reset: Not set",
" .... .... ..0. = Syn: Not set",
" .... .... ...0 = Fin: Not set",
" [TCP Flags: ·······A····]",
" Window size value: 511",
" [Calculated window size: 511]",
" [Window size scaling factor: -1 (unknown)]",
" Checksum: 0x2e54 [unverified]",
" [Checksum Status: Unverified]",
" Urgent pointer: 0",
" [Timestamps]",
" [Time since first frame in this TCP stream: 0.000000000 seconds]",
" [Time since previous frame in this TCP stream: 0.000000000 seconds]",
"VSS-Monitoring ethernet trailer, Source Port: 0",
" Src Port: 0",
""
]
}