-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
92 lines (91 loc) · 4.76 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
from core.file import load_file, save_file
from core.menu import *
from data.config import DATA_FILE, DATA_SHEET, FAUCET_MIN_BALANCE, MIN_TRANSFER_COUNT, SHUFFLE
from core.functions import *
def main():
while True:
accounts = load_file(debug=False, file=DATA_FILE, sheet=DATA_SHEET)
if SHUFFLE:
accounts = accounts.sample(frac=1)
main_menu()
choice = input("Enter your choice: ")
if choice == "1":
while True:
choose_faucet_menu()
faucet_choice = input("Enter activity choice for faucet: ")
if faucet_choice == "1":
start_time = time.time()
for i, row in accounts.iterrows():
if isinstance(row['Faucet'], int) is False:
row['Faucet'] = 0
try:
result = faucet(row['Name'], row['Private'], 0, row['Proxy'])
if result:
accounts.loc[i, 'Faucet'] = row['Faucet'] + 1
except Exception as e:
logger.error(f"{row['Name']} | Error in function: {e}")
save_file(accounts, 1, 2, DATA_FILE, DATA_SHEET)
end_time = time.time()
logger.success(f"Script execution time: {round(end_time - start_time, 2)} seconds")
elif faucet_choice == "2":
start_time = time.time()
for i, row in accounts.iterrows():
if isinstance(row['Faucet'], int) is False:
row['Faucet'] = 0
try:
result = faucet(row['Name'], row['Private'], FAUCET_MIN_BALANCE, row['Proxy'])
if result:
accounts.loc[i, 'Faucet'] = row['Faucet'] + 1
except Exception as e:
logger.error(f"{row['Name']} | Error in function: {e}")
save_file(accounts, 1, 2, DATA_FILE, DATA_SHEET)
end_time = time.time()
logger.success(f"Script execution time: {round(end_time - start_time, 2)} seconds")
elif faucet_choice == "3":
break
elif choice == "2":
while True:
choose_transfer_menu()
transfer_choice = input("Enter activity choice for transfer: ")
if transfer_choice == "1":
start_time = time.time()
for i, row in accounts.iterrows():
if isinstance(row['Send'], int) is False:
row['Send'] = 0
try:
send_to = accounts.sample(n=1) # select randon wallet
send_to_private = send_to['Private'].values[0]
result = transfer(row['Name'], row['Private'], send_to_private, row['Proxy'])
if result:
accounts.loc[i, 'Send'] = row['Send'] + 1
except Exception as e:
logger.error(f"{row['Name']} | Error in function: {e}")
save_file(accounts, 1, 2, DATA_FILE, DATA_SHEET)
end_time = time.time()
logger.success(f"Script execution time: {round(end_time - start_time, 2)} seconds")
elif transfer_choice == "2":
start_time = time.time()
for i, row in accounts.iterrows():
if isinstance(row['Send'], int) is False:
row['Send'] = 0
if row['Send'] < MIN_TRANSFER_COUNT:
try:
send_to = accounts.sample(n=1)
send_to_private = send_to['Private'].values[0]
result = transfer(row['Name'], row['Private'], send_to_private, row['Proxy'])
if result:
accounts.loc[i, 'Send'] = row['Send'] + 1
except Exception as e:
logger.error(f"{row['Name']} | Error in function: {e}")
save_file(accounts, 1, 2, DATA_FILE, DATA_SHEET)
end_time = time.time()
logger.success(f"Script execution time: {round(end_time - start_time, 2)} seconds")
elif transfer_choice == "3":
break
elif choice == "3":
print("Exiting...")
break
else:
print("Invalid choice! Please enter a valid option.")
if __name__ == "__main__":
main()