-
Notifications
You must be signed in to change notification settings - Fork 130
/
main.py
107 lines (94 loc) · 3.56 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import asyncio
import sys
from config import TITLE
from termcolor import cprint
from modules import txchecker
from questionary import Choice, select
from modules.interfaces import SoftwareException
from utils.modules_runner import Runner
from utils.route_generator import RouteGenerator
from utils.tools import create_cex_withdrawal_list, drop_date, check_progress_file
def when():
cprint(f"{drop_date()}", color='light_red', attrs=["blink"])
def are_you_sure(module=None, gen_route: bool = False):
if gen_route or check_progress_file():
answer = select(
'\n ⚠️⚠️⚠️ THAT ACTION WILL DELETE ALL PREVIOUS PROGRESS FOR CLASSIC-ROUTES, continue? ⚠️⚠️⚠️ \n',
choices=[
Choice("❌ NO", 'main'),
Choice("✅ YES", 'module'),
],
qmark='☢️',
pointer='👉'
).ask()
print()
if answer == 'main':
main()
else:
if module:
module()
def main():
print(TITLE)
cprint(f'\n❤️ My channel for latest updates: https://t.me/askaer\n', 'light_cyan', attrs=["blink"])
try:
while True:
answer = select(
'What do you want to do?',
choices=[
Choice("🤖 Start running smart routes (c)GOOGLE POWERED", 'smart_routes_run'),
Choice("🚀 Start running classic routes for each wallet", 'classic_routes_run'),
Choice("📄 Generate classic-route for each wallet", 'classic_routes_gen'),
Choice("💾 Create and safe CEX withdrawal file", 'create_cex_list'),
Choice("✅ Check the connection of each proxy", 'check_proxy'),
Choice("📊 Get TX stats for all wallets", 'tx_stat'),
Choice("⏰ WHEN?", 'when'),
Choice('❌ Exit', "exit")
],
qmark='🛠️',
pointer='👉'
).ask()
runner = Runner()
if answer == 'check_proxy':
print()
asyncio.run(runner.check_proxies_status())
print()
elif answer == 'smart_routes_run':
print()
are_you_sure()
asyncio.run(runner.run_accounts(smart_route=True))
print()
elif answer == 'classic_routes_run':
print()
asyncio.run(runner.run_accounts(smart_route=False))
print()
elif answer == 'create_cex_list':
print()
create_cex_withdrawal_list()
print()
elif answer == 'tx_stat':
print()
asyncio.run(txchecker.main())
print()
elif answer == 'classic_routes_gen':
generator = RouteGenerator()
are_you_sure(generator.classic_routes_json_save, gen_route=True)
elif answer == 'when':
print()
when()
print()
elif answer == 'exit':
sys.exit()
elif answer is not None:
print()
answer()
print()
else:
raise KeyboardInterrupt
except KeyboardInterrupt:
cprint(f'\nQuick software shutdown by <ctrl + C>', color='light_yellow')
sys.exit()
except SoftwareException as error:
cprint(f'\n{error}', color='light_red')
sys.exit()
if __name__ == "__main__":
main()