FreeBSDに係わる構築や維持など

Netcat

Netcat 1.10のインストール

# cd /usr/ports/net/netcat
# make install
# make clean
# rehash
$ nc www.google.co.jp 80
HEAD / HTTP/1.0

HTTP/1.0 302 Found
Location: http://www.google.co.jp/
Cache-Control: private
Set-Cookie: PREF=ID=56646d1e5e0554b4:TM=1151545159:LM=1151545159:S=Qm6utg4tuco-fWS9; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Content-Type: text/html
Server: GWS/2.1
Content-Length: 221
Date: Thu, 29 Jun 2006 01:39:19 GMT
Connection: Keep-Alive
$ cat test
begin
80.136.66.32
210.238.12.34
211.11.155.16
72.14.199.8
end

$ nc whois.cymru.com 43 < ./test
Bulk mode; whois.cymru.com [2006-06-29 01:48:11 +0000]
3320    | 80.136.66.32     | DTAG Deutsche Telekom AG
4716    | 210.238.12.34    | POWEREDCOM KDDI Corporation
4713    | 211.11.155.16    | OCN NTT Communications Corpora
15169   | 72.14.199.8      | GOOGLE - Google Inc.