forked from RiZoeLX/SpamX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multisess.py
29 lines (24 loc) · 1.12 KB
/
multisess.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
# SpamX Multiple String Generator
from pyrogram import Client
import tgcrypto
ID = int(input(" \n Send Api Id To Generate String Sessions: "))
HASH = str(input(" \n Send Api Hash To Generate String Sessions: "))
try:
number_to_add = int(input(" \n Enter number of accounts you want to generate string:"))
whom = input(" \n Enter Your Username or User id so, Client can forward all sessions to you else press enter: ")
for i in range(number_to_add):
RiZoeL = Client(name="RiZoeL", api_id=ID, api_hash=HASH, in_memory=True)
RiZoeL.start()
s = RiZoeL.export_session_string()
sess = str(s)
if whom:
id = RiZoeL.get_users(whom).id
RiZoeL.send_message(id, f"**Pyrogram String Session** \n\n `{sess}` \n\n © @RiZoeLX")
else:
RiZoeL.send_message("me", f"**Pyrogram String Session** \n\n `{sess}` \n\n © @RiZoeLX")
if whom:
print(f"All Session has been sent to {whom}")
else:
print("All Sessions has been sent to saved message")
except Exception as a:
print(a)