English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux nc命令

Linux Command大全

Linux nc命令用于设置路由器。

执行本指令可设置路由器的相关参数。

语法

nc [-hlnruz][-g<网关...>][-G<指向器数目>][-i<延迟秒数>][-o<输出文件>][-p<通信端口>][-s<来源位址>][-v...][-w<超时秒数>][主机名称][通信端口...]

Parameter Description:

  • -g<gateway> Set the routing gateway, up to8pieces.
  • -G<pointer number> Set the source route pointer, the value is4multiple.
  • -h Online help.
  • -i<delay seconds> Set the time interval to send information and scan communication ports.
  • -l Use listening mode to control incoming data.
  • -n Directly use IP address, without going through the DNS server.
  • -o<output file> Specify the file name, and save the data transmitted in16Binary code dump to save the file.
  • -p<communication port> Set the communication port used by the local host.
  • -r Randomly specify the communication ports of the local and remote hosts.
  • -s<source address> Set the IP address of the local host sending the packet.
  • -u Use UDP transmission protocol.
  • -v Display the execution process of the command.
  • -w<timeout seconds> Set the waiting time for connection.
  • -z Use 0 input/Output Mode, used only when scanning communication ports.

Online Examples

TCP Port Scan

# nc -v -z -w2 192.168.0.3 1-100 
192.168.0.3: inverse host lookup failed: Unknown host
(UNKNOWN) [192.168.0.3] 80 (http) open
(UNKNOWN) [192.168.0.3] 23 (telnet) open
(UNKNOWN) [192.168.0.3] 22 (ssh) open

scan192.168.0.3 port range is 1-100

Scan UDP Ports

# nc -u -z -w2 192.168.0.1 1-1000 //scan192.168.0.3 port range is 1-1000

Scan Specific Port

# nc -nvv 192.168.0.1 80 //scan 80 port
(UNKNOWN) [192.168.0.1] 80 (?) open
y  //User Input

Linux Command大全