-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstring_session.py
More file actions
30 lines (27 loc) · 1.03 KB
/
string_session.py
File metadata and controls
30 lines (27 loc) · 1.03 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
#!/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.
from telethon.sessions import StringSession
from telethon.sync import TelegramClient
print("Yukki Spam Bot Telethon String Generator")
print("")
API_KEY = "1273127"
API_HASH = "2626aee4ea587947c6a703f1a0d6a3cc"
while True:
try:
with TelegramClient(StringSession(), API_KEY, API_HASH) as client:
print("")
session = client.session.save()
client.send_message("me", f"`{session}`")
print(
"Your Telethon String session has been successfully stored in your telegram, Please check your Telegram Saved Messages"
)
print("")
except:
print("")
print("Wrong phone number \n make sure its with correct country code")
print("")
continue
break