{"id":61937,"date":"2023-11-01T21:12:44","date_gmt":"2023-11-01T13:12:44","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=61937"},"modified":"2023-11-01T21:12:44","modified_gmt":"2023-11-01T13:12:44","slug":"sybtgdkzbml","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/61937.html","title":{"rendered":"\u4f7f\u7528bat\u901a\u8fc7\u7aef\u53e3\u6293\u5305\u547d\u4ee4"},"content":{"rendered":"

  BAT\uff08Batch\uff09\u662f\u4e00\u79cd\u7b80\u5355\u7684\u6279\u5904\u7406\u8bed\u8a00\uff0c\u5b83\u53ef\u4ee5\u8ba9\u7528\u6237\u5728Windows\u7cfb\u7edf\u4e2d\u6267\u884c\u4e00\u7cfb\u5217\u7684\u547d\u4ee4\uff0c\u4ece\u800c\u5b9e\u73b0\u4e00\u4e9b\u7b80\u5355\u7684\u4efb\u52a1\u81ea\u52a8\u5316\u3002\u4f7f\u7528BAT\u901a\u8fc7\u7aef\u53e3\u6293\u5305\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u5728Windows\u7cfb\u7edf\u4e2d\u901a\u8fc7\u7aef\u53e3\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\uff0c\u4ece\u800c\u5b9e\u73b0\u7f51\u7edc\u6570\u636e\u5305\u7684\u6293\u53d6\u3001\u5206\u6790\u548c\u76d1\u63a7\u3002<\/p>\n

\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305<\/h2>\n

  \u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\u7684\u6b65\u9aa4<\/h3>\n

  \u4f7f\u7528BAT\u901a\u8fc7\u7aef\u53e3\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\uff0c\u9700\u8981\u7ecf\u5386\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n

  \u6b65\u9aa41\uff1a\u5b89\u88c5\u7f51\u7edc\u6293\u53d6\u5de5\u5177<\/strong><\/p>\n

  \u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u7f51\u7edc\u6293\u53d6\u5de5\u5177\uff0c\u5982Wireshark\uff0c\u4ee5\u4fbf\u80fd\u591f\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\u3002<\/p>\n

  \u6b65\u9aa42\uff1a\u8bbe\u7f6e\u7f51\u7edc\u6293\u53d6\u5de5\u5177<\/strong><\/p>\n

  \u5176\u6b21\uff0c\u9700\u8981\u8bbe\u7f6e\u7f51\u7edc\u6293\u53d6\u5de5\u5177\uff0c\u4ee5\u4fbf\u80fd\u591f\u6293\u53d6\u6307\u5b9a\u7aef\u53e3\u7684\u7f51\u7edc\u6570\u636e\u5305\u3002<\/p>\n

  \u6b65\u9aa43\uff1a\u8fd0\u884cbat\u6587\u4ef6<\/strong><\/p>\n

  \u6700\u540e\uff0c\u9700\u8981\u8fd0\u884cbat\u6587\u4ef6\uff0c\u4ee5\u4fbf\u80fd\u591f\u4ece\u6307\u5b9a\u7aef\u53e3\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\u3002<\/p>\n

  \u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\u7684\u8bed\u6cd5<\/h3>\n

  \u4f7f\u7528BAT\u901a\u8fc7\u7aef\u53e3\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\uff0c\u9700\u8981\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\uff1a<\/p>\n

  \u8bed\u6cd51\uff1a\u6293\u53d6\u6307\u5b9a\u7aef\u53e3\u7684\u7f51\u7edc\u6570\u636e\u5305<\/strong><\/p>\n

  @echo off<\/p>\n

tshark -i <\u7f51\u7edc\u63a5\u53e3> -f “tcp port <\u7aef\u53e3\u53f7>” -w <\u6587\u4ef6\u540d>.pcap   \u8bed\u6cd52\uff1a\u6293\u53d6\u6307\u5b9aIP\u5730\u5740\u7684\u7f51\u7edc\u6570\u636e\u5305<\/strong><\/p>\n

  @echo off<\/p>\n

tshark -i <\u7f51\u7edc\u63a5\u53e3> -f “host ” -w <\u6587\u4ef6\u540d>.pcap <\/p>\n

\u603b\u7ed3<\/h2>\n

  \u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u4e86\u89e3\u5230\uff0c\u4f7f\u7528BAT\u901a\u8fc7\u7aef\u53e3\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\uff0c\u9700\u8981\u5b89\u88c5\u7f51\u7edc\u6293\u53d6\u5de5\u5177\uff0c\u8bbe\u7f6e\u7f51\u7edc\u6293\u53d6\u5de5\u5177\uff0c\u5e76\u4f7f\u7528\u7279\u5b9a\u7684\u8bed\u6cd5\u8fd0\u884cbat\u6587\u4ef6\uff0c\u4ee5\u4fbf\u80fd\u591f\u4ece\u6307\u5b9a\u7aef\u53e3\u6293\u53d6\u7f51\u7edc\u6570\u636e\u5305\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

BAT\uff08Batch\uff09\u662f\u4e00\u79cd\u7b80\u5355\u7684\u6279\u5904\u7406\u8bed\u8a00\uff0c\u5b83\u53ef\u4ee5\u8ba9\u7528\u6237\u5728Windows\u7cfb\u7edf\u4e2d\u6267\u884c\u4e00\u7cfb\u5217\u7684\u547d\u4ee4\uff0c\u4ece\u800c\u5b9e\u73b0\u4e00\u4e9b\u7b80\u5355\u7684\u4efb\u52a1\u81ea\u52a8\u5316\u3002\u4f7f\u7528BAT\u901a\u8fc7\u7aef\u53e3\u6293\u5305\uff0c\u53ef\u4ee5\u8ba9\u7528<\/p>\n","protected":false},"author":1,"featured_media":1839,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[45],"class_list":["post-61937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-txxt"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/61937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=61937"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/61937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/1839"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=61937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=61937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=61937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}