{"id":5535,"date":"2020-05-25T17:45:30","date_gmt":"2020-05-25T09:45:30","guid":{"rendered":"https:\/\/www.ldhost.cn\/jc\/?p=5535"},"modified":"2020-05-25T20:58:50","modified_gmt":"2020-05-25T12:58:50","slug":"%e4%bd%bf%e7%94%a8wireshark%e5%92%8ctcpdump%e8%bf%9b%e8%a1%8c%e8%bf%9c%e7%a8%8b%e6%95%b0%e6%8d%ae%e5%8c%85%e6%8d%95%e8%8e%b7-pcap%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/www.ldhost.cn\/jc\/ot\/5535.html","title":{"rendered":"\u4f7f\u7528WireShark\u548ctcpdump\u8fdb\u884c\u8fdc\u7a0b\u6570\u636e\u5305\u6355\u83b7.pcap\u6587\u4ef6"},"content":{"rendered":"\n<p>\u5b89\u88c5tcpdump\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@ok Desktop]# yum install wireshark* -y\n[root@ok Desktop]# which wireshark \n\/usr\/sbin\/wireshark\n[root@ok Desktop]# rpm -qa|grep wireshark\nwireshark-devel-1.8.10-17.el6.x86_64\nwireshark-1.8.10-17.el6.x86_64\nwireshark-gnome-1.8.10-17.el6.x86_64\n\n\u4f7f\u7528\u5e76\u4fdd\u5b58tcpdump\u6293\u5305\u7ed3\u679c\uff0c.pcap\u6587\u4ef6\u4fdd\u5b58\u5728root\u76ee\u5f55\u91cc\uff1a\n\n[root@bass Desktop]# tcpdump -i eth0 -w dump.pcap -i #\u662f\u6307\u5b9a\u8981\u6293\u53d6\u7684\u7f51\u5361 -w #\u6307\u5b9a\u7ed3\u679c\u4fdd\u5b58\u7684\u4f4d\u7f6e [root@bass Desktop]# tcpdump -i eth0 -w dump.pcap -v tcpdump: WARNING: eth0: no IPv4 address assigned tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes ^C189 packets captured 189 packets received by filter 0 packets dropped by kernel \uff0dv\uff03\u4e3b\u8981\u662f\u4e3a\u4e86\u5f97\u5230Got 15\u8fd9\u4e2a\u6570\uff0c\u5f53\u60f3\u8981\u505c\u6b62\u7684\u65f6\u5019\uff0c\u6309\u4e0bctrl + c [root@bass Desktop]# ll -h dump.pcap -rw-r--r--. 1 tcpdump tcpdump 18K Aug 30 13:19 dump.pcap\n\u901a\u8fc7winSCP\u8f6f\u4ef6\u53ef\u4e0b\u8f7d.pcap\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u5c06\u4f7f\u7528wireshark\u6253\u5f00\u3002\nwireshark\u5b98\u7f51\u4e0b\u8f7d\u5730\u5740\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.wireshark.org\/download.html\" target=\"_blank\">https:\/\/www.wireshark.org\/download.html<\/a>\n\n\u6216\n\u5b89\u88c5tcpdump\uff1ayun install tcpdump<\/pre>\n\n\n\n<p>\u4f7f\u7528<strong><em>tcpdump<\/em><\/strong>\u521b\u5efapcap\u6587\u4ef6\u65f6\uff0c\u5b83\u5c06\u622a\u65ad\u6355\u83b7\u6587\u4ef6\u4ee5\u7f29\u77ed\u8be5\u6587\u4ef6\uff0c\u60a8\u53ef\u80fd\u65e0\u6cd5\u7406\u89e3\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u8f6c\u50a8\u6355\u83b7\u5230\u6587\u4ef6\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>tcpdump -s 0 port ftp or ssh -i eth0 -w mycap.pcap<\/strong><\/pre>\n\n\n\n<p>\u5728\u4e0a\u9762\u7684\u547d\u4ee4\u4e2d<\/p>\n\n\n\n<p>-s 0\u4f1a\u5c06\u6355\u83b7\u5b57\u8282\u8bbe\u7f6e\u4e3a\u6700\u5927\uff0c\u537365535\uff0c\u6b64\u6355\u83b7\u6587\u4ef6\u5c06\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002<\/p>\n\n\n\n<p>-i eth0\u7528\u4e8e\u63d0\u4f9b\u8981\u6355\u83b7\u7684\u4ee5\u592a\u7f51\u63a5\u53e3\u3002 \u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u5219\u9ed8\u8ba4\u503c\u4e3aeth0\u3002<\/p>\n\n\n\n<p>\u7aef\u53e3ftp\u6216ssh\u662f\u8fc7\u6ee4\u5668\uff0c\u5b83\u5c06\u4ec5\u6355\u83b7ftp\u548cssh\u6570\u636e\u5305\u3002 \u60a8\u53ef\u4ee5\u5220\u9664\u5b83\u4ee5\u6355\u83b7\u6240\u6709\u6570\u636e\u5305\u3002<\/p>\n\n\n\n<p>-w mypcap.pcap\u5c06\u521b\u5efa\u8be5pcap\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u5c06\u4f7f\u7528wireshark\u6253\u5f00\u3002<\/p>\n<div><img decoding=\"async\" src=\"https:\/\/www.ldhost.cn\/images\/ad-845-3.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\" \/><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5tcpdump\u547d\u4ee4\uff1a [root@ok Desktop]# yum install wireshark* -y [root@ok Desktop]# which wireshark \/usr\/sbin\/wireshark [root@ok Desktop]# rpm -qa|grep wireshark wireshark-devel-1.8.10-17.el6.x86_64 wireshark-1.8.10-17.el6.x86_64 wireshark-gnome-1.8.10-17.el6.x86_64 \u4f7f\u7528\u5e76\u4fdd\u5b58tcpdump\u6293\u5305\u7ed3\u679c\uff0c.pcap\u6587\u4ef6\u4fdd\u5b58\u5728root\u76ee\u5f55\u91cc\uff1a [roo&#8230; <a href=\"https:\/\/www.ldhost.cn\/jc\/ot\/5535.html\" class=\"readmore\">\u9605\u8bfb\u5168\u6587<span class=\"screen-reader-text\">\u4f7f\u7528WireShark\u548ctcpdump\u8fdb\u884c\u8fdc\u7a0b\u6570\u636e\u5305\u6355\u83b7.pcap\u6587\u4ef6<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-5535","post","type-post","status-publish","format-standard","hentry","category-ot","content-layout-excerpt-thumb"],"_links":{"self":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/5535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/comments?post=5535"}],"version-history":[{"count":8,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/5535\/revisions"}],"predecessor-version":[{"id":5545,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/5535\/revisions\/5545"}],"wp:attachment":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/media?parent=5535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/categories?post=5535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/tags?post=5535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}