Ncat on FreeBSD7
提供:MDWiki
目次 |
インストール
Ports を使う。root になって /usr/ports/net/nc に移動し、
# make [...] creating ncat.spec creating config.h ===> Building for nc-1.0.1_1 cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -fno-strict-aliasing -pipe -c ncat.c cc -O2 -fno-strict-aliasing -pipe -o ncat ncat.o
# make install
===> Installing for nc-1.0.1_1
===> Generating temporary packing list
===> Checking if net/nc already installed
/bin/sh ./mkinstalldirs /usr/local/bin
install -s -o root -g wheel -m 555 ncat /usr/local/bin/ncat
make install-man1
/bin/sh ./mkinstalldirs /usr/local/man/man1
install -o root -g wheel -m 444 ./ncat.1 /usr/local/man/man1/ncat.1
===> Compressing manual pages for nc-1.0.1_1
===> Registering installation for nc-1.0.1_1
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/bin/ncat
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
http://www.kyne.com.au/~mark/software/ncat.php
Man ページ: ncat(1)
以下、Mark Pulford さんの man の翻訳とする。
ncat - ネットワーク感知型 cat
書式
ncat -V | -h ncat [ -c | -n | -v | -o ストリーム | -b サイズ ]... ストリーム...
説明
ncat は cat(1) のようにデータのストリームを繋げるが、ストリームとしてはファイルストリームまたは TCP 通信だけに対応する。もしコマンドラインでストリームが与えられなかった場合、ncat は標準入力を読み込み、標準出力へ書き込む。
ストリームを特定するには、以下のとおり幾つかの形式がある。
- ファイル名 または ファイル名:
- コロンを含むファイル名は、ファイル名の最後にコロンを付加してエスケープする必要がある。さもなければ、それは tcp ストリームとして解釈される。特殊なファイル名として "-" があり、これは標準入力または標準出力を特定するために使う。
- ホスト
- ポート番号
- 任意のホスト/ポートへ接続する。リモート側が通信を許可していない場合はコマンドの実行が失敗する。
- :ポート番号
- 指定したポートで通信を待つ。