GithubHelp home page GithubHelp logo

manusha-lakshan / ip-finder-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thejan64go/ip-finder-bot

0.0 0.0 0.0 10.92 MB

IP Finder Bot is a Telegram bot ๐Ÿค– that provides detailed information about IP addresses ๐ŸŒ, including geographical location ๐Ÿ“

Shell 0.02% JavaScript 0.02% Python 99.60% PowerShell 0.05% Cython 0.31%

ip-finder-bot's Introduction

๐ŸŒ IP Finder Bot for Telegram ๐Ÿค–

๐Ÿ“œ Introduction

IP Finder Bot is a Telegram bot ๐Ÿค– that provides detailed information about IP addresses ๐ŸŒ, including geographical location ๐Ÿ“, Internet Service Provider (ISP), and more. It supports both IPv4 and IPv6 addresses and offers functionalities through direct messages ๐Ÿ’ฌ and inline queries ๐Ÿ”.

๐Ÿ–ผ Sample Output

IP Finder Bot Sample

โœจ Features

  • IP Address Lookup: Enter an IP address to get detailed information ๐Ÿ”Ž.
  • IPv4 and IPv6 Support: Handles both IPv4 and IPv6 address formats ๐Ÿ”„.
  • Geographical Information: Provides details like country ๐Ÿณ๏ธ, city ๐Ÿ™, region, and postal code ๐Ÿ“ฌ.
  • ISP Information: Retrieves the Internet Service Provider associated with the IP ๐ŸŒ.
  • Interactive Map: Shares a static map pinpointing the IP address location ๐Ÿ—บ, generated using the LocationIQ Maps API.
  • Inline Query Support: Use the bot in any conversation through inline queries ๐Ÿ”.
  • Privacy Focused: Does not store user queries ๐Ÿ›ก.

๐Ÿ—บ Utilizing LocationIQ Maps API for Map Images

The bot generates map images for IP locations using the LocationIQ Maps API:

๐Ÿš€ Getting Started with LocationIQ Maps API

  1. Obtain an API key by signing up for a free LocationIQ account ๐Ÿ”‘.
  2. Use the Static Map service by constructing a URL with the location's latitude and longitude, and your API key ๐Ÿ“.

๐Ÿ“Œ Example API Request

https://maps.locationiq.com/v3/staticmap?key=YOUR_LOCATIONIQ_API_KEY&center=LATITUDE,LONGITUDE&zoom=16&size=600x600&markers=icon:large-blue-cutout|LATITUDE,LONGITUDE

Replace YOUR_LOCATIONIQ_API_KEY, LATITUDE, and LONGITUDE with your LocationIQ API key and the geographical coordinates.

โš™๏ธ Installation

To use this bot, you need to have Python installed on your machine along with some specific libraries. Follow the steps below to set up and run the bot:

๐Ÿ“‹ Prerequisites

  • Python 3.6 or newer ๐Ÿ
  • A Telegram Bot Token ๐Ÿค– (obtained from BotFather)
  • An IPinfo API token ๐Ÿ”‘ (obtain from IPinfo)

๐Ÿ“š Required Libraries

  • pyrogram - A modern, elegant, and asynchronous Telegram MTProto API framework ๐Ÿš€.
  • ipinfo - For fetching IP details ๐ŸŒ.
  • requests - For making HTTP requests ๐ŸŒ.

๐Ÿ”ง Installation Steps

  1. Clone this repository or download the script ๐Ÿ“.
  2. Install the required Python libraries using pip:
    pip install pyrogram ipinfo requests
    
  3. Create a config.py file in the same directory as the script with the following content, replacing YOUR_API_ID, YOUR_API_HASH, YOUR_BOT_TOKEN, and YOUR_IPINFO_ACCESS_TOKEN with your actual details:
    class con:
        API_ID = 'YOUR_API_ID'  # Your API ID (as a string) ๐Ÿ†”
        API_HASH = 'YOUR_API_HASH'  # Your API Hash (as a string) ๐Ÿ”
        BOT_TOKEN = 'YOUR_BOT_TOKEN'  # Your Bot Token (as a string) ๐Ÿค–
        IP_API = 'YOUR_IPINFO_ACCESS_TOKEN'  # Your IPinfo Access Token (as a string) ๐Ÿ”‘
  4. Run the bot ๐Ÿƒโ€โ™‚๏ธ:
    python your_script_name.py
    

๐Ÿ“– Usage

  • Start the Bot: Send /start to see the welcome message ๐Ÿš€.
  • Find IP Information: Send any IP address ๐Ÿ“ง.
  • Inline Query: Type @YourBotUsername IP_ADDRESS in any chat ๐Ÿ”.

๐Ÿš€ Original Bot

Access the original bot here.


ip-finder-bot's People

Contributors

thejan64go avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.