How to use Linux nc commands

Source: Internet
Author: User
Tags domain name server

Run this command to set vro parameters.

Syntax

Nc [-hlnruz] [-g <gateway...>] [-G <number of pointers>] [-I <delay in seconds>] [-o <output file>] [-p <communication Port>]

[-S <source address>] [-v...] [-w <timeout seconds>] [host name] [communication port...]

Parameter description:

  • -G <Gateway> sets up eight router hop communication gateways.
  • -G <number of pointers> sets the source route indicator, which is a multiple of 4.
  • -H online help.
  • -I <latency in seconds> set the interval to send information and scan the communication port.
  • -L use the listener mode to control incoming data.
  • -N directly uses the IP address instead of the domain name server.
  • -O <output file> specifies the file name, dumping the data that is being transferred in hexadecimal format into this file for storage.
  • -P <communication Port> sets the communication port used by the local host.
  • -R: specifies the communication port between the local host and the remote host.
  • -S <source address> sets the IP address of the data packet sent from the local host.
  • -U uses UDP transmission protocol.
  • -V shows the command execution process.
  • -W <timeout seconds> sets the waiting time.
  • -Z uses the 0 input/output mode and is only used when scanning communication ports.

Instance

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

The port range for scanning 192.168.0.3 is 1-100.

Scan UDP port

# Nc-u-z-w2 192.168.0.1 1-1000 // scan port range of 192.168.0.3 is 1-1000

Scan specified port

# Nc-nvv 192.168.0.1 80 // scan port 80

(UNKNOWN) [192.168.0.1] 80 (?) Open

Y // user input

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.