如何使用tshark提取所有http请求的tcp序列号?
问题描述:
由于某些研究原因,我需要获取http包的tcp序列号。我已经有了pcap文件,那么我应该如何使用tshark来做到这一点?如何使用tshark提取所有http请求的tcp序列号?
非常感谢您回答我的问题!
答
像这样的东西应该这样做:由.wireshark /喜好控制
tshark -r your_file -R http -T fields -e tcp.seq
的序列号是相对或绝对的。默认情况下它是相对的(所以你会看到小数字)。如果你想绝对序列号,编辑preferences
:
tcp.relative_sequence_numbers: FALSE
答
使用tshark的,
从这个页面 https://www.wireshark.org/docs/dfref/t/tcp.html
C:\Program Files\Wireshark>tshark -r C:<path to pcap>sample.pcap -T fields -e ip.src -e ip.dst -e ip.proto -e tcp.srcport -e tcp.dstport -e tcp.flags.ack -e tcp.flags.cwr -e tcp.flags.ecn -e tcp.flags.fin -e tcp.flags.ns -e tcp.flags.push -e tcp.flags.res -e tcp.flags.reset -e tcp.flags.syn -e tcp.flags.urg > C:/20Oct.txt
更多应用把对应的TCP过滤器(tcp.nxtseq)检查