I haven't found any previous posts about brute forcing the base58 compressed key. So I thought I would share a simple code example.
The prefix in the code below is hexadecimal "1" with address 1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH
If you delete the last character 'n' and run the script you will see the correct output. It may take a few tries. From puzzle 65 it can be determined that the base58 compressed key changes at Y. If you delete everything up to q you can search a range(19) and with much brute forcing we could create the key for puzzle 66.
Python3 Code:
import secrets
from bit import Key, PrivateKey
address = "1"
addr = ""
while addr[:len(address)] != address:
prefix = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn"
base58_char = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
text = ''.join(secrets.choice(base58_char) for i in range(1))
data = prefix + text
key = Key(data)
addr = key.address
f = open("key.txt", "a")
f.write(data)
f.close()
print(data)
print(key)
print(addr)