Enhanced packet_parser tools

This commit is contained in:
luwenpeng
2024-06-04 17:26:37 +08:00
parent 8c4f4c9f72
commit bd69493991
2 changed files with 183 additions and 69 deletions

View File

@@ -148,11 +148,24 @@ for pcap in "${pcap_files[@]}"; do
curr_count=$((curr_count + 1))
# tshark output frame.protocols
tshark -r ${pcap} -T fields -e frame.number -e frame.protocols >>${tmp_file_dir}/tshark_output.txt
# tshark output
tshark -r ${pcap} -T fields \
-e frame.number \
-e frame.protocols \
-e eth.src \
-e eth.dst \
-e ip.src \
-e ip.dst \
-e ipv6.src \
-e ipv6.dst \
-e tcp.srcport \
-e tcp.dstport \
-e udp.srcport \
-e udp.dstport \
>>${tmp_file_dir}/tshark_output.txt
# packet_parser output frame.protocols
./packet_parser -f ${pcap} -p >>${tmp_file_dir}/parser_output.txt
# packet_parser output
./packet_parser -f ${pcap} -t >>${tmp_file_dir}/parser_output.txt
# compare tshark and packet_parser output
preprocess_tshark_ouput ${tmp_file_dir}/tshark_output.txt ${tmp_file_dir}/tshark_format.txt