In Linux, a whois command is used to lookup information about domains or IP addresses.
But if you try to run the whois command on Windows from PowerShell or command prompt (CMD), you will receive one of the errors below:
‘whois’ is not recognized as an internal or external command,
operable program or batch file.
– or –
whois : The term ‘whois’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
This post shows how to install the whois command on Windows and make it available in PowerShell and CMD.
Cool Tip: How to Ping an IPv6 Address in Windows! Read more →
By default, the whois command is not installed on Windows, nevertheless there is no need to search for any equivalents as the whois command can be downloaded and installed from the official Microsoft website.
To install the whois command on Windows, download the WhoIs.zip archive and unzip it.
At this point you can already run the whois command from Powershell or CMD by specifying a path to the executable or by navigating to a folder with the extracted files:
PS C:\> .\Users\UserName\Downloads\WhoIs\whois.exe shellhacks.com
- or -
PS C:\> cd .\Users\UserName\Downloads\WhoIs\
PS C:\Users\UserName\Downloads\WhoIs> .\whois.exe shellhacks.com
To facilitate a usage of the whois command in Powershell and CMD by making it available from any location, you can move the executable file to a folder that is already in %PATH% or add the folder with whois.exe to %PATH%.
Open a user’s home folder by typing %USERPROFILE% in the address bar of a “File Explorer”:
In the user’s home create a bin folder and move the whois.exe there:
Start the environment variables editor – press the ⊞ Win keybutton to open the “Start” menu, type in envi and click on “Edit environment variables for your account”.
The environment variables editor can also be launched with the following command from CMD or PowerShell:
C:\> rundll32 sysdm.cpl,EditEnvironmentVariables
Add the bin folder to a Path environment variable:
After adding to %PATH%, the whois command can be executed in PowerShell or CMD from any location:
C:\> whois - or - PS C:\> whois - sample output - Whois v1.21 - Domain information lookup Copyright (C) 2005-2019 Mark Russinovich Sysinternals - www.sysinternals.com Usage: whois [-v] domainname [whois.server] -v Print whois information for referrals -nobanner Do not display the startup banner and copyright message.
As an alternative to installing the whois command on Windows, you can use any of various WHOIS services online, like https://lookup.icann.org/.
Was it useful? Share this post with the world!
WHOIS is a powerful tool that helps you gather information about registered domain names and IP addresses. It’s widely used by network administrators, webmasters, and cybersecurity specialists to find out who owns a particular domain, the domain’s registration details, the server information, and much more. In this article, we will guide you through the process of using WHOIS directly from the Windows Command Prompt, covering everything from installation to practical examples and advanced usage scenarios.
Understanding WHOIS
WHOIS is a query and response protocol that is used for querying databases that store registered users or assignees of a domain name or an IP address block. WHOIS databases record the information of the owner, along with other details about the domain, such as contact information, registration dates, expiration dates, and name servers.
This information can be invaluable for several reasons:
- Trademarks and Copyrights: If you suspect that a domain name is infringing on your trademark, WHOIS can help you identify the owner.
- Network Issues: If you’re facing network-related problems, WHOIS can provide you with details about who manages the domain or IP in question.
- Cybersecurity: If you’re investigating suspicious domains or the sources of spam emails, WHOIS can provide insight into the ownership and history of those domains.
Installing WHOIS on Windows
Unlike Unix-like systems where WHOIS is typically pre-installed, you’ll likely need to install a WHOIS client on Windows. Here’s how you can get started:
-
Download WHOIS Client:
- You can download various WHOIS clients available online. Some popular options include:
- Sysinternals WHOIS: A lightweight command-line utility from Microsoft that doesn’t require installation.
- Whois Utility: Another popular option that you can find on several software platforms.
- You can download various WHOIS clients available online. Some popular options include:
-
Using Sysinternals WHOIS:
- Download the Sysinternals Suite from the official Microsoft website.
- Unzip the downloaded file to a folder of your choice (e.g.,
C:Sysinternals).
-
Adding to Environment Variables:
- It’s often more convenient to run WHOIS from any command line without changing directories.
- To do this, you need to add the Sysinternals directory to your system’s Path environment variable:
- Right-click on This PC or My Computer, and select Properties.
- Click on Advanced system settings and then on Environment Variables.
- In the System variables section, find the Path variable and select it.
- Click Edit, and add the full path to the Sysinternals folder (e.g.,
C:Sysinternals).
-
Testing Installation:
- Open the Command Prompt by pressing
Win + R, typingcmd, and pressingEnter. - Type
whoisand hit Enter. If installed correctly, you should see the usage instructions.
- Open the Command Prompt by pressing
Basic WHOIS Command Syntax
The general syntax for using the WHOIS command in Windows Command Prompt is straightforward:
whois [options]
Here, ` is the domain you wish to query, and[options]` can include various flags to modify the output or the query behavior.
Performing Basic WHOIS Queries
Now that we have WHOIS installed and ready, let’s dive into performing basic queries:
-
Finding Basic Domain Information:
- To find information about a specific domain, simply type the command and the domain name. For example:
whois example.com - This command will fetch WHOIS information about
example.com, which typically includes:- Registry Domain ID
- Domain Name
- Registry WHOIS Server
- Updated Date
- Creation Date
- Expiration Date
- Name Servers
- To find information about a specific domain, simply type the command and the domain name. For example:
-
Retrieving WHOIS Information for Multiple Domains:
- You can retrieve WHOIS information for multiple domains by providing each domain in a separate query:
whois example1.com whois example2.com whois example3.com - Alternatively, you can use a batch file to streamline this process if you want to query many domains in one go.
- You can retrieve WHOIS information for multiple domains by providing each domain in a separate query:
Advanced WHOIS Query Options
WHOIS clients can support various advanced options to refine your search:
-
Fetching Specific Information:
- Some WHOIS clients allow you to retrieval-specific pieces of information regarding each domain:
whois --info example.com - However, the availability of specific flags may vary based on your WHOIS client.
- Some WHOIS clients allow you to retrieval-specific pieces of information regarding each domain:
-
Using Filters:
- You can use command-line filters to streamline your output and focus on the relevant sections. For instance, to find just the domain expiration date from the output, you can pipe the WHOIS command to find:
whois example.com | find "Expiry Date"
- You can use command-line filters to streamline your output and focus on the relevant sections. For instance, to find just the domain expiration date from the output, you can pipe the WHOIS command to find:
-
Checking Sub Domains:
- WHOIS can also be utilized for subdomains. While registration information can often be less detailed for subdomains, you can still query specific subdomains:
whois sub.example.com
- WHOIS can also be utilized for subdomains. While registration information can often be less detailed for subdomains, you can still query specific subdomains:
Troubleshooting WHOIS Queries
Sometimes, WHOIS queries might not return the expected information. Here are a few common issues and their solutions:
-
Rate Limiting:
- WHOIS services might impose rate limits to prevent abuse. If you make too many requests in a short time, your request might be temporarily blocked.
- Solution: Space out your queries or batch them efficiently.
-
Privacy Protected Domains:
- Many domain owners choose to use privacy services to hide their contact information in WHOIS databases. This means you might see «Privacy Protect» or similar terms instead of actual contact details.
- Solution: If you need to reach the owner, contact the registrar for further instructions.
-
Incorrect WHOIS Server:
- Each top-level domain (TLD) has a designated WHOIS server. If you’re querying a TLD that uses a different WHOIS server that your tool doesn’t access, you may not get accurate results.
- Solution: Use the correct WHOIS server for the specific TLD.
Using WHOIS Responsibly
When using WHOIS, it’s vital to remember that the information gathered must be used responsibly, with respect for privacy and legality. Ensure you’re not misusing the information for spam, harassment, or any unethical activities.
Conclusion
Using WHOIS from the Windows Command Prompt is an essential skill for anyone involved in web management, IT, or cybersecurity. From understanding domain ownership to analyzing potential threats and managing your own domains, WHOIS can provide critical insights.
Additional Resources
- WHOIS Lookup Websites: In addition to using WHOIS from the command line, many online tools allow for easy WHOIS queries without requiring installation. Websites like
whois.netprovide a simple interface for doing quick checks. - Network Utility Tools: Familiarizing yourself with more network utilities can help enhance your overall networking skills. Tools like
traceroute,ping, andnslookupcomplement WHOIS by providing a broader picture of networking queries and issues.
By mastering WHOIS, you will significantly enhance your ability to work with domain registrations and online networking, making you a more resourceful and effective professional in today’s digital landscape.
The WHOIS protocol is an essential tool for network administrators, web developers, and online marketers looking to gather information about domain names and IP addresses. It allows users to query databases maintained by various domain registrars and regional internet registries to retrieve details about domain ownership, registration dates, and other pertinent information. While there are many graphical interfaces and online WHOIS tools available, utilizing the Windows Command Prompt to run WHOIS queries can be quicker and more efficient, especially when dealing with multiple queries or integrating WHOIS functionality into scripts.
In this article, we will explore how to effectively use WHOIS from the Windows Command Prompt, providing you with information on what WHOIS is, how to install WHOIS on Windows, basic WHOIS commands, advanced usage, troubleshooting common errors, and practical applications of WHOIS in network management and domain research.
Understanding WHOIS
WHOIS is a query-and-response protocol that provides information about the registrant of a domain name and related data associated with that domain. This data can include:
- Registrant Information: The name and contact details of the person or organization that registered the domain.
- Domain Availability: Whether a domain is registered or available for purchase.
- Registration Dates: When the domain was registered and when it is set to expire.
- Name Servers: The DNS servers associated with the domain.
- Technical and Administrative Contacts: Who to contact for technical support or administrative issues.
This protocol is governed by various organizations, and the specific information returned can vary based on the registrar’s policies and the privacy settings chosen by the domain owner.
Installing WHOIS on Windows
While WHOIS is not natively included in Windows, installing it is straightforward. There are various methods to get WHOIS functionality on Windows, but one of the most common ways is to use third-party applications or tools. Below are a couple of methods you can use to install WHOIS on your Windows operating system:
1. Windows Subsystem for Linux (WSL)
If you frequently work with command line tools, you may want to enable the Windows Subsystem for Linux (WSL). This allows you to run Linux distributions and access various Linux command line utilities, including WHOIS.
To install WSL:
-
Open PowerShell as an administrator and run the command:
wsl --install -
Follow the on-screen instructions to set up WSL and choose your preferred Linux distribution (e.g., Ubuntu).
-
Once WSL is running, you can install WHOIS by opening your Linux terminal and executing:
sudo apt update sudo apt install whois
2. Using a Windows WHOIS Client
If WSL is not desirable for you, there are other options:
-
Download a dedicated WHOIS client like Sysinternals: WHOIS or a similar command-line tool.
-
Once downloaded, you may need to place the executable in a directory included in your system’s PATH, or you can run it directly from its location.
For Sysinternals WHOIS:
- Download the tool from the Sysinternals website.
- Extract the downloaded ZIP file.
- Open Command Prompt and navigate to the extracted folder or set the directory in your PATH.
Confirming WHOIS Installation
To check if WHOIS is successfully installed, open Command Prompt (you can find it by searching for «cmd» or «Command Prompt» in the Start menu) and type the following command followed by the ENTER key:
whois
If installed correctly, it should show a usage summary or the version of WHOIS installed, confirming that the utility is ready to use.
Basic WHOIS Commands
The basic syntax of the WHOIS command is as follows:
whois [options] [domain_name]
Example Queries
Check Domain Registration Information
To check the registration information of a domain, simply type:
whois example.com
Replace «example.com» with any domain name you’re interested in. The response will include details such as the domain’s registrar, registration dates, and registrant information if available.
Check IP Address Information
You can also use WHOIS to gather information about an IP address:
whois 192.0.2.1
This will return information regarding the owner of the IP address, along with other details associated with that range.
Using Flags with WHOIS
Different WHOIS clients may support additional flags that modify the behavior of the command. Here are a couple of common flags you might find useful:
--verboseor-v: In some WHOIS clients, this flag can provide more detailed output.--help: Displays usage information.
Consult your specific WHOIS client documentation to see which flags are available.
Advanced WHOIS Usage
As you become more experienced with WHOIS, you may want to delve into advanced usage scenarios, such as querying multiple domains, using WHOIS in batch scripts, and more.
Batch WHOIS Queries
When working with multiple domains or IP addresses, you can create a simple script to automate WHOIS queries. For instance, you could create a batch file, whois-query.bat, with the following content:
@echo off
setlocal enabledelayedexpansion
for %%d in (example1.com example2.com example3.com) do (
echo Querying %%d...
whois %%d >> whois_output.txt
echo.
)
echo WHOIS query complete. Results saved to whois_output.txt
In this script, replace (example1.com example2.com example3.com) with the domains you want to query. When executed, the script will run WHOIS queries for each domain and save the results in whois_output.txt.
Redirecting Output
You may sometimes want to save the output of your WHOIS queries for documentation or further analysis. You can redirect the output to a text file using the following syntax:
whois example.com > output.txt
This command will save the WHOIS information for example.com to the file output.txt. To append information instead of overwriting, use >>:
whois example.com >> output.txt
Scripting WHOIS Queries
For more complex scenarios, you can write scripts in PowerShell that utilize WHOIS. PowerShell allows for more powerful data manipulation and can enhance the automation of WHOIS queries. Here’s a simple example of using PowerShell to query a domain:
$domain = "example.com"
$result = whois $domain
$result | Out-File -FilePath "C:whois_output.txt" -Append
This script queries the specified domain and appends the results to a file.
Troubleshooting Common Errors
While using WHOIS from the Windows Command Prompt is generally straightforward, you may encounter some common issues. Here are some typical problems and their solutions:
Command Not Recognized
If you receive a message stating that the command is not recognized, it could mean:
- WHOIS is not installed properly. Ensure you installed it and that the directory is included in your system PATH.
- You may have made a typographical error in the command. Double-check your command syntax.
Timeout Errors
Sometimes, a WHOIS query may fail due to network issues or if the WHOIS server is temporarily unreachable. In such cases, try the following:
- Check your internet connection.
- Wait a few moments and try the query again.
- Use a different WHOIS server, if supported by your WHOIS client.
Incomplete or Missing Information
If the WHOIS results are incomplete, it may be due to one of several reasons:
- Privacy Protection: Many registrars now offer WHOIS privacy protection services that hide the registrant information. This is common and legally allowed.
- Rate Limiting: Some WHOIS servers limit the number of queries you can make in a short period. If you exceed this limit, you may receive incomplete responses or temporary bans. Try again after some time.
Practical Applications of WHOIS
Understanding how to use WHOIS can greatly benefit various aspects of your online interactions, especially in network management, cybersecurity, and digital marketing. Here are some practical applications of using WHOIS:
1. Domain Research
If you’re thinking of acquiring a domain, WHOIS can help confirm its availability or provide you with the registration information of similar domains. This can guide your decision-making when it comes to naming or rebranding.
2. Cybersecurity Monitoring
For cybersecurity professionals, monitoring WHOIS can be crucial in identifying malicious domains or monitoring competitors’ domains. By staying updated on registrations and expirations, you can assess potential threats or market changes.
3. Networking and Troubleshooting
Network administrators can use WHOIS to troubleshoot issues with IP addresses and domains, identifying potential misconfigurations or unauthorized domains on their networks.
4. Legal Compliance
In many cases, WHOIS is essential for ensuring compliance with various digital laws and regulations, as it provides a clear record of domain ownership and responsibility.
5. Digital Marketing
Marketers can utilize WHOIS data to gather competitive intelligence, assess branding strategies, and even reach out to domain owners for collaboration or negotiation opportunities.
Conclusion
WHOIS is an invaluable tool for anyone involved in domains and internet networking, providing vital information necessary for management, research, and compliance. By mastering WHOIS through the Windows Command Prompt, you unlock the ability to quickly gather and manipulate data without needing third-party interfaces or websites.
With the steps outlined in this article, you can easily install, utilize, and troubleshoot WHOIS in various capacities. Whether you’re managing domains for a business, conducting cybersecurity analysis, or simply curious about internet ownership, the command line offers a powerful means to access this crucial information. As you integrate WHOIS into your daily tasks, you will find that it significantly enhances your understanding and capabilities within the digital landscape.
In a previous post, I explained how I installed an IIS web server on my brand new Windows 11 computer.
(https://irthoughts.wordpress.com/2021/12/25/installing-iis-web-server-on-windows-11/). Another thing I installed was Whois.
The term whois refers to both a protocol and network tool for retrieving domain name registration records (https://en.wikipedia.org/wiki/WHOIS) and intelligence.
Whois is free so you don’t need to buy third party solutions or install special software to start whoising domain names that might interest you like government & educational domain names or clients & competitors domain names.
You can even whois a Whois server (Good luck with that). Some web hosting companies provide privacy protection services, against Whois queries, for a fee.
What is Whois, and why do you want to install it?
With a Whois tool, you can check the following pieces of data, among other data gems:
- Registrant Names and addresses
- Administrative Contacts (names, phone numbers, email addresses,…)
- Technical Contacts (names, phone numbers, email addresses,…)
- Resolving Name Servers
- Domain name activation, update, and expiration dates
In some cases one may be able to discover mail servers, geographical data, and additional data. Domain names of discovered servers can also be whoised.
The results might also help one determine if a domain name has been taken or is about to expire. Whois is a nice tool for gathering intelligence from the Web. Indeed. Read, however, all terms of service(s) included in a Whois output.
Because Windows does not come with Whois, you need to download it from the Web and install it in a working space; e.g., in a subfolder under your computer username folder. Thus before looking for Whois on the Web, it is a good idea to create said working space first. This is quite easy to do.
Creating a Working Space
Just go to
File Explorer > C: > Users > username
and create an empty subfolder in the username folder. You need this subfolder to store Whois file(s) there. Name the subfolder any way you want to.
For instance, if your username is johndoe and you named the subfolder Mywhois, the full path of your working space is
File Explorer > C: > Users > johndoe > Mywhois
Downloading Whois from the Web
Go to https://docs.microsoft.com/en-us/sysinternals/downloads/whois and click the Download Whois link. Windows 11 should download a zipped folder to your machine Downloads directory. Next, go to
File Explorer > Downloads > Whois
The latter is the zipped folder. Right-click on it, select “Extract All…”, press Browse… button. You should see Mywhois folder which so far is empty. Click Select Folder button and, in the next window, click Extract button. Mywhois should contain now the following files:
Eula.txt
whois.exe
whois64.exe
whois64a.exe
Running Whois
Open Command Prompt (that famous black window). The term “command prompt” also refers to the right angle bracket (>) that indicates the command line interface can accept commands.
If you have never opened Command Prompt before, just click the Start icon located in the task bar and search for “command”. Once the Command Prompt icon is shown, pin it to the Start menu and to the task bar so from now on Command Prompt is accessible from both locations by clicking the pinned icon.
Important Note: DO NOT press Ctrl + Shift and at the same time click the Command Prompt icon as you will end opening a window for the Windows System, which is not the intended task here.
OK, JohnDoe. Do this: Launch Command Prompt by clicking its icon. The command line should read
C:\Users\johndoe>
Add to the line Mywhois\whois -v domainname.tld, like this:
C:\Users\johndoe>Mywhois\whois -v domainname.tld
where -v is a reserved flag to print output to the screen, domainname is the domain name you want to target, and tld is the top-level domain extension (e.g., gov, edu, com, net…).
Command Prompt commands are not case sensitive, so it’s ok to write mywhois instead of Mywhois in the command line.
Pressing Enter sends output to the Command Prompt screen.
Saving the results
You may copy/paste its current content to an empty text file and save it to your workspace. You can do this by pressing Ctrl + A to select all, Ctrl + C to copy, and Ctrl + V to paste. You may also right-click the top bar of Command Prompt and navigate to Edit. Once there select the options that let you select all, copy, and paste.
Query Examples
As a fictional experiment, johndoe whoised LinkedIn, MIT, Cornell, Harvard, Zoom, Google, and Twitter, so he pressed Enter after each of the following lines:
C:\Users\johndoe>mywhois\whois -v linkedin.com
C:\Users\johndoe>mywhois\whois -v mit.edu
C:\Users\johndoe>mywhois\whois -v cornell.edu
C:\Users\johndoe>mywhois\whois -v harvard.edu
C:\Users\johndoe>mywhois\whois -v zoom.us
C:\Users\johndoe>mywhois\whois -v google.com
C:\Users\johndoe>mywhois\whois -v twitter.com
Enjoy whoising others.
Historical Note
The Sysinternals.com web site was created in 1996 by Mark Russinovich to host his advanced system utilities and technical information. The site eventually became part of microsoft.com site and now redirects to https://docs.microsoft.com/en-us/sysinternals/, where updated versions are freely available. One of said tools is Whois. At the time of writing, the site features Whois v1.21.
Содержание
- Установка и использование утилиты Whois для Windows
- Установка утилиты Whois для Windows
- Использование утилиты Whois для Windows
- Использование WHOIS для исследования доменов Интернета
- Аннотация
- Дополнительные сведения
- Доступ к WHOIS
- Как получить WHOIS из командной строки Windows
- Запустите WHOIS из командной строки Windows
- Что означает вывод Whois?
- Зачем вам нужно запускать Whois?
- Запуск Whois в Mac или Linux
- Запуск Whois на MacOS
- Запуск Whois в Linux
- Как использовать команду whois в Linux
- Система Whois
- Установка Whois
- Использование whois с доменным именем
- Использование whois с IP-адресом
- Использование whois в скрипте
- Удобство и автоматизация
- Делаем собственный сервис по определению WHOIS любого домена
Установка и использование утилиты Whois для Windows
До недавнего времени, чтобы просмотреть данные домена, я использовал Whois сервис на webnames.ru. Теперь у меня на Windows установлена утилита Whois от Марка Руссиновча и решение задачи стало куда как проще и удобней. В этой небольшой статья я хочу рассказать вам об этой полезно фишке, а также о том, как её установить и использовать.
Но начну с небольшого уточнения. WHOIS (от англ. who is – кто такой?) – это сетевой протокол прикладного уровня, служащий для получения регистрационных данных о владельцах доменов, IP-адресах и автономных системах из публичных баз данных регистраторов IP-адресов и доменных имён.
Служебная программа Whois, о которой и пойдёт речь в данной статье, выполняет запись регистрационных данных для указанного доменного имени или IP-адреса. Она является одним из дополнений к сервисным программам Windows опубликованном на сайте Sysinternals. Сайт был создан Марком Руссиновичем (Mark Russinovich) и Брайсом Когсвеллом (Bryce Cogswell) в 1996 году, а в июля 2006 года корпорация Microsoft приобрела его и теперь всё это добро доступно по адресу: technet.microsoft.com/ru-RU/sysinternals.
Установка утилиты Whois для Windows
Здесь я обойдусь без вступительных объяснений. Просто дам вам пошаговую инструкцию. После её прочтения вы и сами сможете понять, что здесь к чему.
Шаг 1. По умолчанию все загружаемые из сети Интернет файлы попадают в папку «Загрузка» папки пользовательского профиля в Windows. Здесь же вы можете создать папку «Программы» или «Soft», на ваше усмотрение.
Cоздание папки для утилит Windows
Шаг 3. Зайдите в папку «Программы» и скопируйте путь к ней.
Как узнать/получить полный путь к текущей папке в Проводнике Windows?
Шаг 4. Наведите курсор мыши на пункт «Компьютер» в левой части окна проводника «Папки» и кликните правую кнопку мыши. В появившемся контекстном меню выберите пункт «Свойства».
Свойства компьютера в Windows
Шаг 5. В открывшемся окне: Панель управления > Система – в левой части окна «Задачи» кликните пункт «Дополнительные параметры системы». В появившемся окне «Свойства системы», перейдите на вкладку «Дополнительно» и кликните кнопку «Переменные среды…». В открывшемся окне «Переменные среды», в секции «Системные переменны» найдите и кликните переменную «Path», а потом кнопку «Изменить…»
Редактирование переменной среды Path в Windows
Шаг 7. Перезагрузите компьютер.
Таким образом, наша папка, и находящаяся в ней утилита, стали доступны из любого места.
Использование утилиты Whois для Windows
Использование утилиты Whois происходит из командной строки Windows. Кликните кнопку «Пуск» и введите в строке поиска: cmd – нажмите кнопку «Enter».
Вызов окна командной строки в Windows
В открывшемся окне введите команду whois, используя следующий формат:
Использование утилиты Whois для Windows
Как вы видите, всё достаточно просто и удобно. В статье я постарался расписать всё достаточно подробно и доступно. Ничего сложного в установке и использовании утилиты Whois от Марка Руссиновча нет, но выбор за вами. А у меня всё. Спасибо за внимание. Удачи!
В Windows 8 редактирование переменных находится не в панели управления, а в самой системе
20 июля 2014 г., 19:17 Удалить комментарий
2Алексей Булгаков не, в windows 8 всё тоже самое. вы что-то путаете.
Источник
Использование WHOIS для исследования доменов Интернета
В этой статье описывается, как использовать WHOIS для исследования доменов Интернета.
Исходная версия продукта: Windows Server 2012 R2
Исходный номер КБ: 151710
Аннотация
WHOIS — это служба, предоставляемая interNIC, которая предоставляет сведения о доменах второго уровня, включая контактные адреса электронной почты, почтовые адреса и номера телефонов тех, кто зарегистрировался в interNIC. WHOIS также может помочь определить, используется ли доменное имя, что может быть полезно для новых администраторов сайта.
Дополнительные сведения
Эта служба WHOIS включает в себя веб-базу данных, которая содержит сведения о сетях, сетевых организациях, доменах, сайтах и контактах, связанных с ними. Эта база данных называется базой данных InterNIC.
Имена административных и технических контактов для зарегистрированных доменов ввели в базу данных при обработке приложениями домена или IP-номеров с помощью interNIC.
Сведения, содержащиеся в базе данных InterNIC, могут быть особенно ценными, если возникает проблема с интернет-работой между двумя доменами. Например, с помощью WHOIS можно определить, к кому обращаться, если возникла проблема с интернет-почтой, которую невозможно устранить с помощью электронной почты. WHOIS может Exchange Server администратору имя и номер телефона администратора на хост-точке назначения.
Доступ к WHOIS
Клиентская программа WHOIS получает доступ к базе данных InterNIC напрямую и включается в UNIX систем. Существуют также клиенты, доступные для других платформ, включая Windows и Windows NT.
domain.com это имя домена Интернета интересуемого вами ведущего домена. InterNIC регистрирует только дополнительные доменные имена. Для наилучших результатов НЕ включайте в запрос полное доменное имя (FQDN). К FQDNs относятся домены верхнего уровня, связанные с интернет-сайтом. Только дополнительные доменные имена возвращают контактные данные.
Неправильно: www.microsoft.com
Правильно: microsoft.com
Сеанс Direct Telnet
Все системы, у которых есть доступ к Интернету, должны иметь возможность использовать стандартный клиент telnet для подключения к interNIC для запуска клиента WHOIS из своей системы. Сети, ограничивающие доступ к Интернету с помощью брандмауэра, не смогут использовать этот метод, если заблокирован TCP-порт 23 (стандартный порт telnet).
Exchange Server администраторы могут запускать клиент Windows NT Telnet с компьютера, на который работает IMC. Любой клиент telnet с любого хоста, подключенного к Интернету, должен работать.
Веб-интерфейс WHOIS — это база данных, доступная для поиска, через веб-страницу. Чтобы получить доступ к WHOIS с помощью любого клиента WWW, подключите электронную почту WHOIS к InterNIC.
Если вы не можете получить доступ к предыдущим методам, но у вас есть доступ к электронной почте Интернета, вы можете отправить свой mailserv@internic.net запрос. Введите команду в строку темы или в качестве первой строки в тексте сообщения. Все остальные тексты игнорируются. Перед командой необходимо в качестве префикса упереться в слово WHOIS, как в примерах клиента выше. Запросы через электронную почту обрабатываются автоматически один раз в день.
Другие домены верхнего уровня:
Источник
Как получить WHOIS из командной строки Windows
Задумывались ли вы, кто владеет конкретным доменным именем? Вы когда-нибудь хотели купить доменное имя и хотели узнать, был ли домен доступен?
Однако многие владельцы доменов включают защиту конфиденциальности, чтобы их контактная информация не была общедоступной. Большинство регистраторов доменных имен (обычно хостинговых компаний) предлагают защиту конфиденциальности за небольшую плату.
Помимо использования Whois для поиска владельцев доменных имен, вы также можете искать такую же информацию об IP-адресах, которая будет в основном полезна для системных и сетевых администраторов.
Официальный интерфейс к базе данных Whois — Whois ICANN. Попробуйте найти доменное имя, например microsoft.com, с помощью ICANN Whois, и вы получите вывод, который выглядит следующим образом:
Сюрприз, microsoft.com принадлежит корпорации Microsoft. Обратите внимание, что существует три различных типа контактов: собственно владелец регистрации, административный контакт и технический контакт. Whois является важным инструментом для многих веб-разработчиков, дизайнеров, ИТ-консультантов и предпринимателей.
Обычно, когда кто-то хочет найти домен, он использует веб-инструмент, такой как ICANN Whois, или другой бесплатный онлайн-интерфейс к базе данных Whois. Однако, если вы занимаетесь работой и часто делаете запросы к Whois, вам понадобится более удобный и эффективный метод выполнения запросов к Whois. Вот где утилита whois доступна для Windows и встроена прямо в системы MacOS и Linux.
Microsoft делает утилиту Whois доступной в составе набора инструментов Windows Sysinternals, набора инструментов для администраторов серверов и сетей, а также в качестве бесплатной автономной утилиты Whois, которая работает в Windows Client Vista и более поздних версиях, Windows Server 2008 и более поздних версиях и на Nano Server 2016 и выше. Windows Whois проста в скачивании и использовании:
Запустите WHOIS из командной строки Windows
Windows Whois — простой исполняемый файл, поэтому устанавливать его не нужно:
Поскольку это текстовая служба, в вашей программе whois будет что-то вроде «текстовой стены», но в этом списке вы увидите ту же информацию, что и при поиске в Интернете: кому принадлежит домен, когда он был зарегистрирован и с кем, когда он должен быть продлен, на кого зарегистрирован домен и всякая другая информация об этом домене.
Чтобы сделать вывод Whois более удобным для чтения, перенаправьте его вывод в текстовый файл, который затем можно прокрутить с помощью обычного текстового редактора, такого как Notepad или Notepad ++. Вот как записать вывод Whois в текстовый файл.
В командной строке просто введите следующее (заменив example.com доменом, который вы хотите запросить):
Что означает вывод Whois?
Некоторые данные, включенные в запрос Whois, очевидны: имя владельца, адрес, контактный адрес электронной почты, телефон и т. Д. Но как насчет отдыха?
Зачем вам нужно запускать Whois?
Первый шаг при регистрации нового доменного имени — определить, доступен ли нужный домен или кто-то уже зарегистрировал его. Если запрос Whois не находит доменное имя, вы можете зарегистрировать его сразу же. Если кто-то уже владеет доменом, вам придется выбрать другой домен или связаться с владельцем по поводу покупки домена.
Возможно, вы захотите посмотреть, когда истекает срок действия домена, какие серверы имен обрабатывают хостинг DNS, или вы можете узнать, кто является хостинговой службой, чтобы вы могли подать жалобу. Вам может даже понравиться доменное имя, чтобы связаться с владельцем по поводу покупки домена, хотя владельцы домена часто взимают дополнительную плату.
Если вы смените веб-хостинг или почтовый хостинг, вам нужно будет запросить у Whois сервер имен, который сообщит вам, где находится домен.
При переносе веб-сайта и электронной почты на новый хостинг вам необходимо обновить серверы имен, чтобы они указывали на ваш новый хостинг, а затем убедиться, что изменения сервера имен вступили в силу. Это задачи, для которых вы найдете утилиту Whois неотъемлемой частью вашего инструментария.
Запуск Whois в Mac или Linux
Конечно, не только пользователи Windows могут запускать Whois. Пользователям Windows просто нужно добавить специальный инструмент для этого; MacOS и Linux имеют встроенную в систему утилиту Whois и готовы к использованию. Такие утилиты, как Whois, установлены по умолчанию.
Запуск Whois на MacOS
Чтобы выполнить запрос Whois на Mac, выполните следующие действия.
Вы должны увидеть тот же результат, что и в примере с Windows выше.
Запуск Whois в Linux
Запуск Whois в Linux практически идентичен запуску в терминале macOS:
Вы также увидите ту же запись, что и для пользователей Windows и Mac.
Если данные whois в MacOS или Linux прокручиваются слишком быстро, вы можете направить вывод в утилиту подкачки для прокрутки данных в своем собственном темпе:
whois example.com | Меньше
Если вы хотите узнать больше о Whois, обратитесь к разделу Как определить, кому принадлежит домен с помощью Whois. Если вы пользователь MacOS, вы можете найти, Как очистить кэш DNS на MacOS.
Есть ли у вас какие-либо специальные применения для Whois или других утилит DNS, таких как dig и Nslookup? Пожалуйста, дайте нам знать в комментариях!
Источник
Как использовать команду whois в Linux
Поиск в Whois расскажет вам много информации о том, кто владеет интернет-доменом. В Linux вы можете запустить поиск whois из командной строки. Мы проведем вас через это.
Система Whois
Система whois представляет собой список записей, которые содержат сведения как о владельцах доменов, так и о владельцах. Интернет-корпорация по присвоению имен и номеров (ICANN) регулирует регистрацию доменного имени и право собственности, но список записей проводится многими компаниями, известными как реестры.
Любой может запросить список записей. Когда вы это сделаете, один из реестров обработает ваш запрос и отправит вам данные из соответствующей записи whois.
Прежде чем идти дальше, важно, чтобы вы ознакомились со следующими терминами:
Запись Whois содержит всю контактную информацию, связанную с лицом, компанией или другим лицом, зарегистрировавшим доменное имя. Некоторые регистрации содержат больше информации, чем другие, а некоторые реестры возвращают различное количество информации.
Типичная запись whois будет содержать следующую информацию:
Вы можете делать запросы whois в Интернете, но с помощью whoisкоманды Linux вы можете выполнять поиск прямо из командной строки. Это полезно, если вам нужно выполнить поиск с компьютера без графического интерфейса пользователя или если вы хотите сделать это из сценария оболочки.
Установка Whois
Команда whoisуже была установлена в Ubuntu 20.04. Если вам нужно установить его в вашей версии Ubuntu, вы можете сделать это с помощью следующей команды:
На Fedora используйте команду ниже:
И, наконец, на Манджаро введите следующее:
Использование whois с доменным именем
Вы можете использовать whoisкоманду с доменными именами или Internet Protocol (IP) адреса. Для каждого из них возвращается немного другой набор информации.
Мы будем использовать доменное имя для нашего первого примера:
Ответ из реестра whois начинается со сводки, а затем повторяется с добавлением дополнительной информации. Ниже приведен пример с удаленными заявлениями о товарных знаках и условиями использования:
Это достаточно понятно. Мы видим различные сведения о регистраторе и реестре, в том числе контактные данные, даты регистрации и т. Д. В списке есть несколько записей, которые вы можете не распознать.
Управление по присвоению номеров в Интернете (IANA) контролирует и координирует такие вещи, как зоны системы доменных имен верхнего уровня, системы адресации по протоколу IP и список реестров. Этот реестр имеет номер 299, который указан в списке как «IANA ID: 299.»
Строки «Статус домена» показывают состояние, в котором находится домен, и он может быть в нескольких одновременно. Состояния определены в расширяемом протоколе обеспечения. Некоторые из них встречаются редко, а другие ограничены определенными ситуациями, такими как правовые споры.
Следующие государства прикреплены к этой регистрации:
Последние три обычно активируются по запросу владельца регистрации или в случае судебного разбирательства. В этом случае CNN, вероятно, потребовал, чтобы они были принудительно «заблокированы» доменом компании.
Более длинная часть ответа показана ниже:
Это дает нам более или менее ту же информацию, что и резюме, с дополнительными разделами о регистранте и его контактных данных для административных и технических целей.
Имя регистранта называется «Менеджер доменных имен». Иногда за определенную плату компании предпочитают, чтобы их регистратор регистрировал домен от своего имени под общим именем, которое регистратор поддерживает для этой цели. Это, кажется, имеет место здесь. Однако, поскольку адрес регистранта — «1 Центр CCN», очевидно, кто является регистрантом.
Использование whois с IP-адресом
Использовать whoisс IP-адресом так же просто, как использовать его с доменным именем. Просто укажите IP-адрес после whois, вот так:
Это результат, возвращаемый whois:
Первый раздел содержит информацию об организации, которой принадлежит искомый IP-адрес (в данном случае один из многих, принадлежащих Amazon). Мы также получили некоторые идентификаторы, используемые для внутренней идентификации Amazon.com, Inc. в реестре.
Второй раздел содержит адрес и имя владельца регистрации, Amazon.com, Inc. Веб-адрес в поле «Ref:» содержит эту информацию в формате JavaScript Object Notation (JSON).
Другие разделы содержат контактную информацию, которая позволяет сообщать о проблемах, связанных со злоупотреблениями, работой сети, маршрутизацией трафика и т. Д.
Использование whois в скрипте
Чтобы использовать whois в скрипте, давайте предположим, что у нас есть набор доменов, для которых нам нужно проверить даты истечения срока действия. Мы можем сделать это с помощью небольшого сценария оболочки.
Введите это в редактор и сохраните как «get-expiry.sh»:
Установите для сценария разрешения на выполнение с помощью chmodкоманды, как показано ниже:
Запустите скрипт, назвав его по имени:
Удобство и автоматизация
Да, вы также можете выполнять поиск в Интернете. Однако наличие whoisкоманды в окне терминала и сценариях обеспечивает удобство, гибкость и дает возможность автоматизировать некоторые из ваших рабочих нагрузок.
Источник
Делаем собственный сервис по определению WHOIS любого домена
Сервис WHOIS – это один из основных инструментов для людей, которые постоянно работают с доменными именами. Он нужен как любому человеку, желающему подобрать себе красивое доменное имя, так и хостинг-провайдеру, который помимо прочих услуг может предоставлять возможность регистрации домена. И те, и другие ищут автоматизации своей работы.
Итак, давайте разберёмся как это работает.
У каждой доменной зоны, будь то RU, COM или HOST есть как минимум один центр (whois-сервер), который обладает информацией о находящемся в её зоне домене. Для зоны RU, например, это whois.ripn.net и whois.tcinet.ru
Все whois-сервера всех доменных зон предоставляют информацию по строго унифицированному протоколу, слушающем подключения и запросы на 43-м порту.
Сам же запрос к whois-серверу – это просто отправка интересующего доменного имени на данный порт, после чего мы просто читаем ответ.
Для разработки системы автоматизированного получения WHOIS информации по доменам в первую очередь необходимо заполучить список серверов whois для всех существующих доменных зон. Правильным запросом Google в первой же строчке выдаёт ссылку на проект в GitHub, где выложен полноценный XML, содержащий всю требуемую нам информацию:
Сохраняем этот файл себе для последующего открытия в нашем приложении.
Если кому-то покажется, что постоянно обновлять XML файл и парсить его дело не очень удобное, то можно воспользоваться более простым способом – сторонним online-сервисом whois-servers.net. Просто склейте имя корневой зоны с хвостом «.whois-servers.net» и получите готовый адрес для отправки запроса на данные WHOIS (например, для зоны COM получится адрес «com.whois-servers.net»). Этот сервис к WHOIS не имеет никакого отношения, просто своими доменами третьего уровня ссылается на корректные адреса рабочих серверов WHOIS.
Пример разработан на C# в обычном WinForms: всего 2 текстовых поля и 1 кнопка.
Для получения списка серверов WHOIS по доменной зоне из загруженного файла XML была написана следующая функция:
Функция для получения WHOIS информации с уже известного сервера выглядит так:
Эти 2 созданные функции дают нам всё, что требуется и остаётся только обработать нажатие кнопки «Получить данные» на форме.
Имея доменное имя на входе для проверки WHOIS сначала нам необходимо вычленить зону, в которой он находится. Ввиду того, то домен может быть в зоне какого угодно уровня (вовсе не обязательно, что всегда во второй!), я написал простой цикл, который для каждого уровня, начиная с наивысшего, проверит наличие серверов WHOIS.
Далее спрашиваем информацию по домену у каждого из найденных серверов и записываем её в окно вывода результата.
Чтобы не собирать по частям из кода в статье, проект в готовом виде загрузил сюда.
Источник
