【发布时间】:2011-10-07 01:01:20
【问题描述】:
出于某种研究原因,我需要获取 http 包的 tcp 序列号。我已经拿到了 pcap 文件,那我应该怎么用 tshark 做呢?
非常感谢您回答我的问题!!!
【问题讨论】:
出于某种研究原因,我需要获取 http 包的 tcp 序列号。我已经拿到了 pcap 文件,那我应该怎么用 tshark 做呢?
非常感谢您回答我的问题!!!
【问题讨论】:
应该这样做:
tshark -r your_file -R http -T fields -e tcp.seq
序列号是相对的或绝对的,由 .wireshark/preferences 控制。默认情况下它是相对的(所以你会看到小数字)。如果你想要绝对序列号,编辑preferences:
tcp.relative_sequence_numbers: FALSE
【讨论】:
使用 tshark,
应用相应的 tcp 过滤器 (tcp.nxtseq) 检查此页面的更多信息 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
【讨论】: