This project is a simple script written in Python that checks the expiration status of domain names. It utilizes the whois
library to retrieve domain information and sends notifications to a Telegram chat if any domain is expiring soon.
- Python 3.x
whois
libraryrequests
library- Docker (optional)
-
Clone the repository:
git clone https://github.com/alfiyansys/dex-check.git
-
Navigate to the project directory:
cd dex-check
-
Set up a virtual environment (optional but recommended):
python -m venv .venv
-
Activate the virtual environment:
On Windows:
.venv\Scripts\activate
On macOS/Linux:
source .venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
Before running the script, make sure to configure the config.ini
file with your desired settings:
- Telegram API credentials and chat ID: Provide your Telegram bot token and chat ID in the
[TELEGRAM]
section. - List of TLD domains to monitor: Add the TLD domains you want to monitor in the
[DOMAINS]
section, separated by commas.
To run the script locally:
python main.py
The script will check the expiration status of the specified domains and send a notification to the configured Telegram chat if any domain is expiring within the specified threshold.
Alternatively, you can run the Domain Expiration Checker using Docker. Docker provides an isolated environment, ensuring consistent execution across different systems.
-
Build the Docker image:
docker build -t dex-check .
-
Run the Docker container:
docker run -it --rm dex-check
The container will execute the script and display the output.
This project is licensed under the MIT License.
Feel free to contribute, report issues, or submit pull requests.