目次
centos の nc とは
nc 一般的なケース" >nc 一般的なケース
ホームページ 運用・保守 CentOS centos の nc とは何ですか

centos の nc とは何ですか

Mar 23, 2022 pm 06:44 PM
centos

centos の NC は「netcat」の略称です。これは、ポート スキャン、ファイル転送などに使用できるネットワーク ツールです。nc は、TCP および UDP ポートでのリッスンも実装できます。 「yum install nc -y」コマンドでインストールします。

centos の nc とは何ですか

この記事の動作環境: centos 7 システム、Dell G3 コンピューター。

centos の nc とは

nc は netcat ツールの略称で、ポート スキャン、ファイル転送、その他の機能に使用できるネットワーク ツールです。 。

centos へのインストールも非常に簡単です:

yum install nc -y
ログイン後にコピー

nc よく使用される関数

  • 任意の TCP /UDP ポート リッスンを実現します。nc は、TCP または UDP モードで指定されたポートをリッスンするサーバーとして機能します。

  • ポート スキャン。nc は、TCP を開始するクライアントとして機能します。または UDP 接続

  • マシン間のファイル転送

  • マシン間のネットワーク速度テスト

通常は ncは TCP/UDP プロトコルのポート テストにのみ使用されます。他の機能は控えめに使用する必要があります。

nc ヘルプの説明

# 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'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'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's version information and exit
ログイン後にコピー

nc 一般的なケース

TCP リスニング テスト

nc をサーバー側 192.168.10.11 として使用して、TCP 監視を開始できます

nc -l 80
ログイン後にコピー

クライアント テスト方法: マシンの IP ポート

telnet 192.168 に直接 Telnet します。 10.11 80

または: nmap 192.168.10.11 -p 80

UDP listen test

nc は udp をサーバーの監視

nc -lu 80
ログイン後にコピー

netstat を通じて、udp プロトコルが監視されていることを確認できます:

> # netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address   State  PID/Program name   
udp        0      0 0.0.0.0:80      0.0.0.0:*                15401/nc
ログイン後にコピー

推奨チュートリアル: "centos チュートリアル "

以上がcentos の nc とは何ですかの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットな記事タグ

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

Centosで中国語を入力する方法 Centosで中国語を入力する方法 Apr 07, 2024 pm 08:21 PM

Centosで中国語を入力する方法

CentOS7でUSBディスクファイルを読み取る方法 CentOS7でUSBディスクファイルを読み取る方法 Apr 07, 2024 pm 08:18 PM

CentOS7でUSBディスクファイルを読み取る方法

CentOS7でroot権限を入力する方法 CentOS7でroot権限を入力する方法 Apr 02, 2024 pm 08:57 PM

CentOS7でroot権限を入力する方法

SCP 使用法のヒント - ファイルを再帰的に除外する SCP 使用法のヒント - ファイルを再帰的に除外する Apr 22, 2024 am 09:04 AM

SCP 使用法のヒント - ファイルを再帰的に除外する

centos にログインするためのパスワードを忘れた場合の対処方法 centos にログインするためのパスワードを忘れた場合の対処方法 Apr 07, 2024 pm 07:33 PM

centos にログインするためのパスワードを忘れた場合の対処方法

Centos のユーザー名とパスワードを忘れた場合はどうすればよいですか? Centos のユーザー名とパスワードを忘れた場合はどうすればよいですか? Apr 02, 2024 pm 08:54 PM

Centos のユーザー名とパスワードを忘れた場合はどうすればよいですか?

CentOS7でroot権限を有効にする方法 CentOS7でroot権限を有効にする方法 Apr 07, 2024 pm 08:03 PM

CentOS7でroot権限を有効にする方法

centos7 のパスワードを忘れた場合はどうすればよいですか? centos7 のパスワードを忘れた場合はどうすればよいですか? Apr 02, 2024 pm 08:51 PM

centos7 のパスワードを忘れた場合はどうすればよいですか?

See all articles