みんなだいすきnetcatをWindowsに入れる方法です。
最近、開発PCがWindows系に移行してるので……。
せっかくなので、chocolatey経由で入れますが、
以前紹介したときとChocolateyの導入手順が変わってたのであわせてその手順も。
shuzo-kino.hateblo.jp
実際のところ
chocolaty
管理者権限でPowerShellを実行し、以下のコマンドをコピペ。
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
> choco Chocolatey v0.10.15 Please run 'choco -?' or 'choco <command> -?' for help menu.
netcat
> choco install netcat
試しに導入できたかヘルプオプションでみてみます。
……ん?? -eがデフォで有効!?!?
> nc -h [v1.12 NT http://eternallybored.org/misc/netcat/] connect to somewhere: nc [-options] hostname port[s] [ports] ... listen for inbound: nc -l -p port [options] [hostname] [port] options: -d detach from console, background mode -e prog inbound program to exec [dangerous!!] -g gateway source-routing hop point[s], up to 8 -G num source-routing pointer: 4, 8, 12, ... -h this cruft -i secs delay interval for lines sent, ports scanned -l listen mode, for inbound connects -L listen harder, re-listen on socket close -n numeric-only IP addresses, no DNS -o file hex dump of traffic -p port local port number -r randomize local and remote ports -s addr local source address -t answer TELNET negotiation -c send CRLF instead of just LF -u UDP mode -v verbose [use twice to be more verbose] -w secs timeout for connects and final net reads -z zero-I/O mode [used for scanning] port numbers can be individual or ranges: m-n [inclusive]