WHOIScope simplifies the WHOIS information extraction by leveraging multiple WHOIS servers and providing the option to save the results to files.
-
Clone the repository:
git clone https://github.com/EndlessFractal/WHOIScope
-
Navigate to the project directory:
cd WHOIScope
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the script:
python3 WHOIScope.py
Note: Other Python versions may work, but the script was built with Python 3.11 in mind.
-
Follow the prompts to enter the domain you want to check.
-
The script will query the appropriate WHOIS server and retrieve information about the domain. The results will be displayed in the terminal and saved to a text file.
Example Output:
+-------------------+----------------------------------------+ | Attribute | Value | +-------------------+----------------------------------------+ | domain_name | example.com | | registrar | Registrar Name | | registration_date | 2023-01-01 12:00:00 | | expiration_date | 2024-01-01 12:00:00 | | name_servers | ['ns1.example.com', 'ns2.example.com'] | +-------------------+----------------------------------------+
The table will be saved to a text file with a filename in the format
YYYY-MM-DD_HH-MM-SS_whois_example.com.txt
.
-
The script uses the
os
module to change the working directory to the directory where the script is located. This ensures that the generated text file is saved in the same directory. -
The
query_whois
function takes a domain name as input and selects the appropriate WHOIS server based on the domain's TLD. It then queries the WHOIS server using thewhois
library and returns the WHOIS information as a dictionary. -
The main code block prompts the user to enter a domain to check and calls the
query_whois
function to retrieve the WHOIS information for the domain. -
The retrieved WHOIS information is displayed in a formatted table using the
PrettyTable
class from theprettytable
library. If a value is a list of datetime objects, each element is added to the table on a separate line. -
The script generates a filename for the text file using the current timestamp and saves the table to the file.
-
The filename of the saved text file is displayed to the user.
Disclaimer: Please use WHOIScope responsibly and in compliance with ethical hacking guidelines. The script is provided as-is without any warranty. The developer is not responsible for any misuse or damage caused by the script.