Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 09/12/2022, 09:36:39 UTC

Because I need a universal solving script.

Code:
==================================
Time: Tue Nov  8 19:08:06 2022
PrivateKey (hex): dcae05e03a07463dc195bd0a16941162e810f34c443252e1916894800f99f6b1
Bitcoin Address Compressed : 1Myn5hoo8pghPZBTTibLjoksVH1k1Fgxmd
Bitcoin Address UnCompressed :1BZTUTCAv7KRR1uAs4ekgY4KSvrmsTjG61
PrivateKey (wif) Compressed : L4cgbejhcrqGVwC7qL3owVJSS87zJm53JCpoFokX555vbxizf4RL
PrivateKey (wif) UnCompressed : 5KVUYsEke8DJ76wBA8wZPKCCes6fMnnKeRtA7yp1vV7Z5pv5JMA
==================================

You can search for any range you want.

Code:
import os
import time
import base58
import binascii
import secrets
import secp256k1 as ice
from time import sleep

os.system('clear')
t = time.ctime()
print(t, "GOOD LUCK AND HAPPY HUNTING...")

#puzzle 65
address="13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
x=58191152174077909762
y=59191152174087909762

while True:
    dec0 = secrets.SystemRandom().randrange(x,y)     
    hex = "%064x" % dec0
    WIF=ice.btc_pvk_to_wif(hex)
    if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K') or WIF.startswith('K') or WIF.startswith('L'):
        if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex,16)
                       
        elif WIF.startswith('K') or WIF.startswith('L'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex[0:64],16)
       
        HEX = "%064x" % dec
        wifc = ice.btc_pvk_to_wif(HEX)
        wifu = ice.btc_pvk_to_wif(HEX, False)
        uaddr = ice.privatekey_to_address(0, False, dec)
        caddr = ice.privatekey_to_address(0, True, dec)
        first_5 = address[:5]
    if caddr.startswith('first_5'): 
       t = time.ctime()
       print('Time : ', t)
       print('PrivateKey (hex) : ', HEX)
       print('PrivateKey (dec) : ', dec)
       print('PrivateKey (wif) Compressed   : ', wifc)
       print('PrivateKey (wif) UnCompressed : ', wifu)
       print('Bitcoin Address Compressed   = ', caddr)
       print('Bitcoin Address UnCompressed = ', uaddr)
       print("\n continue...\n")
    if caddr == address:
       t = time.ctime()
       print("Winner Found!:",t, caddr, wifc)
       f=open('winner.txt','a')
       f.write('\nTime: ' + t + '\nPrivateKey (hex): ' + HEX + '\nBitcoin Address Compressed : ' + caddr + '\nBitcoin Address UnCompressed :' + uaddr + '\nPrivateKey (wif) Compressed : ' + wifc + '\nPrivateKey (wif) UnCompressed : ' + wifu + '\n==================================')
       f.close()
       sleep(4)
       break