-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.py
105 lines (92 loc) · 2.97 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
from btcaddr import Wallet
from check import check_balance_bc, last_seen_bc
import threading
from discord_webhook import DiscordWebhook
import argparse
import os
from colorama import init
init()
parser = argparse.ArgumentParser()
parser.add_argument(
"-t",
"--threads",
help="amount of threads (default: 100)",
type=int,
default=100,
)
parser.add_argument(
"-s",
"--savedry",
help="save empty wallets",
action="store_true",
default=False,
)
parser.add_argument(
"-p",
"--proxy",
help="use a proxy (host:port) (coming soon)",
)
parser.add_argument(
"--proxy_auth",
help="proxy credantials (user:pass) (coming soon)",
)
parser.add_argument(
"-v",
"--verbose",
help="increases output verbosity",
action="store_true",
)
parser.add_argument(
"-d",
"--discord",
help="send a discord notification."
)
args = parser.parse_args()
lock = threading.Lock()
class bcolors:
GREEN = "\033[92m" # GREEN
YELLOW = "\033[93m" # YELLOW
RED = "\033[91m" # RED
RESET = "\033[0m" # RESET COLOR
def makeDir():
path = "results"
if not os.path.exists(path):
os.makedirs(path)
def main():
with lock:
while True:
wallet = Wallet()
prv = wallet.key.__dict__["mainnet"].__dict__["wif"]
addr = wallet.address.__dict__["mainnet"].__dict__["pubaddr1"]
balance = int(check_balance_bc(addr))
if balance == 0:
if last_seen_bc(addr) == 0:
if args.savedry:
with open("results/dry.txt", "a") as w:
w.write(
f"Address: {addr} | Balance: {balance} | Private key: {prv}\n"
)
print(f"{bcolors.RED}{addr} : {prv} : {balance} BTC")
else:
with open("results/moist.txt", "a") as w:
w.write(
f"Address: {addr} | Balance: {balance} | Private key: {prv} | Last seen: {last_seen_bc(addr)}\n"
)
print(
f"{bcolors.YELLOW}{last_seen_bc(addr)} : {balance} : {prv} : {addr}"
)
else:
with open("results/wet.txt", "a") as w:
w.write(
f"Address: {addr} | Balance: {balance} | Private key: {prv} | Last seen: {last_seen_bc(addr)}\n"
)
if args.discord:
webhook = DiscordWebhook(url=args.discord, rate_limit_retry=True, content=f'@everyone Address: {addr} | Balance: {balance} | Private key: {prv}')
response = webhook.execute()
print(f"{last_seen_bc(addr)} {bcolors.GREEN} : {balance} : {prv} : {addr}")
if __name__ == "__main__":
makeDir()
threads = args.threads
for _ in range(threads):
th = threading.Thread(target=main, args=())
th.start()