
netcat
Dubianでは、(別名nc
、)を使用してncat
次のことができます。
michael@pi1:~ $ nc -zv 10.120.11.1 20 21 22 23 24
nc: connect to 10.120.11.1 port 20 (tcp) failed: Connection refused
Connection to 10.120.11.1 21 port [tcp/ftp] succeeded!
Connection to 10.120.11.1 22 port [tcp/ssh] succeeded!
Connection to 10.120.11.1 23 port [tcp/telnet] succeeded!
nc: connect to 10.120.11.1 port 24 (tcp) failed: Connection refused
michael@pi1:~ $
Dubianのman ncは次のように表示されます。
-z Specifies that nc should just scan for listening daemons, without sending any data to them. It is an error to use this option in conjunction with the -l option.
Centos7では元のncがないのでsudo yum install nmap-ncat.x86_64
。
ただし、-z
このフラグはサポートされていません。
[michael@box1 ~]$ nc -zv 10.255.255.1 22
nc: invalid option -- 'z'
Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING.
[michael@box1 ~]$
答え1
はい、また、ncが-zをサポートしていないことがわかりました。なぜ捨てたのか気になります。以前のバージョンのncatをインストールするか、nmapを使用できます。
地図
nmap -sT -p <port>