Skip to content

A simple Telegram bot written in Go that allows users to resolve domain names using different DNS resolvers.

License

Notifications You must be signed in to change notification settings

XigmaDev/IPSeekBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram DNS Resolver Bot

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).

Features

  • 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.

Prerequisites

Setup

1. Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/XigmaDev/IPSeekBot.git
cd IPSeekBot

2. Install Dependencies

If you’re using Go modules, install the dependencies with:

Copy code
go mod tidy

3. Set Up Environment Variables

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.

4. Run the Bot Locally

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.

5. Docker Setup (Optional)

6. Available Commands

  • /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.

7. Dockerfile

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.

Development

If you want to contribute to the project or make changes, follow these steps:

1. Fork the Repository

Click the "Fork" button at the top-right corner of this repository to create your own copy.

2. Clone Your Fork

Clone your fork to your local machine:

Copy code
git clone https://github.com/XigmaDev/IPSeekBot.git
cd IPSeekBot

3. Make Changes

Make your changes in a new branch:

Copy code
git checkout -b feature-branch

4. Commit and Push

Commit your changes:

Copy code
git add .
git commit -m "Add new feature"

Push your branch:

Copy code
git push origin feature-branch

5. Create a Pull Request

Go to the GitHub repository and create a pull request for your changes.

License

This project is open-source and available under the MIT License.

Acknowledgments

  • 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.

About

A simple Telegram bot written in Go that allows users to resolve domain names using different DNS resolvers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published