-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathmain.py
More file actions
58 lines (46 loc) · 1.82 KB
/
main.py
File metadata and controls
58 lines (46 loc) · 1.82 KB
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
50
51
52
53
54
55
56
57
58
from qna3 import Qna3
import random
import time
import art
from utils import *
import asyncio
from config import *
async def process_private_key(private_key, proxy, semaphore):
async with semaphore:
qna3_bot = Qna3(private_key, proxy)
await qna3_bot.get_token()
if qna3_bot.token:
if CLAIM:
hash = await qna3_bot.claim_all_tx()
if hash:
print(f"{qna3_bot.account.address} | {hash} | {qna3_bot.proxy_ip}")
else:
print(f"{qna3_bot.account.address} | 'Already Claimed' | {qna3_bot.proxy_ip}")
else:
await qna3_bot.get_graphl()
if qna3_bot.todayCount == 0:
result = await qna3_bot.verify_transaction()
print(f"{qna3_bot.account.address} | {result} | {qna3_bot.proxy_ip}")
else:
print(f"{qna3_bot.account.address} | Streak: {qna3_bot.checkInDays} | {qna3_bot.proxy_ip}")
await qna3_bot.close_session()
def make_art():
art_text = art.text2art('Qna3')
lines = "-" * len(art_text.split('\n')[0])
print(f"{lines}\n{art_text}{lines}")
print('Создатель: https://t.me/Genjurx')
async def main():
make_art()
time1 = time.time()
private_keys = await read_private_keys('./inputs/keys.txt')
proxies = await read_proxies('./inputs/proxies.txt')
# print(proxies)
semaphore = asyncio.Semaphore(THREADS)
tasks = [process_private_key(private_key, proxies[i % len(proxies)], semaphore) for i, private_key in
enumerate(private_keys)]
await asyncio.gather(*tasks)
time2 = time.time()
final_time = time2 - time1
print(final_time)
if __name__ == "__main__":
asyncio.run(main())