-
Notifications
You must be signed in to change notification settings - Fork 531
/
main.py
100 lines (90 loc) · 2.43 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
from check import check_balance_btc
import threading
from discord_webhook import DiscordWebhook
import argparse
import os
from colorama import init
from time import sleep
init()
parser = argparse.ArgumentParser()
parser.add_argument(
"-t",
"--threads",
help="amount of threads (default: 50)",
type=int,
default=50,
)
parser.add_argument(
"-s",
"--savedry",
help="save empty wallets",
action="store_true",
default=False,
)
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:
try:
wallets = check_balance_btc()
for wallet in wallets:
if wallet["balance"] > 0:
print(
f"{bcolors.GREEN}[+] {wallet['address']} : {float(wallet['balance'])/1e8} BTC : {wallet['private']}",
flush=True,
)
# save wallet to file
with open("results/wallets.txt", "a") as f:
f.write(
f"{wallet['address']} : {float(wallet['balance'])/1e8} BTC : {wallet['private']}\n"
)
if args.discord:
webhook = DiscordWebhook(
url=args.discord,
content=f"{wallet['address']} : {float(wallet['balance'])/1e8} BTC : {wallet['private']}",
)
response = webhook.execute()
else:
if args.savedry:
with open("results/empty.txt", "a") as f:
f.write(
f"{wallet['address']} : {float(wallet['balance'])/1e8} BTC : {wallet['private']}\n"
)
if args.verbose:
print(
f"{bcolors.RED}[-] {wallet['address']} : {float(wallet['balance'])/1e8} BTC : {wallet['private']}{bcolors.RESET}",
flush=True,
)
else:
print(
f"{bcolors.RED}[-] {wallet['address']} : {float(wallet['balance'])/1e8} BTC : {wallet['private']}{bcolors.RESET}",
end="\r",
flush=True,
)
sleep(0.01)
except (TypeError, AttributeError):
print("You are rate-limited please switch to a vpn/proxy or you dont have connection")
pass
if __name__ == "__main__":
makeDir()
threads = args.threads
for _ in range(threads):
th = threading.Thread(target=main, args=())
th.start()