LoginSignup
1
0

More than 5 years have passed since last update.

Macでwhoisが文字化けないようにする

Posted at

nkfコマンドを使います。
$ brew install nkf

ふつうにwhoisすると

log
$ whois -h whois.nic.ad.jp 182.22.59.229
[ JPNIC database provides information regarding IP address and ASN. Its use   ]
[ is restricted to network administration purposes. For further information,  ]
[ use 'whois -h whois.nic.ad.jp help'. To only display English output,        ]
[ add '/e' at the end of command, e.g. 'whois -h whois.nic.ad.jp xxx/e'.      ]

Network Information: [B%M%C%H%o!<%/>pJs]
a. [IPB%M%C%H%o!<%/%"%I%l%9]     182.22.0.0/17
b. [B%M%C%H%o!<%/L>]             YAHOO-NET
f. [BAH?%L>]                     B%d%U!<3t<02q<R
g. [Organization]               Yahoo Japan Corporation
m. [B4IM}<TO"MmAk8}]             JP00032461
n. [B5;=QO"MmC4Ev<T]             JP00032461
p. [B%M!<%`%5!<%P]               ns01.yahoo.co.jp
p. [B%M!<%`%5!<%P]               ns02.yahoo.co.jp
p. [B%M!<%`%5!<%P]               ns11.yahoo.co.jp
p. [B%M!<%`%5!<%P]               ns12.yahoo.co.jp
[B3dEvG/7nF|]                    2010/06/03
[BJV5QG/7nF|]
[B:G=*99?7]                      2011/09/26 15:59:02(JST)

B>e0L>pJs
----------
B%d%U!<3t<02q<R (Yahoo Japan Corporation)
                     [B3d$j?6$j]                                  182.22.0.0/17

B2<0L>pJs
----------
B3:Ev$9$k%G!<%?$,$"$j$^$;$s!#

nkfコマンドを使うと

log
$ whois -h whois.nic.ad.jp 182.22.59.229 | nkf -w
[ JPNIC database provides information regarding IP address and ASN. Its use   ]
[ is restricted to network administration purposes. For further information,  ]
[ use 'whois -h whois.nic.ad.jp help'. To only display English output,        ]
[ add '/e' at the end of command, e.g. 'whois -h whois.nic.ad.jp xxx/e'.      ]

Network Information: [ネットワーク情報]
a. [IPネットワークアドレス]     182.22.0.0/17
b. [ネットワーク名]             YAHOO-NET
f. [組織名]                     ヤフー株式会社
g. [Organization]               Yahoo Japan Corporation
m. [管理者連絡窓口]             JP00032461
n. [技術連絡担当者]             JP00032461
p. [ネームサーバ]               ns01.yahoo.co.jp
p. [ネームサーバ]               ns02.yahoo.co.jp
p. [ネームサーバ]               ns11.yahoo.co.jp
p. [ネームサーバ]               ns12.yahoo.co.jp
[割当年月日]                    2010/06/03
[返却年月日]
[最終更新]                      2011/09/26 15:59:02(JST)

上位情報
----------
ヤフー株式会社 (Yahoo Japan Corporation)
                     [割り振り]                                  182.22.0.0/17

下位情報
----------
該当するデータがありません。
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0