1
0
Fork 0
pwnbars/generate_session.py

14 lines
298 B
Python

import os
import asyncio
import pyrogram
async def main():
c = pyrogram.client.Client('user', api_id=os.environ['TELEGRAM_API_ID'], api_hash=os.environ['TELEGRAM_API_HASH'])
me = await c.get_me()
print(f'Hello, {me.first_name}!')
if __name__ == '__main__':
asyncio.run(main())