forked from Vrunda331/MightyXSpam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsession.py
30 lines (21 loc) · 1.06 KB
/
session.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
from telethon.sessions import StringSession
from telethon.sync import TelegramClient
print(
"""\n.##.....##.####..######...##.....##.########.##....##
.###...###..##..##....##..##.....##....##.....##..##.
.####.####..##..##........##.....##....##......####..
.##.###.##..##..##...####.#########....##.......##...
.##.....##..##..##....##..##.....##....##.......##...
.##.....##..##..##....##..##.....##....##.......##...
.##.....##.####..######...##.....##....##.......##..."""
)
print("\n • Telethon String Session •")
print("\n\nEnter Your Valid Details To Continue!\n\n")
APP_ID = int(input("\nEnter APP ID Here : "))
API_HASH = input("\nEnter API HASH Here : ")
try:
with TelegramClient(StringSession(), APP_ID, API_HASH) as Mighty:
print("\nSTRING SESSION GENERATED SUCCESSFULLY !!\nCHECK YOUR SAVED MASSAGES.\nString is a Sensitive Data, Don't Share it With Anyone. ")
Mighty.send_message("me", f"**Mighty X Spam Session :**\n\n`{Mighty.session.save()}`\n\n__Don't Share it With Anyone.__")
except Exception as e:
print(f"{e}")