-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmain.py
134 lines (116 loc) · 5.22 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
from pystyle import Anime, Write, Colorate, Colors, Box, Center
from time import sleep
from multiprocessing import Process, Value, freeze_support, Lock
import configparser
import requests
import json
if __name__ == '__main__':
freeze_support()
def header():
print(Center.XCenter(Colorate.Vertical(Colors.purple_to_red, """
$$$$$$\ $$\ $$\ $$\ $$\ $$\
$$ __$$\ $$ | $\ $$ | $$ |$$ | $$ |
\__/ $$ |$$\ $$\ $$ |$$$\ $$ | $$$$$$\ $$ |$$ | $$$$$$\ $$$$$$\
$$$$$$ |\$$\ $$ |$$ $$ $$\$$ | \____$$\ $$ |$$ |$$ __$$\\_$$ _|
$$ ____/ \$$$$ / $$$$ _$$$$ | $$$$$$$ |$$ |$$ |$$$$$$$$ | $$ |
$$ | $$ $$< $$$ / \$$$ |$$ __$$ |$$ |$$ |$$ ____| $$ |$$\
$$$$$$$$\ $$ /\$$\ $$ / \$$ |\$$$$$$$ |$$ |$$ |\$$$$$$$\ \$$$$ |
\________|\__/ \__|\__/ \__| \_______|\__|\__| \_______| \____/
dsc.gg/2xWallet
""")))
def menu():
header()
config = configparser.ConfigParser()
config.read('config.ini')
if str(config['main']['useConfig']) == "True":
thrds = str(config['main']['threads'])
wh = str(config['main']['webhook'])
miner = str(config['main']['miner'])
show = str(config['optional']['showOnlyHits'])
Write.Print(f"\tMiner: {miner}!\n", Colors.green_to_white)
Write.Print(f"\tThreads: {thrds}!\n", Colors.green_to_white)
Write.Print(f"\tWebhook: CENSORED!\n", Colors.green_to_white)
Write.Print(f"\tShow only Hits: {show}\n", Colors.green_to_white)
else:
print(Center.XCenter(Colorate.Vertical(Colors.blue_to_purple, Box.DoubleCube("""
[1] - BTC "Miner"
[2] - ETH "Miner" (Soon)
[3] - LTC "Miner" (Soon)
"""))))
sleep(1)
miner = Write.Input("Miner >-->> ", Colors.green_to_blue)
if miner != "1":
if miner != "2":
if miner != "3":
print(Colorate.Horizontal(Colors.red_to_white, f"Only 1, 2 or 3! You selected: {miner}"))
quit()
if miner == "1":
miner = "btc"
if miner == "2":
miner = "eth"
if miner == "3":
miner = "ltc"
thrds = Write.Input("Threads >-->> ", Colors.green_to_blue)
print(Colorate.Horizontal(Colors.green_to_white, "Setup Successfull!"))
Write.Print(f"\tMiner: {miner}!\n", Colors.green_to_white)
Write.Print(f"\tThreads: {thrds}!\n", Colors.green_to_white)
Write.Print(f"\tFill out config to use Webhook!\n", Colors.red_to_white)
#show = Write.Input("Show only hits (y/n) >-->> ", Colors.green_to_blue)
print(Colorate.Horizontal(Colors.green_to_white, "Starting Threads..."))
fails = Value('i', 0)
hits = Value('i', 0)
lock = Lock()
if str(config['main']['useConfig']) == "True":
try:
webhook_url = wh
data = {
"content": None,
"embeds": [
{
"title": f"Threads: {thrds}",
"description": "Good Luck! dsc.gg/2xWallet",
"color": 6749952,
"author": {
"name": "Miner Started!"
}
}
],
"username": "2xWallet",
"avatar_url": "https://cdn.discordapp.com/attachments/1062796452885188670/1068636566605537330/image.png",
"attachments": []
}
headers = {'Content-type': 'application/json'}
except:
return None
try:
response = requests.post(webhook_url, data=json.dumps(data), headers=headers)
except:
return None
import btc
import ltc
import eth
import title
try:
t = Process(target=title.titleLoop, args=(fails, lock,hits))
if miner == "btc":
for i in range(int(thrds)):
m = Process(target=btc.btcMiner, args=(fails, lock,hits))
m.start()
t.start()
elif miner == "ltc":
for i in range(int(thrds)):
m = Process(target=btc.btcMiner, args=(fails, lock,hits))
m.start()
t.start()
elif miner == "eth":
for i in range(int(thrds)):
m = Process(target=btc.btcMiner, args=(fails, lock,hits))
m.start()
t.start()
else:
print(Colorate.Horizontal(Colors.red_to_white, "Your miner isnt valid!"))
sleep(10)
quit()
except Exception as e:
print(e)
menu()