Yeah in fact it's very simple to tweak it to print all addresses.
This is the source code of the entire script:
import blocksmith
address_1 = str(input('Enter the btc address: ')) #'1PQc5NNSdvRwyw2RvrrQcBF4jHnmQFRkaL'
sert=0
while True:
paddress_1aphrase = blocksmith.KeyGenerator()
paddress_1aphrase.seed_input('qwertyuiopasdfghjklzxcvbnm1234567890') # paddress_1aphrase
private_Key = paddress_1aphrase.generate_key()
address = blocksmith.BitcoinWallet.generate_address(private_Key)
sert+=1
if address_1 == address:
print("we found it ")
print("private private_Key = ", private_Key)
print("address = ",address)
break
else:
print("trying private private_Key = ", private_Key)
print("address = ",address)
continue
To print to a file like you asked, we just write
f = open("results.txt", "w") followed by
print(..., file=f) on every statement you want to redirect. This has the consequence of causing no output to be sent to the terminal.
So the modified script would look like this:
import blocksmith
address_1 = str(input('Enter the btc address: ')) #'1PQc5NNSdvRwyw2RvrrQcBF4jHnmQFRkaL'
sert=0
f = open("results.txt", "w")
while True:
paddress_1aphrase = blocksmith.KeyGenerator()
paddress_1aphrase.seed_input('qwertyuiopasdfghjklzxcvbnm1234567890') # paddress_1aphrase
private_Key = paddress_1aphrase.generate_key()
address = blocksmith.BitcoinWallet.generate_address(private_Key)
sert+=1
if address_1 == address:
print("we found it ", file=f)
print("private private_Key = ", private_Key, file=f)
print("address = ",address, file=f)
break
else:
print("trying private private_Key = ", private_Key, file=f)
print("address = ",address, file=f)
continue
However,
I do not recommend making this change. The computational speed of programs is limited by the time it takes to write I/O to a console or disk, and it has very high latency because you are making the same
write() kernel call millions of times, and that's going to dominate and throttle the program speed.
Basically instead of iterating through billions of keys per second you will be printing and iterating through just thousands per second.