-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcheck.py
100 lines (84 loc) · 3.19 KB
/
check.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
# install cryptofuzz & colorthon
# pip install cryptofuzz / pip install colorthon
import os, random, time, threading
from cryptofuzz import Convertor
from cryptofuzz.assest import MAX_PRIVATE_KEY
from colorthon import Colors
co = Convertor()
# COLORS CODE --------------------
RED = Colors.RED
GREEN = Colors.GREEN
YELLOW = Colors.YELLOW
CYAN = Colors.CYAN
WHITE = Colors.WHITE
RESET = Colors.RESET
# COLORS CODE -------------------
def getClear():
if os.name == 'nt':
os.system('cls')
else:
os.system('clear')
def KeyGen(size):
k = "".join(random.choice('0122333444455555666666777777788888888999999999abcdef') for _ in range(size))
if int(k, 16) < MAX_PRIVATE_KEY:
return k
else:
return KeyGen(size)
def Hex_To_Addr(hexed, compress):
return co.hex_to_addr(hexed, compress)
def Rich_Loader(FileName):
return set([i.strip() for i in open(FileName).readlines()])
def getHeader(richFile, loads, found):
getClear()
output = f"""
{RED}➜{RESET} {WHITE}BTC {RESET}{CYAN}Private Key Checker {RESET} v1 {GREEN}BETA{RESET}
{RED}➜{RESET} {WHITE}AUTHOR {RESET}{CYAN}:{RESET}-{GREEN}amjiddader{RESET}
{RED}▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬{RESET}
{RED}[{RESET}{WHITE}►{RESET}{RED}]{RESET}{GREEN} Address File :{RESET}{CYAN} {richFile} {RESET}
{RED}[{RESET}{WHITE}►{RESET}{RED}]{RESET}{GREEN} Method :{RESET}{CYAN} Random. {RESET}
{RED}[{RESET}{WHITE}►{RESET}{RED}]{RESET}{GREEN} Address Type :{RESET}{CYAN} Compressed / Uncompressed.{RESET}
{RED}[{RESET}{WHITE}►{RESET}{RED}]{RESET}{GREEN} Max HEX Lengeth :{RESET}{CYAN} {MAX_PRIVATE_KEY} {RESET}
{RED}[{RESET}{WHITE}►{RESET}{RED}]{RESET}{GREEN} Result Checked :{RESET}{CYAN} {loads} {RESET}
{RED}[{RESET}{WHITE}►{RESET}{RED}]{RESET}{GREEN} Matched Address :{RESET}{CYAN} {found} {RESET}
"""
print(output)
def MainCheck():
global z, wf
target_file = 'btc.txt'
Targets = Rich_Loader(target_file)
z = 0
wf = 0
lg = 0
getHeader(richFile=target_file, loads=lg, found=wf)
while True:
z += 1
privatekey = KeyGen(64)
# compress address
CompressAddr = Hex_To_Addr(privatekey, True)
# uncompress address
UncompressAddr = Hex_To_Addr(privatekey, False)
lct = time.localtime()
if str(CompressAddr) in Targets:
wf += 1
open('Found.txt', 'a').write(f"Compressed Address: {CompressAddr}\n"
f"Private Key: {privatekey}\n"
f"DEC: {int(privatekey, 16)}\n"
f"{'-' * 66}\n")
elif str(UncompressAddr) in Targets:
wf += 1
open('Found.txt', 'a').write(f"Uncompressed Address: {CompressAddr}\n"
f"Private Key: {privatekey}\n"
f"DEC: {int(privatekey, 16)}\n"
f"{'-' * 66}\n")
elif int(z % 100000) == 0:
lg += 100000
getHeader(richFile=target_file, loads=lg, found=wf)
print(f"Generated: {lg} (SHA-256 - HEX) ...")
else:
tm = time.strftime("%Y-%m-%d %H:%M:%S", lct)
print(f"[{tm}][Total: {z} Check: {z * 2}] #Found: {wf} ", end="\r")
MainCheck()
if __name__ == '__main__':
t = threading.Thread(target=MainCheck)
t.start()
t.join()