Someone who must be in touch with Linux server programming has used a powerful and concise command NC that has a reputation as a Swiss army knife. We can use NC to build the server can also be used as a client, and we can use its various parameters to precisely control some of the transmission and connection details, so that it becomes extremely powerful.
Parameters of the NC command
parameter |
effect |
-i |
when setting datagram delivery Interval |
-L |
Run as server |
-K |
repeatedly receives and processes all connections on a port and must be The-l option uses |
-n |
to represent the host with an IP address instead of a hostname; Use a number to indicate a port instead of a service name |
-p |
when the NC command is run as a client, force it to use the port number |
-S |
set the IP address of the datagram sent by the local host |
-C |
takes CR and LF two characters as line Terminator |
-U |
using UNIX local domain protocol |
-u |
using UDP protocol, default is TCP protocol |
-W |
if the NC client does not detect any input within the specified event, exit |
-X |
when the NC client and the proxy server communicate, this option specifies the communication protocol between them |
-X |
Specifies the IP address and port number of the target proxy server |
-Z |
scan for some or some of the services on the target machine is turned on |
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Detailed parameters of NC under Linux