-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathpyro_str_gen.py
27 lines (21 loc) · 1.01 KB
/
pyro_str_gen.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
# Copyright (c) 2021 Itz-fork
# Part of: Nexa-Userbot
import asyncio
import tgcrypto
from pyrogram import Client
print("""
|| Nexa Userbot ||
Copyright (c) 2021 Itz-fork
""")
async def pyro_str():
print("\nPlease Enter All Required Values to Generate Pyrogram String Session for your Account! \n")
api_id = int(input("Enter Your APP ID: "))
api_hash = input("Enter Your API HASH: ")
async with Client(":memory:", api_id, api_hash) as NEXAUB:
pyro_session = await NEXAUB.export_session_string()
session_msg = await NEXAUB.send_message("me", f"`{pyro_session}`")
await session_msg.reply_text("Successfully Generated String Session! **Thanks for trying [Nexa Userbot](https://github.com/Itz-fork/Nexa-Userbot) 😊** \n\n**Join @NexaBotsUpdates**", disable_web_page_preview=True)
print("\n🎉 String Session has been sent to your saved messages. Please check it. Thank You!\n")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(pyro_str())