公开学习文档

公开学习文档


tcpdump

<h2>tcpdump 原理</h2> <p>&gt; 参考文档:<a href="https://zhuanlan.zhihu.com/p/575491185">https://zhuanlan.zhihu.com/p/575491185</a></p> <h2>常用命令</h2> <pre><code class="language-sh"># 抓 ipid=0x1234 的 RST 包 tcpdump -i eth0 tcp and 'ip[4:2]==0x1234' and 'tcp[tcpflags] &amp;amp; tcp-rst != 0' -s0 -nn -c 100 # 抓 syn 包 tcpdump -i eth0 'tcp[tcpflags] &amp;amp; (tcp-syn|tcp-ack) == 2' -s0 -nn -c 100 # 抓 ADSL 拨号包 tcpdump -i eth0 ether[20:2]=0xc023 or ether[20:2]=0xc223 or ether[20:2]=0xc021 or ether[20:2]=0x8021 -s0 -nn -c 100 # 循环抓包 tcpdump -i eth0 -C 10 -W 5 -s0 -nnv -w /data/zany.cap # 抓 5 个文件,每个文件限制大小为 10M</code></pre>

页面列表

ITEM_HTML