forked from The-HellBot/HellBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hell_string.py
32 lines (30 loc) · 1.43 KB
/
hell_string.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os
os.system("pip install telethon")
os.system("pip install pyrogram")
from pyrogram import Client
from telethon.sessions import StringSession
from telethon.sync import TelegramClient
print("••• HELLBOT SESSION GENERATOR •••")
print("\nHello!! Welcome to HellBot Session Generator\n")
okvai = input("Enter 69 to continue: ")
if okvai == "69":
print("Choose the string session type: \n1. HellBot \n2. Music Bot")
library = input("\nYour Choice: ")
if library == "1":
print("\nTelethon Session For HellBot")
APP_ID = int(input("\nEnter APP ID here: "))
API_HASH = input("\nEnter API HASH here: ")
with TelegramClient(StringSession(), APP_ID, API_HASH) as hellbot:
print("\nYour HellBot Session Is sent in your Telegram Saved Messages.")
hellbot.send_message("me", f"#HELLBOT #HELLBOT_SESSION \n\n`{hellbot.session.save()}`")
elif library == "2":
print("Pyrogram Session for Music Bot")
APP_ID = int(input("\nEnter APP ID here: "))
API_HASH = input("\nEnter API HASH here: ")
with Client(':memory:', api_id=APP_ID, api_hash=API_HASH) as hellbot:
print("\nYour HellBot Session Is sent in your Telegram Saved Messages.")
hellbot.send_message("me", f"#HELLBOT_MUSIC #HELLBOT_SESSION\n\n`{hellbot.export_session_string()}`")
else:
print("Please Enter 1 or 2 only.")
else:
print("Bhag jaa bhosdike")