A CLI tool for WHOIS Lookup Operations
Project description
Pylookup Tool
pylookup-tool
is a comprehensive Python-based WHOIS and DNS lookup utility that allows users to gather detailed information about domains, including WHOIS records and DNS details. It supports various TLDs, IDN domains, and provides batch processing capabilities.
Features
- Command-Line Interface (CLI): Perform WHOIS and DNS lookups directly from the terminal with simple command-line arguments.
- WHOIS Lookup: Retrieve WHOIS information for any given domain, including registrant details, registration dates, and more.
- DNS Record Lookup: Fetch DNS records (A, MX, NS, TXT) for any domain.
- Batch Queries: Perform WHOIS lookups for a list of domains from a file, making it easy to process multiple domains at once.
- IDN Support: Seamlessly handle Internationalized Domain Names (IDNs) using Punycode conversion.
- Caching and Rate Limiting: Utilize in-memory caching and rate limiting to optimize queries and prevent server overload.
- Email Alerts: Set up email notifications for specific WHOIS changes (requires additional configuration).
- Extendable Functionality: Add custom features like reverse WHOIS lookup and WHOIS data comparison.
- Graphical User Interface (GUI): A user-friendly GUI to perform WHOIS lookups without using the command line.
Installation
Option 1: Install from PyPI
To install pylookup-tool
directly from PyPI:
pip install pylookup-tool
Option 2: Build from Source
For those who prefer to build it themselves:
-
Clone the repository and navigate to the project directory:
git clone https://github.com/h471x/whois_lookup.git cd whois_lookup
-
Build the package:
python setup.py sdist bdist_wheel
-
Install the package:
pip install dist/*.whl
Usage
Once the package is installed, you can use the pylookup
command from the terminal. The script accepts the following command-line arguments:
-
Domain Lookup:
domain
: Specify the domain to perform a WHOIS lookup (e.g.,example.com
).
-
Batch Processing:
-b
or--batch
: Specify a file containing a list of domains for batch processing.
-
DNS Records:
--dns
: Include this option to perform a DNS record lookup in addition to the WHOIS lookup.
-
Help Option:
-h
or--help
: Display the help message with all available options.
Example Usage
-
Single Domain WHOIS Lookup:
pylookup example.com
-
WHOIS Lookup with DNS Records:
pylookup example.com --dns
-
Batch WHOIS Lookup:
pylookup -b domains.txt
-
Help Option: For help with command-line options, use:
pylookup -h
GUI Usage
You can also use the pylookup-tool
with a graphical user interface (GUI). Here's how to launch the GUI and perform lookups:
-
Launching the GUI: To open the GUI, run the following command:
pylookup --gui
-
Using the GUI:
- Enter the domain you want to look up in the text field.
- Click the "Lookup" button to perform the WHOIS lookup.
- The results will be displayed in the text area below.
Usage as a Package
You can also import pylookup-tool
as a package in your own Python projects. Here's how to use it programmatically:
from app.lookup import WhoisLookup
# Create an instance of the WhoisLookup class
lookup = WhoisLookup()
# Perform a WHOIS lookup for a domain
response = lookup.lookup('example.com')
print(response)
# Perform a WHOIS lookup for a domain with DNS records
dns_response = lookup.lookup('example.com', dns=True)
print(dns_response)
# Batch lookup from a file
lookup.batch_lookup('domains.txt')
Development
To modify or extend the functionality, ensure you have the required dependencies installed. You can add new features to the CLI or modify existing functionality as needed.
Adding New Features
- Support for More TLDs: Add new WHOIS servers for additional TLDs in
pylookup/app/servers.py
. - Custom Parsing Logic: Modify
pylookup/app/parser.py
to handle more complex or custom WHOIS data formats. - Integrate Third-Party APIs: For features like reverse WHOIS, integrate with third-party APIs (e.g., WhoisXML API) in
pylookup/app/core.py
.
Contributing
Feel free to fork this repository, open issues, or submit pull requests with improvements or bug fixes. Your contributions help make the pylookup-tool
better!
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylookup-tool-0.1.tar.gz
.
File metadata
- Download URL: pylookup-tool-0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e199caee8bee5aac7e2254b01323288fbbdf4282e9ab1b119be8862755589f31 |
|
MD5 | c9773f60addccdfee7baffb9e24c469d |
|
BLAKE2b-256 | da2c5c99aa954386f26bf423ad924a4c6f62b410aed3847580d795e51835b236 |
File details
Details for the file pylookup_tool-0.1-py3-none-any.whl
.
File metadata
- Download URL: pylookup_tool-0.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5e3271f5e4d5dc5936b457c8c65b83964f63e9cf083665135f0d367a14ff406 |
|
MD5 | 7d24578f048417bd6a57bce2185abb36 |
|
BLAKE2b-256 | 2e468d015bc1d02fc55d90f5e37a2b0bfaeac146e36ffda0670a8789149edd28 |