<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Tcpdump on ZRJ | 学习笔记</title>
        <link>https://blog.zrj.me/tags/tcpdump/</link>
        <description>Recent content in Tcpdump on ZRJ | 学习笔记</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-CN</language>
        <lastBuildDate>Mon, 23 Nov 2015 11:50:39 +0800</lastBuildDate><atom:link href="https://blog.zrj.me/tags/tcpdump/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>linux tcpdump</title>
        <link>https://blog.zrj.me/posts/2015-11-23-linux-tcpdump/</link>
        <pubDate>Mon, 23 Nov 2015 11:50:39 +0800</pubDate>
        
        <guid>https://blog.zrj.me/posts/2015-11-23-linux-tcpdump/</guid>
        <description>&lt;p&gt;我一般用 tcpdump 有两种用法，一个是存盘，拿 wireshark 看，那么的话，就这么写&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tcpdump -s 0 -i any -p udp and src 10.170.7.40 -w `date +%s`.pcap
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;或者实时打印到屏幕，就参考这里，&lt;a class=&#34;link&#34; href=&#34;http://www.askbjoernhansen.com/2007/07/12/how_to_dump_packets_with_tcpdump.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;http://www.askbjoernhansen.com/2007/07/12/how_to_dump_packets_with_tcpdump.html&lt;/a&gt;，这么写&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I always forget the parameters for this and have to look them up in the man page, so enough of that:&lt;/p&gt;
&lt;p&gt;tcpdump -nnXSs 0 &amp;lsquo;port 80&amp;rsquo; &amp;ldquo;-nn&amp;rdquo; makes it not lookup hostnames in DNS and service names (in /etc/services) for respectively faster and cleaner output. &amp;ldquo;-X&amp;rdquo; makes it print each packet in hex and ascii; that&amp;rsquo;s really the useful bit for tracking headers and such &amp;ldquo;-S&amp;rdquo; print absolute rather than relative TCP sequence numbers - If I remember right this is so you can compare tcpdump outputs from multiple users doing this at once &amp;ldquo;-s 0&amp;rdquo; by default tcpdump will only capture the beginning of each packet, using 0 here will make it capture the full packets. We are debugging, right? Instead of &amp;ldquo;port 80&amp;rdquo; you can make more complicated rules like &amp;ldquo;port 80 and host 10.50.33.10&amp;rdquo;.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
        </item>
        
    </channel>
</rss>
