-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtelesetup.py
More file actions
38 lines (34 loc) · 1.5 KB
/
telesetup.py
File metadata and controls
38 lines (34 loc) · 1.5 KB
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
33
34
35
36
37
38
#!/usr/bin/env python3
# (c) https://t.me/TelethonChat/37677
# This Source Code Form is subject to the terms of the GNU
# General Public License, v.3.0. If a copy of the GPL was not distributed with this
# file, You can obtain one at https://www.gnu.org/licenses/gpl-3.0.en.html.
try:
from telethon.sessions import StringSession
from telethon.sync import TelegramClient
except BaseException:
print("Telethon Not Found. Installing Now.")
import os
os.system("pip3 install telethon")
from telethon.sessions import StringSession
from telethon.sync import TelegramClient
ok = """ ____ ____ __ ____ __ _ _
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
█░╦─╦╔╗╦─╔╗╔╗╔╦╗╔╗░█
█░║║║╠─║─║─║║║║║╠─░█
█░╚╩╝╚╝╚╝╚╝╚╝╩─╩╚╝░█
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Lets Generate Your Session. ...(>‿◠)✌
Get your API ID and API HASH from my.telegram.org to proceed.
"""
print(ok)
API_ID = int(input("Enter APP ID here: \n"))
API_HASH = input("Enter API HASH here: \n")
client = TelegramClient(StringSession(), API_ID, API_HASH)
with client:
session_str = client.session.save()
client.send_message("me", f"`{session_str}`")
client.send_message(
"**THIS IS YOUR STRING SESSION , Don't Share with anyone** ✔\nJoin @javesOT For More Support."
)
print("**Please Check Your Telegram Saved Message For Your String.**")