forked from hacks1ash/bitcoin-collider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
36 lines (31 loc) · 1.42 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
__author__ = "MiGle Gurushidze"
__copyright__ = "Copyright (C) 2019 MiGle Gurushidze"
__license__ = "Public Domain"
__version__ = "1.0"
from parse import parse_bitcoin_addresses
from generations import generate_public_address, generate_private_wif
from utils import read_text_from_file, write_text_to_file
import itertools
HEX_CHARS = '0123456789ABCDEF'
if __name__ == '__main__':
print(f'\n******** Made by {__author__} ********\n')
print('**** Getting 1000 the richest addresses ****')
parse_bitcoin_addresses(100)
final_bitcoin_list = list()
text_content = read_text_from_file('bitcoin_addresses')
for index in range(0, len(text_content)):
text_content[index] = text_content[index].rstrip('\n')
final_bitcoin_list.append(text_content[index])
print('**** Starting checking addresses ****')
for n in range(64, 65):
for xs in itertools.product(HEX_CHARS, repeat=n):
private_hex = ''.join(xs)
if private_hex.count('0') != 64:
print(private_hex)
public_address = generate_public_address(private_hex)
if public_address in final_bitcoin_list:
private_wif = generate_private_wif(private_hex)
write_text_to_file('cracked', f'{private_hex} {private_wif} {public_address}')
print('Private key found')
else:
print('**** Whole blockchain checked ^_^ ****')