{"id":233837,"date":"2014-08-19T12:10:03","date_gmt":"2014-08-19T08:10:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=233837"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=233837","title":{"rendered":"<span class=\"post_title\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e tshark<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/23c\/c61\/74d\/23cc6174d2cc5cbb170f1eacb63a8b6c.png\" alt=\"tshark\"\/><\/p>\n<p>  \u0412&nbsp;\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f c\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e&nbsp;\u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u0432&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435&nbsp;\u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0438&nbsp;\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, netstat), \u043d\u0438&nbsp;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430&nbsp;\u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 ICMP (ping, traceroute \u0438&nbsp;\u0434\u0440\u0443\u0433\u0438\u0435). \u0412&nbsp;\u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0434\u0430\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u00ab\u0441\u043b\u0443\u0448\u0430\u0442\u044c\u00bb \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0438&nbsp;\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430&nbsp;\u0443\u0440\u043e\u0432\u043d\u0435 \u0435\u0434\u0438\u043d\u0438\u0446 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432. \u041e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0430&nbsp;\u043d\u0430&nbsp;\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0436\u0430\u0440\u0433\u043e\u043d\u0435&nbsp;&mdash; \u0441\u043d\u0438\u0444\u0444\u0435\u0440\u0430\u043c\u0438. \u0421&nbsp;\u0438\u0445&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438&nbsp;\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u0438\u0445&nbsp;\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430&nbsp;\u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445&nbsp;&mdash; \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u0437\u0438\u0442\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0438&nbsp;\u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0432&nbsp;\u0441\u0435\u0442\u0438 \u0437\u043b\u043e\u0432\u0440\u0435\u0434\u043d\u043e\u0435 \u041f\u041e.<\/p>\n<p>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432&nbsp;\u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0435&nbsp;\u041f\u041e \u043f\u043b\u043e\u0445\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437&nbsp;\u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0438&nbsp;\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Wireshark, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0439 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 GNU GPL. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Wireshark \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c: Linux, Windows, MacOS, FreeBSD, Solaris. <\/p>\n<p>  Tshark \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 libpcap, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0443\u044e API pcap (packet capture). \u042d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438&nbsp;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <a href=\"http:\/\/www.tcpdump.org\/\" rel=\"nofollow\">tcpdump<\/a>. \u0424\u0430\u0439\u043b\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432&nbsp;tcpdump, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c tshark \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. <\/p>\n<p>  \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c tshark \u043f\u043e&nbsp;\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441&nbsp;tcpdump \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u044f\u0441\u043d\u044b\u0439 \u0438&nbsp;\u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, tshark \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 (\u0431\u043e\u043b\u0435\u0435 300, \u0447\u0442\u043e \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u0441\u0435\u0442\u0435\u0439).<\/p>\n<p>  \u041e\u0431&nbsp;\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0441&nbsp;tshark \u043c\u044b&nbsp;\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432&nbsp;\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. <\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>  Tshark \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432&nbsp;\u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 Linux-\u0441\u0438\u0441\u0442\u0435\u043c \u0438&nbsp;\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre> $ sudo apt-get install tshark <\/pre>\n<p>  \u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443:<\/p>\n<pre> $ sudo tshark <\/pre>\n<p>  \u041d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0432&nbsp;\u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<pre> Capturing on&nbsp;eth0 0.000000 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.120? Tell&nbsp;31.186.98.1 0.322046 5a:58:74:bf:a9:9c -&gt; Broadcast ARP Who has 31.186.98.77? Tell&nbsp;31.186.98.226 0.351801 31.186.98.235 -&gt; 188.93.16.50&nbsp;SSH Encrypted response packet len=224 0.352414 188.93.16.50 -&gt; 31.186.98.235&nbsp;TCP cap &gt; ssh [ACK] Seq=1 Ack=225 Win=331 Len=0&nbsp;TSV=194287231&nbsp;TSER=416767897 0.600054 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.120? Tell&nbsp;31.186.98.1 0.622913 Cisco_0d:0d:96 -&gt; PVST+ STP Conf. Root = 32768\/398\/00:21:1c:0d:0d:80 Cost = 0&nbsp;Port = 0&times;8016 0.800377 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.107? Tell&nbsp;31.186.98.1 1.320775 31.186.98.235 -&gt; 188.93.16.50&nbsp;SSH Encrypted response packet len=528 1.321507 188.93.16.50 -&gt; 31.186.98.235&nbsp;TCP cap &gt; ssh [ACK] Seq=1 Ack=753 Win=331 Len=0&nbsp;TSV=194287474&nbsp;TSER=416768866 1.322109 5a:58:74:bf:a9:9c -&gt; Broadcast ARP Who has 31.186.98.77? Tell&nbsp;31.186.98.226 1.400654 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.107? Tell&nbsp;31.186.98.1 1.589797 Cisco_0d:0d:96 -&gt; PVST+ STP Conf. Root = 32768\/401\/00:21:1c:0d:0d:80 Cost = 0&nbsp;Port = 0&times;8016 2.100769 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.107? Tell&nbsp;31.186.98.1 2.322163 5a:58:74:bf:a9:9c -&gt; Broadcast ARP Who has 31.186.98.77? Tell&nbsp;31.186.98.226 2.322764 31.186.98.235 -&gt; 188.93.16.50&nbsp;SSH Encrypted response packet len=720 2.323594 188.93.16.50 -&gt; 31.186.98.235&nbsp;TCP cap &gt; ssh [ACK] Seq=1 Ack=1473 Win=331 Len=0&nbsp;TSV=194287724&nbsp;TSER=416769868 2.520048 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.64? Tell&nbsp;31.186.98.1 2.635370 Cisco_0d:0d:96 -&gt; PVST+ STP Conf. Root = 32768\/398\/00:21:1c:0d:0d:80 Cost = 0&nbsp;Port = 0&times;8016 3.200299 88:e0:f3:b6:47:c0 -&gt; Broadcast ARP Who has 31.186.98.64? Tell&nbsp;31.186.98.1 3.451774 31.186.98.235 -&gt; 188.93.16.50&nbsp;SSH Encrypted response packet len=528 <\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437&nbsp;\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430, tshark \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u043f\u043e\u0434\u0440\u044f\u0434, \u0432&nbsp;\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438&nbsp;\u043e&nbsp;\u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432&nbsp;\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435&nbsp;\u043d\u0443\u0436\u043d\u044b. \u0421&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430&nbsp;\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. <\/p>\n<h2>\u0424\u0438\u043b\u044c\u0442\u0440\u044b<\/h2>\n<p>  <\/p>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430<\/h3>\n<p>  \u041e\u043f\u0446\u0438\u044f -i \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre> $ sudo tshark -D  1. eth0 2. any 3. lo&nbsp;(Loopback) 4. nflog 5. nfqueue 6. usbmon1 <\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u0446\u0438\u0438 -i \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u0437&nbsp;\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432:<\/p>\n<pre> $ sudo tshark -i eth0 <\/pre>\n<p>  \u0421&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 host \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430:<\/p>\n<pre> $&nbsp;sudo tshark -i eth0 host 192.168.1.100 <\/pre>\n<p>  \u0412&nbsp;\u0432\u044b\u0432\u043e\u0434 \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a\u0430\u043a \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435, \u0442\u0430\u043a \u0438&nbsp;\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043e&nbsp;\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431&nbsp;\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b dst \u0438&nbsp;src \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<pre> $ sudo tshark -i eth0 src host 192.168.1.100  <\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441&nbsp;\u0430\u0434\u0440\u0435\u0441\u0430 192.168.1.100<\/p>\n<pre> $ sudo tshark -i eth0 dst host 192.168.1.100  <\/pre>\n<p>  \u041d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u043d\u0430&nbsp;\u0430\u0434\u0440\u0435\u0441 192.168.1.100.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0446\u0435\u043b\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438&nbsp;&mdash; \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 net:<\/p>\n<pre> $ sudo tshark -i eth0 src net 192.168.1.0\/24 <\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0440\u0442, \u043d\u0430&nbsp;\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<pre> $ sudo tshark -i eth0 host 192.168.1.1 and port 80 <\/pre>\n<p>  Tshark \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0432&nbsp;\u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<pre> $ sudo tshark -i eth0 -a duration:10 -w traffic.pcap <\/pre>\n<p>  \u0412&nbsp;\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043e\u043f\u0446\u0438\u044f -w. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0451 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u043a&nbsp;\u0444\u0430\u0439\u043b\u0443, \u0432&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. <\/p>\n<h3>\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0437\u0430\u0445\u0432\u0430\u0442\u0430<\/h3>\n<p>  \u042d\u0442\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u00ab\u043d\u0430&nbsp;\u043b\u0435\u0442\u0443\u00bb. \u041e\u043d\u0438 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432&nbsp;\u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f pcap, \u0432&nbsp;\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u041d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0442\u0430&nbsp;\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0441&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c.<\/p>\n<p>  \u0412&nbsp;\u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u044b tshark \u0441&nbsp;\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre> $&nbsp;sudo tshark -i &lt;\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441&gt; -f &lt;\u0444\u0438\u043b\u044c\u0442\u0440&gt; <\/pre>\n<p>  \u0412&nbsp;tshark \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439&nbsp;\u0436\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043a\u0430\u043a \u0438&nbsp;\u0432&nbsp;tcpdump. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u043e\u0442\u0441\u044b\u043b\u043a\u043e\u0439 \u043a <a href=\"http:\/\/man.he.net\/man7\/pcap-filter\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043c\u0430\u043d\u0443\u0430\u043b\u0443<\/a>).<\/p>\n<h3>\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0447\u0442\u0435\u043d\u0438\u044f<\/h3>\n<p>  Tshark \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e&nbsp;\u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0432&nbsp;\u0444\u0430\u0439\u043b\u0430\u0445. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u0437&nbsp;\u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0447\u0442\u0435\u043d\u0438\u044f, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0442\u0430\u043a&nbsp;\u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 (\u043e\u043f\u0446\u0438\u044f -R). \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0438&nbsp;\u043f\u0440\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u00ab\u043d\u0430&nbsp;\u043b\u0435\u0442\u0443\u00bb. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435&nbsp;pcap, \u0430&nbsp;\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0430\u043c\u043e\u0433\u043e tshark.<\/p>\n<p>  \u042d\u0442\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0434\u0430\u044e\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0442\u0431\u043e\u0440\u0430 \u0438&nbsp;\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. <\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u0435\u0442, \u043e\u0434\u043d\u0430\u043a\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u00ab\u043d\u0430&nbsp;\u043b\u0435\u0442\u0443\u00bb \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043d\u0435&nbsp;\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441&nbsp;\u0432\u043e\u0437\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c\u0438 \u043d\u0430&nbsp;\u043d\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438: \u043d\u0435&nbsp;\u0443\u0441\u043f\u0435\u0432\u0430\u044e\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u0438&nbsp;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u0430\u043a\u0435\u0442\u044b. <\/p>\n<p>  \u0412&nbsp;\u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre> $ sudo tshark -R &quot;\u043f\u0440\u0430\u0432\u0438\u043b\u043e&quot; -r &quot;\u043f\u0443\u0442\u044c \u043a&nbsp;\u0444\u0430\u0439\u043b\u0443&quot; <\/pre>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430&nbsp;\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445. <br \/>  \u0422\u0430\u043a, \u043a\u043e\u043c\u0430\u043d\u0434\u0430<\/p>\n<pre> $ sudo tshark -R &quot;ip.addr == 192.168.0.1&quot; -r \/tmp\/capture.cap <\/pre>\n<p>  \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0437&nbsp;\u0444\u0430\u0439\u043b\u0430 \/tmp\/capture.cap \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431&nbsp;\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0438&nbsp;\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0434\u043b\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0430 192.168.0.1. <\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0437&nbsp;\u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e&nbsp;\u0432\u0445\u043e\u0434\u044f\u0448\u0438\u0445 \u0438&nbsp;\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 IP- \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 192.168.0.1:<\/p>\n<pre> $ sudo tshark -R &quot;!(ip.addr == 192.168.0.1)&quot; -r \/tmp\/capture.cap  <\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438&nbsp;\u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0438&nbsp;\u043f\u043e\u0440\u0442\u043e\u0432 (\u0444\u0438\u043b\u044c\u0442\u0440\u044b eth.addr, udp.port, tcp.port):<\/p>\n<pre> $ sudo tshark -R  &quot;eth.addr == 00:08:15:00:08:15&quot; -r \/tmp\/capture.cap  $ sudo tshark -R &quot;udp.port == 80&quot; -r \/tmp\/capture.cap  $ sudo tshark -R &quot;tcp.port == 80&quot; -r \/tmp\/capture.cap <\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 and, or&nbsp;\u0438&nbsp;not:<\/p>\n<pre> $ sudo tshark -R &quot;not arp and not (udp.port == 53)&quot; -r \/tmp\/capture.cap <\/pre>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 ARP \u0438&nbsp;DNS (53&nbsp;\u043f\u043e\u0440\u0442).<\/p>\n<h2>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h2>\n<p>  <\/p>\n<h3>C\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/h3>\n<p>  C&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0446\u0438\u0438 -z \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438&nbsp;\u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e&nbsp;\u043f\u0430\u043a\u0435\u0442\u0430\u0445. <\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u0430\u043d\u0434\u0430<\/p>\n<pre> $ sudo tshark -z &quot;proto,colinfo,tcp.srcport,tcp.srcport&quot; -r \/tmp\/capture.cap <\/pre>\n<p>  \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0437&nbsp;\u0444\u0430\u0439\u043b\u0430 \/tmp\/capture.cap \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e&nbsp;\u043f\u043e\u0440\u0442\u0435-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435 \u0432\u0441\u0435\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre> $ sudo tshark -R &quot;http.response and http.content_type contains image&quot; \\ -z &quot;proto,colinfo,http.content_length,http.content_length&quot; \\ -z &quot;proto,colinfo,http.content_type,http.content_type&quot; \\ -r \/tmp\/capture.cap <\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u0442 \u0438\u0437&nbsp;\u0444\u0430\u0439\u043b\u0430 \/tmp\/capture.cap \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445, \u0432&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0438&nbsp;\u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043b\u0435\u0439 content_type \u0438&nbsp;content_length:<\/p>\n<pre> 439 12.717117 66.249.89.127 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 35 452 12.828186 66.114.48.56 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 477 479 13.046184 66.114.48.56 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 105 499 13.075361 203.190.124.6 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 35 506 13.177414 66.114.48.56 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 4039 514 13.190000 66.114.48.56 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (JPEG JFIF image) http.content_type == &quot;image\/jpeg&quot; http.content_length == 11997 519 13.231228 66.114.48.56 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (JPEG JFIF image) http.content_type == &quot;image\/jpeg&quot; http.content_length == 1033 523 13.273888 72.233.69.4 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (PNG) http.content_type == &quot;image\/png&quot; http.content_length == 1974 561&nbsp;728 19.096984 60.254.185.58 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 592 805 19.471444 60.254.185.58 -&gt; 192.168.1.108&nbsp;HTTP HTTP\/1.1&nbsp;200&nbsp;OK (GIF89a) http.content_type == &quot;image\/gif&quot; http.content_length == 259 <\/pre>\n<p>  <\/p>\n<h3>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432&nbsp;\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432&nbsp;\u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434 \u0432&nbsp;\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432&nbsp;\u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0435&nbsp;\u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e: \u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043c \u0442\u0440\u0443\u0434\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. <\/p>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432&nbsp;\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438&nbsp;\u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d, tshark \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0432&nbsp;\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre> $ sudo tshark -b filesize:100 -a files:20 -w temp.pcap <\/pre>\n<p>  \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0432&nbsp;20&nbsp;\u0444\u0430\u0439\u043b\u0430\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043f\u043e&nbsp;100&nbsp;\u043a\u0411 \u043a\u0430\u0436\u0434\u044b\u0439.<\/p>\n<p>  \u0412&nbsp;\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043f\u0446\u0438\u044f -b \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u043a\u043e\u043b\u044c\u0446\u0435\u0432\u043e\u0439 \u0431\u0443\u0444\u0435\u0440, \u0430&nbsp;filesize \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440; \u043e\u043f\u0446\u0438\u044f -a \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u043e&nbsp;\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430, files&nbsp;&mdash; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0430\u0439\u043b\u043e\u0432. <\/p>\n<h3>\u0410\u0432\u0442\u043e\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u043e&nbsp;\u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/h3>\n<p>  \u0412&nbsp;\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 tshark \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432&nbsp;\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432. \u041d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432&nbsp;10240&nbsp;\u043a\u0411 \u0438\u043b\u0438 \u043f\u043e&nbsp;\u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 1&nbsp;\u0441:<\/p>\n<pre> $ sudo tshark -b filesize:10240 -b duration:1 -w temp.pcap    Capturing on&nbsp;eth0  34  # ls -lrt  -rw------- 1&nbsp;root root 1863 Apr 10 16:13 temp_00001_20140410161312.pcap  -rw------- 1&nbsp;root root 1357 Apr 10 16:13 temp_00002_20140410161313.pcap  -rw------- 1&nbsp;root root 1476 Apr 10 16:13 temp_00003_20140410161314.pcap  -rw------- 1&nbsp;root root 1216 Apr 10 16:13 temp_00004_20140410161315.pcap <\/pre>\n<p>  <\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0443\u0444\u0435\u0440\u0430<\/h3>\n<p>  \u042d\u0442\u0430 \u043e\u043f\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0432&nbsp;\u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441&nbsp;\u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u041f\u043e&nbsp;\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 1\u041c\u0411; \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u043f\u0446\u0438\u0438 -B \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 (\u0432&nbsp;\u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430\u0445), \u043f\u043e&nbsp;\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430&nbsp;\u0434\u0438\u0441\u043a:<\/p>\n<pre> $ sudo tshark -B 2 <\/pre>\n<p>  <\/p>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430<\/h3>\n<p>  \u0412&nbsp;tshark \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u043a\u0435\u0442\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u043e&nbsp;\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 HTTP:<\/p>\n<pre> $ sudo tshark -q -r a.pcap -R http -z http,tree   ===================================================================  HTTP\/Packet Counter value\t rate\t percent  -------------------------------------------------------------------  Total HTTP Packets 7 0.000375  HTTP Request Packets 4 0.000214 57.14%  GET 4 0.000214 100.00%  HTTP Response Packets 3 0.000161 42.86%  2xx: Success 2 0.000107 66.67%  200&nbsp;OK 2 0.000107 100.00%  3xx: Redirection 1 0.000054 33.33%  302 Found 1 0.000054 100.00%  5xx: Server Error 0 0.000000 0.00%  Other HTTP Packets 0 0.000000 0.00% <\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/h2>\n<p>  \u0412&nbsp;\u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b&nbsp;\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c tshark \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 http-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a http-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a&nbsp;\u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre> $ sudo tshark 'tcp port 80 and (((ip[2:2] - ((ip[0]&amp;0xf)&lt;&gt;2)) != 0)' -R 'http.request.method == &quot;GET&quot; || http.request.method == &quot;HEAD&quot;' <\/pre>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre> 190.302141 192.168.0.199 -&gt; 74.125.77.104 HTTP GET \/ HTTP\/1.1 190.331454 192.168.0.199 -&gt; 74.125.77.104 HTTP GET \/intl\/en_com\/images\/srpr\/logo1w.png HTTP\/1.1 190.353211 192.168.0.199 -&gt; 74.125.77.104 HTTP GET \/images\/srpr\/nav_logo13.png HTTP\/1.1 190.400350 192.168.0.199 -&gt; 74.125.77.100 HTTP GET \/generate_204 HTTP\/1.1 <\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430&nbsp;\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437&nbsp;10&nbsp;URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0441&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 http-\u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<pre> $ tshark -r sample1.cap -R http.request -T fields -e http.host -e http.request.uri | sed -e &lsquo;s\/?.*$\/\/&rsquo;&nbsp;| sed -e &lsquo;s#^(.*)t(.*)$#http:\/\/12#&rsquo;&nbsp;| sort&nbsp;| uniq -c&nbsp;| sort -rn&nbsp;| head <\/pre>\n<p>  <\/p>\n<h3>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a http-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a&nbsp;\u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre> $ tshark -r sample1.cap -R http.request -T fields -e http.host -e http.request.uri | sed -e \u2018s\/?.*$\/\/\u2019 | sed -e \u2018s#^(.*)t(.*)$#http:\/\/12#\u2019 | sort | uniq -c | sort -rn | head <\/pre>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0434\u043b\u044f http-\u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre> $ sudo tshark tcp port 80&nbsp;or tcp port 443 -V -R &laquo;http.request&raquo; <\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432&nbsp;\u0441\u043f\u0438\u0441\u043e\u043a \u0431\u044b\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043a\u0430\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0442\u0430\u043a \u0438&nbsp;\u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre> $ sudo tshark &quot;tcp port 80 or tcp port 443&quot; -V -R &quot;http.request || http.response&quot; <\/pre>\n<p>  <\/p>\n<h3>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430<\/h3>\n<p>  \u0421&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e tshark \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 http-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u0412\u043e\u0442 \u0442\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432&nbsp;\u0444\u043e\u0440\u043c\u0430\u0442\u0435 GIF:<\/p>\n<pre> $&nbsp;sudo tshark -R &quot;http.response and http.content_type contains image&quot; \\ -z &quot;proto,colinfo,http.content_length,http.content_length&quot; \\ -z &quot;proto,colinfo,http.content_type,http.content_type&quot; \\ -r \/tmp\/capture.tmp| grep &quot;image\/gif&quot;| wc -l <\/pre>\n<p>  <\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a&nbsp;MySQL<\/h3>\n<p>  \u041e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0432&nbsp;\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432&nbsp;\u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL \u043c\u043e\u0436\u043d\u043e \u0441&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre> $ sudo tshark -i eth0 -a duration:60 -d tcp.port==3306,mysql -T fields -e mysql.query &rsquo;port 3306&prime; <\/pre>\n<p>  C&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e tshark \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432&nbsp;\u043b\u043e\u0433 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a&nbsp;MySQL. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0441\u0435\u0433\u043e MySQL-\u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e tcpdump:<\/p>\n<pre> $ sudo tcpdump -i eth0 port 3306 -s 1500 -w tcpdump.out <\/pre>\n<p>  \u0418\u0437&nbsp;\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 c&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e tshark \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre> $ sudo tshark -r tcpdump.out -d tcp.port==3306,mysql -T fields -e mysql.query &gt; query_log.out <\/pre>\n<p>  \u0418\u0437&nbsp;\u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0434\u0430\u043b\u0438\u043c \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438&nbsp;\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432&nbsp;\u043d\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre> $ sudo cat query_log.out | grep -v &quot;^$&quot; | grep -v &quot;^commit&quot; | grep -v &quot;^SET autocommit&quot; | grep -v &quot;^rollback&quot; &gt; query_log_no_blank.out <\/pre>\n<p>  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  Tshark&nbsp;&mdash; \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441&nbsp;\u043e\u0447\u0435\u043d\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043e&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0440\u044f\u0434&nbsp;\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432&nbsp;\u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u0430&nbsp;\u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u044b&nbsp;\u0441&nbsp;\u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u043c \u0432&nbsp;\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0411\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b, \u0435\u0441\u043b\u0438 \u0432\u044b&nbsp;\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e tshark.<\/p>\n<p>  \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043a \u043d\u0430\u043c \u0432 <a href=\"http:\/\/blog.selectel.ru\/analiz-setevogo-trafika-na-servere-pri-pomoshhi-tshark\/\">\u0431\u043b\u043e\u0433<\/a>.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/selectel\/blog\/233837\/\"> http:\/\/habrahabr.ru\/company\/selectel\/blog\/233837\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/23c\/c61\/74d\/23cc6174d2cc5cbb170f1eacb63a8b6c.png\" alt=\"tshark\"\/><\/p>\n<p>  \u0412&nbsp;\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f c\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e&nbsp;\u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u0432&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435&nbsp;\u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0438&nbsp;\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, netstat), \u043d\u0438&nbsp;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430&nbsp;\u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 ICMP (ping, traceroute \u0438&nbsp;\u0434\u0440\u0443\u0433\u0438\u0435). \u0412&nbsp;\u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0434\u0430\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u00ab\u0441\u043b\u0443\u0448\u0430\u0442\u044c\u00bb \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0438&nbsp;\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430&nbsp;\u0443\u0440\u043e\u0432\u043d\u0435 \u0435\u0434\u0438\u043d\u0438\u0446 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432. \u041e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0430&nbsp;\u043d\u0430&nbsp;\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0436\u0430\u0440\u0433\u043e\u043d\u0435&nbsp;&mdash; \u0441\u043d\u0438\u0444\u0444\u0435\u0440\u0430\u043c\u0438. \u0421&nbsp;\u0438\u0445&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438&nbsp;\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u0438\u0445&nbsp;\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430&nbsp;\u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445&nbsp;&mdash; \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u0437\u0438\u0442\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0438&nbsp;\u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0432&nbsp;\u0441\u0435\u0442\u0438 \u0437\u043b\u043e\u0432\u0440\u0435\u0434\u043d\u043e\u0435 \u041f\u041e.<\/p>\n<p>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432&nbsp;\u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0435&nbsp;\u041f\u041e \u043f\u043b\u043e\u0445\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-233837","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/233837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=233837"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/233837\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=233837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=233837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}