-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
37 lines (29 loc) · 1.1 KB
/
main.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
#coded by wezaxy.
from wezaxy.test import test
import json
import asyncio
async def main():
while True:
with open('config.json', 'r') as fs:
config = json.load(fs)
use_proxy = config.get('use_proxy', False)
username = config.get('username')
password = config.get('password')
language = config.get('language')
group_messages = config.get('group_messages')
if not username or not password or not language:
print("Required information is empty in config.json")
break
if use_proxy:
with open('proxies.txt', 'r') as proxy_file:
proxies = proxy_file.read().splitlines()
for proxy in proxies:
result = await test(username, password, language, proxy,group_messages)
print(result)
else:
result = await test(username, password, language, None,group_messages)
print(result)
if use_proxy is False:
await asyncio.sleep(2)
if __name__ == "__main__":
asyncio.run(main())