Команда WHOIS не возвращает полезную информацию?

В настоящее время всякий раз, когда вы используете команду WHOIS, вы не получаете никакой полезной информации. Обычно мне приходится обращаться к Godaddy, Dnsstuff или другим службам, чтобы получить данные. Я понимаю, что причина в основном из-за спама.

Мне просто интересно, как другие службы получают эти данные. Используют ли они другой тип команды WHOIS?


person Cory    schedule 30.03.2011    source источник
comment
Ха-ха .. Я собираюсь списать это на ошибку SO .. В последний раз, когда я смотрел, было 0% - как на этой странице, так и при переходах по клику. Я бы удалил комментарий, но оставлю его на случай, если SO разработчики посмотрят :)   -  person Demian Brecht    schedule 30.03.2011
comment
Я уже ответил на ServerFault serverfault .com/questions/253451/   -  person Simone Carletti    schedule 30.03.2011
comment
Я голосую за то, чтобы закрыть этот вопрос как не относящийся к теме, потому что он не касается программирования, как это определено в справочном центре.   -  person robinCTS    schedule 22.11.2017


Ответы (3)


Bare-naked whois перестал возвращать полные записи, когда Network Solutions перестала быть единственным местом для регистрации доменов. Теперь он больше похож на DNS, где что-то дает вам место для поиска достоверной информации, и вы должны идти туда, если хотите.

А именно:

% whois stackoverflow.com
[Querying whois.verisign-grs.com]
[whois.verisign-grs.com]
   ...
   Domain Name: STACKOVERFLOW.COM
   Registrar: GODADDY.COM, INC.
   Whois Server: whois.godaddy.com
   ...

% whois [email protected]
[Querying whois.godaddy.com]
[whois.godaddy.com]
...
Registrant:
   Stack Overflow Internet Services, Inc.
   1010 Disk Drive
   ...etc...

Другие службы занимаются регистрацией доменов и получают информацию от своих владельцев доменов.

person Blrfl    schedule 30.03.2011
comment
Я получаю сообщение об ошибке: Whois-сервер не известен для такого объекта. - person zylstra; 09.09.2017
comment
@zylstra На этот вопрос ответили шесть лет назад, и в то время он был точным. С тех пор произошли изменения. - person Blrfl; 11.09.2017
comment
@Blrfl Как теперь это сделать по-новому? Я пробовал все ответы здесь, и, похоже, вместо этого дважды запрашивается whois. - person Leggy; 04.10.2017
comment
@Leggy версия whois, используемая в большинстве дистрибутивов Linux, объединяет оба шага в один, поэтому whois stackoverflow.com теперь работает как вы ожидаете. - person Blrfl; 04.10.2017

Вот ответ, который я разместил на ServerFault.


Краткий ответ на ваш вопрос, если вы используете библиотеку whois debian/ubuntu, заключается в использовании

$ whois -h whois.crsnic.net "domain google.com"

Вот длинный ответ.

TLD .COM — это тонкий WHOIS. Когда вы выполняете запрос WHOIS, инструмент WHOIS сначала отправляет запрос WHOIS в Verisign (имя хоста whois.crsnic.net) и извлекает ссылку из ответа.

По умолчанию, когда вы запрашиваете Verisign из домена example.com, Whois выполняет очень широкий поиск строки «example.com» в нескольких различных объектах, включая доменное имя, имя регистратора и серверы имен.

Вы можете уточнить запрос, указав ключевое слово, как описано в документации Verisign. http://registrar.verisign-grs.com/whois/iframe/help.html?ppath=www.verisigninc.com/products-and-services/domain-name-services/whois&

Приведенная выше команда делает именно то, что я объяснил. Вместо google.com он отправляет в Verisign полный запрос «домен google.com». Вы должны явно передать флаг -h, потому что Whois пытается угадать имя хоста для запроса из запроса, но это не удастся, потому что он не распознает запрос «домен google.com» как допустимый домен.

Вот результат команды.

$ whois -h whois.crsnic.net "domain google.com"

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Domain Name: GOOGLE.COM
   Registrar: MARKMONITOR INC.
   Whois Server: whois.markmonitor.com
   Referral URL: http://www.markmonitor.com
   Name Server: NS1.GOOGLE.COM
   Name Server: NS2.GOOGLE.COM
   Name Server: NS3.GOOGLE.COM
   Name Server: NS4.GOOGLE.COM
   Status: clientDeleteProhibited
   Status: clientTransferProhibited
   Status: clientUpdateProhibited
   Status: serverDeleteProhibited
   Status: serverTransferProhibited
   Status: serverUpdateProhibited
   Updated Date: 15-sep-2010
   Creation Date: 15-sep-1997
   Expiration Date: 14-sep-2011

>>> Last update of whois database: Wed, 30 Mar 2011 08:50:16 UTC <<<

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.
person Simone Carletti    schedule 30.03.2011

Хотя новая политика «толстого» WHOIS теперь требует, чтобы все реестры новых gTLD работали с «толстым» реестром, в настоящее время несколько существующих реестров (например, .COM и .NET) еще не перешли на «толстый» WHOIS и по-прежнему используют «тонкий» реестр. – https://whois.icann.org/en/primer

Для .com и .net используйте тонкие результаты реестра от простой команды whois, чтобы найти сервер whois регистратора.

Например,

# whois google.com

   Domain Name: GOOGLE.COM
   Registry Domain ID: 2138514_DOMAIN_COM-VRSN
   Registrar WHOIS Server: whois.markmonitor.com
   Registrar URL: http://www.markmonitor.com
   Updated Date: 2011-07-20T16:55:31Z
   Creation Date: 1997-09-15T04:00:00Z
   Registry Expiry Date: 2020-09-14T04:00:00Z
   Registrar: MarkMonitor Inc.
   Registrar IANA ID: 292
   Registrar Abuse Contact Email: [email protected]
   Registrar Abuse Contact Phone: +1.2083895740
   Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
   Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
   Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
   Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited
   Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited
   Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited
   Name Server: NS1.GOOGLE.COM
   Name Server: NS2.GOOGLE.COM
   Name Server: NS3.GOOGLE.COM
   Name Server: NS4.GOOGLE.COM
   DNSSEC: unsigned
   URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2017-09-12T18:51:08Z <<<

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

Затем запросите подробные результаты у регистратора.

Например,

# whois google.com -h whois.markmonitor.com

Domain Name: google.com
Registry Domain ID: 2138514_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2017-09-07T08:50:36-0700
Creation Date: 1997-09-15T00:00:00-0700
Registrar Registration Expiration Date: 2020-09-13T21:00:00-0700
Registrar: MarkMonitor, Inc.
Registrar IANA ID: 292
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +1.2083895740
Domain Status: clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited)
Domain Status: clientTransferProhibited (https://www.icann.org/epp#clientTransferProhibited)
Domain Status: clientDeleteProhibited (https://www.icann.org/epp#clientDeleteProhibited)
Domain Status: serverUpdateProhibited (https://www.icann.org/epp#serverUpdateProhibited)
Domain Status: serverTransferProhibited (https://www.icann.org/epp#serverTransferProhibited)
Domain Status: serverDeleteProhibited (https://www.icann.org/epp#serverDeleteProhibited)
Registry Registrant ID:
Registrant Name: DNS Admin
Registrant Organization: Google Inc.
Registrant Street: 1600 Amphitheatre Parkway,
Registrant City: Mountain View
Registrant State/Province: CA
...

Мне кажется (хотя сейчас мне не хочется определять историю команд whois), что в какой-то момент команда whois была изменена, чтобы автоматически не запрашивать толстые результаты регистратора из исходного тонкого данные реестра.

person zylstra    schedule 12.09.2017
comment
Что касается вашего последнего предложения, это зависит от того, какой клиент whois вы используете. Существуют различные стратегии, см. unix.stackexchange.com/a/407030/211833. - person Patrick Mevzek; 04.01.2018