forked from AsmSafone/RadioPlayer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
genStr.py
38 lines (30 loc) · 900 Bytes
/
genStr.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
33
34
35
36
37
38
# AsmSafone
# Radio Player
# Join @AsmSafone
"""
Generate Pyrogram Session String and send it to
Saved Messages of your Telegram account
requirements:
- Pyrogram
- TgCrypto
Get your Telegram API Key from:
https://my.telegram.org/apps
"""
import asyncio
from pyrogram import Client
async def main():
api_id = int(input("API ID: "))
api_hash = input("API HASH: ")
async with Client(":memory:", api_id=api_id, api_hash=api_hash) as app:
await app.send_message(
"me",
"**Pyrogram Session String**:\n\n"
f"`{await app.export_session_string()}`\n\n**Join Updates Channel @AsmSafone!**"
)
print(
"Done, your Pyrogram session string has been sent to "
"Saved Messages of your Telegram account!"
)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())