Author

Topic: Simple Program to Reveal Bitcoin address from Private Keys (Read 277 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
You can use a bash script to import multiple keys, first of all put all those keys on a text file and then you can run something like:

Code:
for a in $(cat keys.txt)
 do
  bitcoin-cli importprivkey $a
 done

By default, Bitcoin Core will rescan whole blockchain to find all transaction related to the imported private key. If OP insist use Bitcoin Core, i think skip scanning when import private key & perform scan after all private keys are imported is more efficient.

Code:
for a in $(cat keys.txt)
 do
  bitcoin-cli importprivkey $a "" false
 done

bitcoin-cli rescanblockchain
legendary
Activity: 3346
Merit: 3125
I have thousands of old bitcoin private keys. Is there a program to reveal the bitcoins address on this private keys?
Or is there a simple programming code to convert the private keys to bitcoin address?

You can use this script

https://gist.github.com/dooglus/3b1fcbc2449063a1c3f7f1003ca26447

Good luck

note that this code doesn't give you "addresses" (which is what OP is looking for), instead it gives you public keys and that only in uncompressed form which you have to first decide whether you want to use the compressed or uncompressed type then you have to hash them and do the address encoding (base58 or bech32) to get the respective addresses.

If the goal is to only get the address i think OP should take a look to this link about how to generate a bitcoin address step by step, if OP understands the theory about it he will be able to code his own script to get the addys of all those privatekeys.

https://medium.com/coinmonks/how-to-generate-a-bitcoin-address-step-by-step-9d7fcbf1ad0b
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
I have thousands of old bitcoin private keys. Is there a program to reveal the bitcoins address on this private keys?
Or is there a simple programming code to convert the private keys to bitcoin address?

You can use this script

https://gist.github.com/dooglus/3b1fcbc2449063a1c3f7f1003ca26447

Good luck

note that this code doesn't give you "addresses" (which is what OP is looking for), instead it gives you public keys and that only in uncompressed form which you have to first decide whether you want to use the compressed or uncompressed type then you have to hash them and do the address encoding (base58 or bech32) to get the respective addresses.
legendary
Activity: 3346
Merit: 3125
I have thousands of old bitcoin private keys. Is there a program to reveal the bitcoins address on this private keys?
Or is there a simple programming code to convert the private keys to bitcoin address?

You can use this script

https://gist.github.com/dooglus/3b1fcbc2449063a1c3f7f1003ca26447

Good luck

That script is a good option, dooglus is one of the best coders on this community, but if you get the address you will have to verify their balance one by one, that's why the best option is to import those privatekeys on a bitcoin wallet, if you use bitcoin core the command to import a key is the next one:

Code:
importprivkey yourPrivateKeyInWalletImportFormat

You can use a bash script to import multiple keys, first of all put all those keys on a text file and then you can run something like:

Code:
for a in $(cat keys.txt)
 do
  bitcoin-cli importprivkey $a
 done
newbie
Activity: 17
Merit: 2
I have thousands of old bitcoin private keys. Is there a program to reveal the bitcoins address on this private keys?
Or is there a simple programming code to convert the private keys to bitcoin address?

You can use this script

https://gist.github.com/dooglus/3b1fcbc2449063a1c3f7f1003ca26447

Good luck
hero member
Activity: 1232
Merit: 738
Mixing reinvented for your privacy | chipmixer.com
import them into bitcoin core or electrum or any other wallet of your choice
you can also use bitaddress.org, download the source and run it offline mode
newbie
Activity: 16
Merit: 21
I have thousands of old bitcoin private keys. Is there a program to reveal the bitcoins address on this private keys?
Or is there a simple programming code to convert the private keys to bitcoin address?
Jump to: