`Whois`-Server hinzufügen

`Whois`-Server hinzufügen

Weiß jemand, wie man den whoisBefehl so konfiguriert, dass Whois-Server für den Befehl hinzugefügt werden whois?

Zu Ihrer Information: Es ist nicht whoisdie Version für OSX. Hätte in der Apple-Version gepostet, aber ich dachte, hier hätte ich mehr Erfolg ...

Antwort1

In der Mac OS X- whoisBinärdatei sind zahlreiche Optionen integriert, darunter die -hOption, mit der Sie jeden beliebigen Host als Whois-Server angeben können.

     The whois utility looks up records in the databases maintained by several Network Information Centers (NICs).

 The options are as follows:

 -6      Use the IPv6 Resource Center (6bone) database.  It contains network names and addresses for the IPv6 net-
         work.

 -A      Use the Asia/Pacific Network Information Center (APNIC) database.  It contains network numbers used in
         East Asia, Australia, New Zealand, and the Pacific islands.

 -a      Use the American Registry for Internet Numbers (ARIN) database.  It contains network numbers used in
         those parts of the world covered neither by APNIC nor by RIPE.

         (Hint: All point of contact handles in the ARIN whois database end with "-ARIN".)

 -b      Use the Network Abuse Clearinghouse database.  It contains addresses to which network abuse should be
         reported, indexed by domain name.

 -c country-code
         This is the equivalent of using the -h option with an argument of "country-code.whois-servers.net".

 -d      Use the US Department of Defense database.  It contains points of contact for subdomains of .MIL.

 -g      Use the US non-military federal government database, which contains points of contact for subdomains of
         .GOV.

 -h host
         Use the specified host instead of the default variant.  Either a host name or an IP address may be speci-
         fied.

Sie müssen lediglich wissen, welche Option dem Whois-Server entspricht, nach dem Sie suchen möchten.

Wenn Sie tatsächlich eine Suchoption zu whois hinzufügen möchten, die auf einen neuen Server verweist, benötigen Sie den Quellcode, damit Sie ihn neu kompilieren können. Wenn Sie ausführen strings /usr/bin/whois, werden Sie feststellen, dass die Server, die mit den oben aufgeführten Optionen in Zusammenhang stehen, tatsächlich fest in der Binärdatei codiert sind.

Antwort2

whoiswie im Lieferumfang von OSX enthalten ist -h(wie von Tim gezeigt), gibt es den Schalter an, der den zu verwendenden Host angibt. Soweit mir bekannt ist, gibt es keine Konfigurationsdatei, in der Sie dies dauerhaft festlegen können – die beste Alternative ist wahrscheinlich die Verwendung einer Shell-Funktion ähnlich der folgenden:

whois() { command whois -h whois.example.com "$@" ; }

verwandte Informationen