-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
login.py
49 lines (39 loc) · 1.33 KB
/
login.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
39
40
41
42
43
44
45
46
47
48
49
import asyncio
import json
from helper.login import login, create
from helper.logs import log
from init import clr, banner, w, r, rs
clr()
banner()
print(f" {r}Version: {w}3.1 {r}| Author: {w}SAIF ALI{rs}\n")
print(f" {r}Telegram {w}@DearSaif {r}| Instagram: {w}@_Prince.Babu_{rs}\n")
# load config for accounts
config = json.load(open("config.json", "r"))
group_source_id = str(config["group_source_username"])
group_target_id = str(config["group_target_username"])
auto_join = bool(config["auto_join"])
option = input("Login or Signup type one : ")
async def createall():
PYRO = log("PYRO-START_LOGIN")
PYRO.propagate = False
for account in config["accounts"]:
phone = account["phone"]
api_id = int(account["api_id"])
api_hash = account["api_hash"]
PYRO.info(phone)
await create(phone, api_id, api_hash)
async def loginall():
PYRO = log("PYRO-START_LOGIN")
PYRO.propagate = False
for account in config["accounts"]:
phone = account["phone"]
api_id = int(account["api_id"])
api_hash = account["api_hash"]
PYRO.info(phone)
await login(
phone, api_id, api_hash, auto_join, group_source_id, group_target_id
)
if option.lower()[0] == "l":
asyncio.run(loginall())
elif option.lower()[0] == "s":
asyncio.run(createall())