Windowsを便利にしよう①:whoisを使おう

セキュリティ

今回は使えると少し便利になるコマンド「whois」をwindowsで動作させるようにします。

まずは質問として皆様、お使いのPCのOS(オペレーティングシステム)は何を使用していますか?

私はwindowsを主に使用しており、検証等をする場合はVMwareに入れたLinux(特にUbuntu)を使用します。

プログラマやWebデザイナーの方々が愛してやまないMacintosh(通称mac)は使用していません。

WindowsとVMのLinuxがあれば、環境自体はなんとでもなるかな~と思っています。

今もそしてこれからもmacを使用することはないというポリシーみたいなのを持っています。(特に深い意味はないんです。)

なので、既存のwindows環境をカスタムし、自分の使いやすくしていくことを紹介していきます。

whoisについて

最近、ログのアクセス解析やブログのアクセス元を調べる際にwhoisを多用しています。

whoisってな~に?という方のために説明を以下に記載します。

WHOIS(フーイズ)とは、インターネット上でのドメイン名・IPアドレス・Autonomous System (AS) 番号の所有者を検索するためのプロトコルである。データベース検索を用い、TCPベースでクエリ(質問)・レスポンス(応答)を行う。
ウィキペディア(https://ja.wikipedia.org/wiki/WHOIS)より引用

Ùbuntuはデフォルトで動作しますが、なんと驚くことにwindowsはデフォルト設定では使えないんです!

google等で「whois」と検索するとwhois機能を提供しているサービスはありますが、レスポンスが遅かったりして使いにくいので、自分の環境で作ってしまった方が早いです。

設定自体は簡単なので、サクッと設定してwindows環境を使いやすくしていきましょう!

whoisを使えるようにしよう!

まずはMicrosoftの以下のページに行き、「whoisのダウンロード」をクリックしダウンロードします。

technet:Whois

赤枠の個所からダウンロードを行います。

ダウンロードしたファイルはZIP形式なので、それを解凍すると以下のような感じになっているかと思います。

その中の「whois.exe」というファイルを「C:\Windows」に置きましょう。

置く際に以下のメッセージが表示され、管理権限がない場合は管理者の人に頼むようにしましょう。

管理者に頼むのが面倒くさい人はダウンロードしたファイルからコマンドプロンプトを起動させ、直接実行すればできるようになりますが、「C:\Windows」に入れておいた方が便利です。

さて本当にできるようになったか確認しましょう。

「Windows」ボタンと「r」ボタンを同時に押し、以下のとおり「cmd」と入力しOKボタンを押すとコマンドプロンプトが起動します。

コマンドプロンプト上で「whois nekotosec.com」と以下のとおりに結果が表示されます。

なお、初回時にライセンス条項が表示されますが、慌てずに「Agree」ボタンを押します。(初回のみです。)

>whois nekotosec.com

Whois v1.20 - Domain information lookup
Copyright (C) 2005-2017 Mark Russinovich
Sysinternals - www.sysinternals.com

Connecting to COM.whois-servers.net...

WHOIS Server: whois.star-domain.jp
Registrar URL: http://www.netowl.jp
Updated Date: 2018-06-09T09:35:47Z
Creation Date: 2018-06-09T09:35:46Z
Registry Expiry Date: 2019-06-09T09:35:46Z
Registrar: Netowl, Inc.
Registrar IANA ID: 1557
Registrar Abuse Contact Email: registrar-abuse@netowl.jp
Registrar Abuse Contact Phone: +81.662928811
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Name Server: NS1.XSERVER.JP
Name Server: NS2.XSERVER.JP
Name Server: NS3.XSERVER.JP
Name Server: NS4.XSERVER.JP
Name Server: NS5.XSERVER.JP
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2018-07-16T22:58:04Z <<<

For more information on Whois status codes, please visit https://icann.org/epp

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.

Connecting to whois.star-domain.jp...

WHOIS Server: whois.star-domain.jp
Registrar URL: www.star-domain.jp
Updated Date: 2018-06-09T09:35:47Z
Creation Date: 2018-06-09T09:35:46Z
Registrar Registration Expiration Date: 2019-06-09T09:35:46Z
Registrar: Netowl, Inc.
Registrar IANA ID: 1557
Registrar Abuse Contact Email: registrar-abuse@netowl.jp
Registrar Abuse Contact Phone: +81.662928811
Domain Status: clientTransferProhibited - https://www.icann.org/epp#clientTransferProhibited
Registry Registrant ID: P-1440469097
Registrant Name: Xserver XSERVER Inc.
Registrant Organization: XSERVER Inc.
Registrant Street: GRAND FRONT OSAKA TOWER A 32F
Registrant Street: 4-20 Ofukacho, Kita-ku
Registrant City: Osaka
Registrant State/Province: Osaka
Registrant Postal Code: 5300011
Registrant Country: JP
Registrant Phone: +81.662928811
Registrant Phone Ext:
Registrant Fax:
Registrant Fax Ext:
Registrant Email: info@xserver.co.jp
Registry Admin ID: P-1440469097
Admin Name: Xserver XSERVER Inc.
Admin Organization: XSERVER Inc.
Admin Street: GRAND FRONT OSAKA TOWER A 32F
Admin Street: 4-20 Ofukacho, Kita-ku
Admin City: Osaka
Admin State/Province: Osaka
Admin Postal Code: 5300011
Admin Country: JP
Admin Phone: +81.662928811
Admin Phone Ext:
Admin Fax:
Admin Fax Ext:
Admin Email: info@xserver.co.jp
Registry Tech ID: P-1440469097
Tech Name: Xserver XSERVER Inc.
Tech Organization: XSERVER Inc.
Tech Street: GRAND FRONT OSAKA TOWER A 32F
Tech Street: 4-20 Ofukacho, Kita-ku
Tech City: Osaka
Tech State/Province: Osaka
Tech Postal Code: 5300011
Tech Country: JP
Tech Phone: +81.662928811
Tech Phone Ext:
Tech Fax:
Tech Fax Ext:
Tech Email: info@xserver.co.jp
Name Server: ns1.xserver.jp
Name Server: ns2.xserver.jp
Name Server: ns3.xserver.jp
Name Server: ns4.xserver.jp
Name Server: ns5.xserver.jp
DNSSEC: Unsigned
(後略)

これで「whois」コマンドがwindowsで使用できるようになりました。

これなら、わざわざインターネット上のサービスを使用しなくても、自分のPCで作業を進めることができますね。

今後もwindowsを便利にする機能を紹介していきたいと思います。

こんなことできないの?こうゆうことやってみたい等ありましたら、聞いてください。
※わかる範囲・調べて出来る範囲でお答えします。

質問や不明点等あれば、コメントやツイッター等でご連絡頂ければ幸いです。

コメント