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!
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.1.tar.gz
.
File metadata
- Download URL: pylookup-tool-0.1.1.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691213c639ef36cb4b93ee9eab24413efd2e4dd7d36fbb3be2bcc9ef932ba55a |
|
MD5 | da7c3867ebb9337ddfcc45f28e6a27e2 |
|
BLAKE2b-256 | 5dde308214a14f76f4aafd0e634b4d491882b2db03a5aec316cf6f1401441daf |
File details
Details for the file pylookup_tool-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pylookup_tool-0.1.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 | 326a9fb46f17ff2341dc93f2f42fd76dd3ba1c864c47b986c80b4b345cff9731 |
|
MD5 | 789b67bbdeb85d392fcf99a313b3537a |
|
BLAKE2b-256 | 735a9196702358c42eb1686690b078d6d819dcbfdfb7f3affb74dde0a4f19c4d |