Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberscopetoday/telegram_bot_ip
This is a simple Telegram bot that provides geolocation information for IP addresses. The bot supports multiple languages, including English, Russian, and Slovak.
https://github.com/cyberscopetoday/telegram_bot_ip
adress ip osint osint-tool python3 telegram-bot
Last synced: about 2 months ago
JSON representation
This is a simple Telegram bot that provides geolocation information for IP addresses. The bot supports multiple languages, including English, Russian, and Slovak.
- Host: GitHub
- URL: https://github.com/cyberscopetoday/telegram_bot_ip
- Owner: CyberScopeToday
- Created: 2023-04-02T23:42:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-30T15:00:45.000Z (2 months ago)
- Last Synced: 2024-11-30T15:37:22.649Z (2 months ago)
- Topics: adress, ip, osint, osint-tool, python3, telegram-bot
- Language: Python
- Homepage: https://t.me/GeoIPInfo_bot
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Telegram IP Geolocation Bot
[![CodeFactor](https://www.codefactor.io/repository/github/cyberscopetoday/telegram_bot_ip/badge)](https://www.codefactor.io/repository/github/cyberscopetoday/telegram_bot_ip)
This is a simple Telegram bot that provides geolocation information for IP addresses. The bot supports multiple languages, including English, Russian, and Slovak.
## β¨ Features
- π Language selection support for English, Russian, and Slovak.
- π Provides detailed geolocation information for a given IP address.
- π°οΈ Uses [ip-api.com](http://ip-api.com) to retrieve geolocation data.
- πΊοΈ Displays information such as country, region, city, postal code, latitude, longitude, ASN, and organization.## π Prerequisites
- π Python 3.7 or higher
- π€ [python-telegram-bot](https://python-telegram-bot.readthedocs.io/) library (version 20.0 or higher)
- π Requests library for making HTTP requests## π Installation
1. π₯ Clone the repository:
```
git clone https://github.com/CyberScopeToday/telegram_bot_ip.git
cd telegram_bot_ip
```2. π³ Create a virtual environment:
```
python -m venv venv
```3. π Activate the virtual environment:
- On Windows:
```
venv\Scripts\activate
```
- On macOS/Linux:
```
source venv/bin/activate
```4. π¦ Install the required Python libraries:
```
pip install -r requirements.txt
```5. π Replace `'api key bot father'` with your own Telegram bot token, which you can obtain from [BotFather](https://t.me/BotFather).
## π Requirements
Add the following to `requirements.txt`:
```
python-telegram-bot>=20.0
requests
```## π Usage
1. βΆοΈ Start the bot by running:
```
python bot_ip-.py
```2. π€ Start a conversation with your bot in Telegram by typing `/start`.
3. π Select your preferred language (English, Russian, or Slovak).
4. π¨ Send an IP address to the bot, and it will provide geolocation information.
## π οΈ Code Overview
The bot consists of the following main components:
- **π Language Selection**: Users can select their preferred language when they start the bot.
- **π Geolocation Retrieval**: When a user sends an IP address, the bot retrieves geolocation data from [ip-api.com](http://ip-api.com).
- **π Command Handlers**: Handlers are used to manage user interactions and to process messages.## π‘ Example
After starting the bot and selecting your language, send an IP address like `8.8.8.8`. The bot will respond with geolocation information, such as:
```
Country: United States
Region: California
City: Mountain View
Postal Code: 94035
Latitude: 37.386
Longitude: -122.0838
ASN: AS15169
Organization: Google LLC
```## π Logging
The bot uses Python's built-in logging library to log important events, such as user interactions and errors.
## π€ Contribution
Feel free to contribute by submitting issues or pull requests. Please make sure to follow the existing code style and include relevant tests where applicable.
## π License
This project is licensed under the MIT License.
## β οΈ Disclaimer
This bot uses third-party services (ip-api.com) for geolocation data. Please review their terms of use before using the bot for commercial purposes.