Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 27/10/2023, 15:04:25 UTC
hows this one? ready for some fun?  Roll Eyes THIS ONE SCRIPT IS SEARCHING FOR PUZZLES 66 -71 from a single hex which is 20000000000000000...2ffffffffffffffff. I can also adjust the step size.

Code:
import os
import hashlib

# List of target Hash 160 values to search for
target_public_key_hashes = [
    bytes.fromhex('20d45a6a762535700ce9e0b216e31994335db8a5'),
    bytes.fromhex('739437bb3dd6d1983e66629c5f08c70e52769371'),
    bytes.fromhex('e0b8a2baee1b77fc703455f39d51477451fc8cfc'),
    bytes.fromhex('61eb8a50c86b0584bb727dd65bed8d2400d6d5aa'),
    bytes.fromhex('f6f5431d25bbf7b12e8add9af5e3475c44a0a5b8'),
]

while True:
    random_bytes = os.urandom(9)
    initial_bytes = b'\x00' * 23
    full_bytes = initial_bytes + random_bytes
    h160 = hashlib.new('ripemd160', hashlib.sha256(full_bytes).digest()).digest()
   
    if h160 in target_public_key_hashes:
        dec = int.from_bytes(full_bytes, byteorder='big')
        print(f"Found match with hash {h160.hex()}. Decoded value: {dec}")
        target_public_key_hashes.remove(h160)  # Remove the found hash from the list
        if not target_public_key_hashes:
            print("All target hashes found.")
            break

The same goal, only simplified. Wink