forked from geniusprodigy/bitcoin-convertmassivepvks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pvkmassconvert.py
39 lines (31 loc) · 1.46 KB
/
pvkmassconvert.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
import binascii, hashlib, base58, sys
arq = open('list-WIF.txt', 'w')
def convert(z):
# Step 1: get the privatekey in extended format, this is hexadecimal upper or lower case.
private_key_static = z
# Step 2: adding 80 in the front for select de MAINNET channel bitcoin address
extended_key = "80"+private_key_static
# Step 3: first process SHA-256
first_sha256 = hashlib.sha256(binascii.unhexlify(extended_key)).hexdigest()
# Step 4: second process SHA-256
second_sha256 = hashlib.sha256(binascii.unhexlify(first_sha256)).hexdigest()
# Step 5-6: add checksum info to end of extended key
final_key = extended_key+second_sha256[:8]
# Step 7: finally the Wallet Import Format (WIF) is generated in the format base 58 encode of final_key
WIF = base58.b58encode(binascii.unhexlify(final_key))
# Step 8: show the private key on usual format WIF for wallet import. Enjoy!
print ("Private Key on WIF format below")
print (WIF)
arq.write("%s \n" % WIF)
with open("brute-pvks.txt") as file:
for line in file:
print str.strip(line)
convert(str.strip(line))
print "__________________________________________________\n"
print "Developed by: ~geniusprodigy"
print "My contact on reddit: reddit.com/u/genius360\n"
print "If this saved you time or helped, donations please for BTC Address:"
print "1FrRd4iZRMU8i2Pbffzkac5u4KwUptmc7S"
#just run with Python 2.7 for more compatibility
#Usage
#python.exe pvkmassconvert.py