-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
64 lines (45 loc) · 1.15 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#sss
import os, time
from threading import Thread
limit_list = []
def check(seed, num):
try:
balance = os.popen(
f"node ./wallet.js '{seed}'"
).read()
if str(balance).replace('\n', '') == '0':
print(f'{num} balance: {balance}')
else:
b1 = int(str(balance).replace('\n', ''))
res = open('joooonz.txt', 'a')
res.write(seed + '\n')
res.close()
print(f'{num} balance: {balance}')
except:
print('error')
#hhhh
def thread_limit():
for i in limit_list:
if i.is_alive() == True:
return False
limit_list.clear()
return True
def main():
num = 0
word_list = open('list.txt', 'r').read().splitlines()
for i in word_list:
while True:
if len(limit_list) > 3:
time.sleep(2)
thread_limit()
else:
break
num = num + 1
tr = Thread(
target=check,
args=[i, num]
)
limit_list.append(tr)
tr.start()
if __name__ == '__main__':
main()