Heim  >  Artikel  >  Betrieb und Instandhaltung  >  Was ist nc unter Centos?

Was ist nc unter Centos?

WBOY
WBOYOriginal
2022-03-23 18:44:253746Durchsuche

nc unter Centos ist die Abkürzung für „netcat“. Es handelt sich um ein Netzwerktool, das zum Port-Scannen, zur Dateiübertragung usw. verwendet werden kann. nc kann auch das Abhören aller TCP- und UDP-Ports implementieren -y“-Befehl zum Installieren.

Was ist nc unter Centos?

Die Betriebsumgebung dieses Artikels: Centos 7-System, Dell G3-Computer.

Was ist NC unter Centos?

NC ist die Abkürzung für Netcat Tool, ein Netzwerktool, das zum Port-Scannen, zur Dateiübertragung und für andere Funktionen verwendet werden kann.

Die Installation auf Centos ist ebenfalls sehr einfach:

yum install nc -y

nc allgemeine Funktionen

  • Realisieren Sie das Abhören an jedem TCP/UDP-Port, nc kann als Server verwendet werden, um den angegebenen Port in TCP oder UDP abzuhören Modus

  • Für das Port-Scannen kann nc als Client verwendet werden, um TCP- oder UDP-Verbindungen zu initiieren.

  • Dateien zwischen Maschinen übertragen Testen von TCP/UDP-Protokollen und anderen Verwenden Sie weniger Funktionen!

  • nc-Hilfeanweisungen
  • # nc --help 
    Ncat 7.50 ( https://nmap.org/ncat )
    Usage: ncat [options] [hostname] [port]
    Options taking a time assume seconds. Append 'ms' for milliseconds,
    's' for seconds, 'm' for minutes, or 'h' for hours (e.g. 500ms).
      -4                         Use IPv4 only
      -6                         Use IPv6 only
      -U, --unixsock             Use Unix domain sockets only
      -C, --crlf                 Use CRLF for EOL sequence
      -c, --sh-exec <command>    Executes the given command via /bin/sh
      -e, --exec <command>       Executes the given command
          --lua-exec <filename>  Executes the given Lua script
      -g hop1[,hop2,...]         Loose source routing hop points (8 max)
      -G <n>                     Loose source routing hop pointer (4, 8, 12, ...)
      -m, --max-conns <n>        Maximum <n> simultaneous connections
      -h, --help                 Display this help screen
      -d, --delay <time>         Wait between read/writes
      -o, --output <filename>    Dump session data to a file
      -x, --hex-dump <filename>  Dump session data as hex to a file
      -i, --idle-timeout <time>  Idle read/write timeout
      -p, --source-port port     Specify source port to use
      -s, --source addr          Specify source address to use (doesn&#39;t affect -l)
      -l, --listen               Bind and listen for incoming connections
      -k, --keep-open            Accept multiple connections in listen mode
      -n, --nodns                Do not resolve hostnames via DNS
      -t, --telnet               Answer Telnet negotiations
      -u, --udp                  Use UDP instead of default TCP
          --sctp                 Use SCTP instead of default TCP
      -v, --verbose              Set verbosity level (can be used several times)
      -w, --wait <time>          Connect timeout
      -z                         Zero-I/O mode, report connection status only
          --append-output        Append rather than clobber specified output files
          --send-only            Only send data, ignoring received; quit on EOF
          --recv-only            Only receive data, never send anything
          --allow                Allow only given hosts to connect to Ncat
          --allowfile            A file of hosts allowed to connect to Ncat
          --deny                 Deny given hosts from connecting to Ncat
          --denyfile             A file of hosts denied from connecting to Ncat
          --broker               Enable Ncat&#39;s connection brokering mode
          --chat                 Start a simple Ncat chat server
          --proxy <addr[:port]>  Specify address of host to proxy through
          --proxy-type <type>    Specify proxy type ("http" or "socks4" or "socks5")
          --proxy-auth <auth>    Authenticate with HTTP or SOCKS proxy server
          --ssl                  Connect or listen with SSL
          --ssl-cert             Specify SSL certificate file (PEM) for listening
          --ssl-key              Specify SSL private key (PEM) for listening
          --ssl-verify           Verify trust and domain name of certificates
          --ssl-trustfile        PEM file containing trusted SSL certificates
          --ssl-ciphers          Cipherlist containing SSL ciphers to use
          --version              Display Ncat&#39;s version information and exit

  • nc-häufige Fälle

TCP-Hörtestnc kann als serverseitige 192.168.10.11 verwendet werden, um eine TCP-Überwachung zu starten

Client-Testmethode: direkt Telnet die Maschinen-IP + Port

telnet 192.168.10.11 80oder: nmap 192.168.10.11 -p 80

UDP-Hörtest

nc startet eine UDP-Überwachung als Serverseite

nc -l 80

Du kannst sehen udp über netstat Das Protokoll wurde überwacht:

nc -lu 80
Empfohlenes Tutorial: „Centos-Tutorial

Das obige ist der detaillierte Inhalt vonWas ist nc unter Centos?. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn