In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to use netcat for file transfer. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
First, take a look at the help information.
$nc-hOpenBSD netcat (Debian patchlevel 1.105-7ubuntu1) This is nc from the netcat-openbsd package. An alternative nc is availablein the netcat-traditional package.usage: nc [- 46bCDdhjklnrStUuvZz] [- I length] [- I interval] [- O length] [- P source_port] [- Q seconds] [- s source] [- T toskeyword] [- V rtable] [- w timeout] [- X proxy_protocol] [- x proxy_address [: port]] [destination] [port] Command Summary:- 4 Use IPv4-6 Use IPv6-b Allow broadcast-C Send CRLF as line-ending-D Enable the debug socket option-d Detach from stdin-h This help text-I length TCP receive buffer length-i secs Delay interval for lines sent Ports scanned-j Use jumbo frame-k Keep inbound sockets open for multiple connects-l Listen mode For inbound connects-n Suppress name/port resolutions-O length TCP send buffer length-P proxyuser Username for proxy authentication-p port Specify local port for remote connects-q secs quit after EOF on stdin and delay of secs-r Randomize remote ports-S Enable the TCP MD5 signature option-s addr Local source address-T toskeyword Set IP Type of Service-t Answer TELNET negotiation-U Use UNIX domain socket-u UDP Mode-V rtable Specify alternate routing table-v Verbose-w secs Timeout for connects and final net reads-X proto Proxy protocol: "4" "5" (SOCKS) or "connect"-x addr [: port] Specify proxy address and port-Z DCCP mode-z Zero-I/O mode [used for scanning] Port numbers can be individual or ranges: lo-hi [inclusive]
Port scan:
$nc-z-v-n 127.0.0.1 20-100...Connection to 127.0.0.1 80 port [tcp/*] succeeded.
Simple file transfer:
Client:
$nc-l 192.168.1.11 1234 > passwd.txt &
Server:
$nc 192.168.1.11 1234 < / etc/passwd
Or it could be.
Cat / etc/passwd | nc 192.168.1.11 1234
The server ip is 192.169.1.11 and the port is 1234
In this way, it couldn't be better when two linux machines need to simply transfer files.
This is the end of the article on "how to use netcat for file transfer". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.