A simple Telegram bot written in Go that allows users to resolve domain names using different DNS resolvers. It supports commands for looking up domain names, listing available DNS resolvers, and performing DNS lookups with specific resolvers. The bot also includes a feature for IP address lookup (/lookup
).
- Lookup domain IP addresses using different DNS resolvers.
- Support for multiple resolvers like Google, Cloudflare, Quad9, OpenDNS, and others.
- Inline query support for quick DNS lookups directly in Telegram chats.
/resolver
command to list available resolvers./lookup
command to look up domain names./dig
command for IP address lookups.- Supports
/start
and/help
for user guidance.
- Go (1.20 or higher)
- Telegram Bot Token
- Optional: Docker for containerization
Clone the repository to your local machine:
git clone https://github.com/XigmaDev/IPSeekBot.git
cd IPSeekBot
If you’re using Go modules, install the dependencies with:
Copy code
go mod tidy
Create a .env file in the project root directory and add your Telegram bot token:
BOT_TOKEN=your-telegram-bot-token
You can get your bot token from BotFather.
To run the bot locally, use the following command:
Copy code
go run .
This will start the bot, and it will listen for commands on Telegram.
- /start: Start interacting with the bot.
- /help: Get a list of available commands.
- /resolver: List available DNS resolvers.
- /lookup [resolver] [domain]: Lookup the IP address for a domain using a specified resolver. Example: /lookup Google example.com.
If you prefer using Docker, the project comes with a Dockerfile that builds the bot and allows you to run it in a container. See the Docker Setup section for instructions.
If you want to contribute to the project or make changes, follow these steps:
Click the "Fork" button at the top-right corner of this repository to create your own copy.
Clone your fork to your local machine:
Copy code
git clone https://github.com/XigmaDev/IPSeekBot.git
cd IPSeekBot
Make your changes in a new branch:
Copy code
git checkout -b feature-branch
Commit your changes:
Copy code
git add .
git commit -m "Add new feature"
Push your branch:
Copy code
git push origin feature-branch
Go to the GitHub repository and create a pull request for your changes.
This project is open-source and available under the MIT License.
- Go for being an awesome programming language.
- Telegram Bot API for providing an easy way to interact with Telegram users.
- golangci-lint for linting the Go codebase.