{"id":44416,"date":"2023-10-01T09:44:55","date_gmt":"2023-10-01T01:44:55","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=44416"},"modified":"2023-10-01T09:51:42","modified_gmt":"2023-10-01T01:51:42","slug":"sycjstsj-2","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/44416.html","title":{"rendered":"\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e"},"content":{"rendered":"
\u5728\u73b0\u4ee3\u7684\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u6280\u672f\u3002\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u83b7\u53d6\u7f51\u7edc\u4e0a\u7684\u6570\u636e\uff0c\u4ee5\u4fbf\u6211\u4eec\u80fd\u591f\u66f4\u597d\u5730\u5206\u6790\u548c\u5904\u7406\u8fd9\u4e9b\u6570\u636e\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u5982\u4f55\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\uff0c\u4ee5\u53ca\u5b83\u7684\u4e00\u4e9b\u4f18\u70b9\u548c\u7f3a\u70b9\u3002<\/p>\n
CMD\uff0c\u5168\u79f0Command Line Interface\uff0c\u662f\u4e00\u79cd\u6587\u672c\u754c\u9762\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b83\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6765\u63a7\u5236\u8ba1\u7b97\u673a\u3002\u5b83\u662f\u4e00\u79cd\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u6267\u884c\u5404\u79cd\u64cd\u4f5c\uff0c\u5305\u62ec\u63a5\u6536TCP\u6570\u636e\u3002<\/p>\n
\u8981\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\uff0c\u9996\u5148\u9700\u8981\u521b\u5efa\u4e00\u4e2aTCP\u8fde\u63a5\uff0c\u7136\u540e\u4f7f\u7528CMD\u547d\u4ee4\u884c\u5de5\u5177\u63a5\u6536\u6570\u636e\u3002\u4e3a\u4e86\u521b\u5efa\u4e00\u4e2aTCP\u8fde\u63a5\uff0c\u9700\u8981\u4f7f\u7528netcat\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u521b\u5efa\u4e00\u4e2aTCP\u8fde\u63a5\uff0c\u5e76\u4f7f\u7528CMD\u547d\u4ee4\u884c\u6765\u63a5\u6536\u6570\u636e\u3002<\/p>\n
\u9996\u5148\uff0c\u9700\u8981\u4f7f\u7528netcat\u5de5\u5177\u6765\u521b\u5efa\u4e00\u4e2aTCP\u8fde\u63a5\uff0c\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b8c\u6210\uff1a<\/p>\n
nc -l -p [port]<\/p><\/pre>\n
\u5176\u4e2d\uff0cport\u662f\u6307\u8981\u8fde\u63a5\u7684\u7aef\u53e3\u53f7\u3002<\/p>\n
\u4f7f\u7528CMD\u547d\u4ee4\u884c\u63a5\u6536\u6570\u636e<\/h3>\n
\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528CMD\u547d\u4ee4\u884c\u5de5\u5177\u6765\u63a5\u6536\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
nc [host] [port]<\/p><\/pre>\n
\u5176\u4e2d\uff0chost\u662f\u6307\u8981\u8fde\u63a5\u7684\u4e3b\u673a\u540d\u6216IP\u5730\u5740\uff0cport\u662f\u6307\u8981\u8fde\u63a5\u7684\u7aef\u53e3\u53f7\u3002<\/p>\n
\u4f18\u70b9\u548c\u7f3a\u70b9<\/h2>\n
\u4f18\u70b9<\/h3>\n
\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\u7684\u6700\u5927\u4f18\u70b9\u662f\u5b83\u53ef\u4ee5\u8ba9\u6211\u4eec\u66f4\u52a0\u7cbe\u786e\u5730\u63a7\u5236\u7f51\u7edc\u8fde\u63a5\uff0c\u4ece\u800c\u83b7\u53d6\u66f4\u52a0\u51c6\u786e\u7684\u6570\u636e\u3002\u6b64\u5916\uff0cCMD\u4e5f\u5177\u6709\u826f\u597d\u7684\u53ef\u79fb\u690d\u6027\uff0c\u53ef\u4ee5\u5728\u591a\u79cd\u5e73\u53f0\u4e0a\u8fd0\u884c\uff0c\u5305\u62ecLinux\u3001macOS\u548cWindows\u3002<\/p>\n
\u7f3a\u70b9<\/h3>\n
\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\u7684\u7f3a\u70b9\u662f\u5b83\u9700\u8981\u8f83\u9ad8\u7684\u6280\u672f\u6c34\u5e73\uff0c\u800c\u4e14\u64cd\u4f5c\u8d77\u6765\u4e5f\u6bd4\u8f83\u7e41\u7410\u3002\u6b64\u5916\uff0c\u7531\u4e8e\u5b83\u662f\u4e00\u79cd\u6587\u672c\u754c\u9762\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u56e0\u6b64\u5728\u63a5\u6536TCP\u6570\u636e\u65f6\uff0c\u5f88\u5bb9\u6613\u51fa\u73b0\u683c\u5f0f\u9519\u8bef\u7684\u60c5\u51b5\u3002<\/p>\n
\u603b\u7ed3<\/h2>\n
\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\uff0c\u4ee5\u53ca\u5b83\u7684\u4f18\u70b9\u548c\u7f3a\u70b9\u3002<\/strong>\u4f7f\u7528CMD\u53ef\u4ee5\u8ba9\u6211\u4eec\u66f4\u52a0\u7cbe\u786e\u5730\u63a7\u5236\u7f51\u7edc\u8fde\u63a5\uff0c\u4ece\u800c\u83b7\u53d6\u66f4\u52a0\u51c6\u786e\u7684\u6570\u636e\uff0c\u4f46\u662f\u5b83\u4e5f\u9700\u8981\u8f83\u9ad8\u7684\u6280\u672f\u6c34\u5e73\uff0c\u800c\u4e14\u64cd\u4f5c\u8d77\u6765\u4e5f\u6bd4\u8f83\u7e41\u7410\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5728\u73b0\u4ee3\u7684\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u4f7f\u7528CMD\u63a5\u6536TCP\u6570\u636e\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u6280\u672f\u3002\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u83b7\u53d6\u7f51\u7edc\u4e0a\u7684\u6570\u636e\uff0c\u4ee5\u4fbf\u6211\u4eec\u80fd\u591f\u66f4\u597d\u5730\u5206\u6790\u548c\u5904\u7406\u8fd9\u4e9b\u6570\u636e\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u5982\u4f55\u4f7f\u7528CMD<\/p>\n","protected":false},"author":1,"featured_media":4132,"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":[161],"class_list":["post-44416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-tcp"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/44416","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=44416"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/44416\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=44416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=44416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=44416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}