Skip to content

raj-71/taken_domain_names_finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taken Domain Names Finder

A simple fast Python script to check if domains (based on a base name and multiple TLDs) are already registered. The script uses Python’s whois library under the hood and caches results in JSON format to avoid repeated WHOIS lookups.


Table of Contents


Introduction

This tool lets you quickly check a set of TLDs (Top-Level Domains) for a chosen base name (e.g., mydomain.com, mydomain.org, mydomain.net). By default, it uses a small set of TLDs, but you can also enable an “extensive” mode that attempts a larger list of TLDs.

Whenever you run the script, it caches each WHOIS query result in a JSON file under the results/ folder. This helps avoid unnecessary WHOIS queries for domains you have already checked.


Features

  1. WHOIS Lookup: Checks if a domain is registered based on domain_name and registrar fields from the WHOIS data.
  2. Threaded Processing: Uses multithreading to speed up lookups.
  3. Caching: Stores previously fetched WHOIS data to results/<base_name>.json.
  4. Easy to Extend: You can add more TLDs to the tlds.txt or tlds_extensive.txt files.

Installation

  1. Clone or Download the repository:

    git clone https://github.com/raj-71/taken_domain_names_finder.git
    cd taken_domain_names_finder
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate   # For Linux/Mac
    
    # or
    venv\Scripts\activate      # For Windows
  3. Install dependencies:

    pip install -r requirements.txt

    The key dependency is the python-whois package.


Usage

From the project folder, run:

python main.py <base_name> [--extensive] [--print fields]

Basic

By default, the script uses tlds.txt to look up domains:

python main.py mydomain

This will check each TLD in tlds.txt (like .com, .org, etc.). Any registered domains will be printed in the console.

Extensive TLDs

To use the more comprehensive TLD list in tlds_extensive.txt, add the --extensive flag:

python main.py mydomain --extensive

This will search against a larger set of TLDs, which could take more time.

Printing Specific Fields

You can also ask the script to print certain fields from the WHOIS data for each registered domain. For example, to print the registrar and org fields, run:

python main.py mydomain --print registrar,org

You can mix and match any fields available in the WHOIS data. Fields are printed in a table-like format.


Configuration

  • tlds.txt: Contains a small list of commonly used TLDs.
  • tlds_extensive.txt: Contains an extended list of TLDs.
  • results/: Stores <base_name>.json files, which cache WHOIS data for each domain checked.

You can customize the TLD list by editing tlds.txt or tlds_extensive.txt directly.


Output Structure

  • Terminal Output:

    • When no specific fields are requested (--print is not used), the script prints the fully qualified domain names (FQDN) of all domains that are registered.
    • When using --print fields, it prints a table with the chosen fields for each registered domain.
  • Results Folder:

    • results/<base_name>.json will store a dictionary of WHOIS data for each <base_name><tld> key.

An example snippet (for mydomain) might look like:

{
  "mydomain.com": {
    "domain_name": "MYDOMAIN.COM",
    "registrar": "Example Registrar, Inc.",
    "creation_date": "2021-01-01 00:00:00",
    "expiration_date": "2023-01-01 00:00:00",
    "name_servers": [
      "NS1.EXAMPLE.COM",
      "NS2.EXAMPLE.COM"
    ],
    ...
  },
  "mydomain.org": { ... },
  ...
}

About

Fast scanner to check availability of domain across TLDs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages