Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: d4n13 on November 19, 2017, 06:12:28 AM



Title: Extracting wallet.dat keys from ancient bitcoin-qt client without network.
Post by: d4n13 on November 19, 2017, 06:12:28 AM
I have an old client that was running on a very old computer.  I have all the wallet passphrases and everything is in good shape, but there is literally *NO* way this client can ever catch up on my data plan and my vintage HD.

I have some lint in the wallets.  Nothing worth caring about till now.  Kinda like shale, the price is high enough for me to go through the work to extract the lint.  Last time I tried this, I concluded that I needed to sync with the blockchain, tried for a week and just gave up.  Maybe my assumptions were wrong.

Is there a way (maybe through bitcoind.exe) to start the client and *NOT* sync the blockchain.  Just get to a console where I can dump *ALL* private keys in the keybag.  I realize it will be a few hundred, but like I said... at this point it's worth the hassle.

If not... can the wallet.dat be decrypted with openssl and hexdumped to find the offset of the keybag?

Thx.


Title: Re: Extracting wallet.dat keys from ancient bitcoin-qt client without network.
Post by: Bitfort on November 19, 2017, 06:58:42 AM
You might want to try run qt in "pruning mode" ( it does not download entire blockchain ... just the block headers and should be much quicker) ... google for details how to.

EDIT: Yea, you mentioned the old version. I didn't realized that. Another thing could be try to download blockchain boostrap ( in past there were some on torrents, not sure how it is now ).
There has to be a way to get your prv.keys without needing to sync qt but I'm not aware of any. Let see other users opinions.


Title: Re: Extracting wallet.dat keys from ancient bitcoin-qt client without network.
Post by: d4n13 on November 19, 2017, 07:06:28 AM
Think I'm on version 0.7 or 0.8 (did mention old right).  Pruning looks to be v0.12 introduction.

I'm hesitant to download new clients and start this all again given the age of the HW I'm working on.  I can loose the OS, no biggie, I have the wallet.dat backed up, it's just my only Windows machine.  I thought about renting a cloud node to run it on, but TOS all expressly forbid cryptocurrency SW, and I have a good relationship I don't want to sour with some random peer-to-peer port opening (cuz I'm dumb).

Seems a simple thing... if I disable my network stack, there is still no way into the keybag till it syncs?


Title: Re: Extracting wallet.dat keys from ancient bitcoin-qt client without network.
Post by: HCP on November 19, 2017, 07:47:55 AM
Does that old version of bitcoin-qt not have the "dumpwallet" or "dumpprivkey" console commands? You don't need to be synced to use those.

Failing that, if you're familiar with Python/Command line stuff, then I'd recommend "PyWallet", it definitely has a "dumpwallet" command that will extract everything from your wallet.dat. It does not require bitcoind to be synced... in fact, it doesn't require bitcoind/bitcoin-qt at all... just your wallet.dat file

Download here: https://github.com/jackjack-jj/pywallet
BitcoinTalk Thread here: https://bitcointalk.org/index.php?topic=34028.0

As always, remember to only work on COPIES of your wallet.dat ;)


Title: Re: Extracting wallet.dat keys from ancient bitcoin-qt client without network.
Post by: d4n13 on November 19, 2017, 08:04:43 AM
Does that old version of bitcoin-qt not have the "dumpwallet" or "dumpprivkey" console commands? You don't need to be synced to use those.

Failing that, if you're familiar with Python/Command line stuff, then I'd recommend "PyWallet", it definitely has a "dumpwallet" command that will extract everything from your wallet.dat. It does not require bitcoind to be synced... in fact, it doesn't require bitcoind/bitcoin-qt at all... just your wallet.dat file

Download here: https://github.com/jackjack-jj/pywallet
BitcoinTalk Thread here: https://bitcointalk.org/index.php?topic=34028.0
Yes, it does have dumpwallet and dumpprivkey, but I didn't think the console was available till the sync completed.  Least thats what I had in my notes... for some reason.

I'll look at getting a vintage copy of PyWallet since I'm sure the wallet format on my file is way older than it's expecting.

As always, remember to only work on COPIES of your wallet.dat ;)
Amen Brother... I have so many backups, it's a treat to try to find the real thing ;)


Title: Re: Extracting wallet.dat keys from ancient bitcoin-qt client without network.
Post by: Spendulus on November 20, 2017, 04:56:11 AM
Does that old version of bitcoin-qt not have the "dumpwallet" or "dumpprivkey" console commands? You don't need to be synced to use those.

Failing that, if you're familiar with Python/Command line stuff, then I'd recommend "PyWallet", it definitely has a "dumpwallet" command that will extract everything from your wallet.dat. It does not require bitcoind to be synced... in fact, it doesn't require bitcoind/bitcoin-qt at all... just your wallet.dat file

Download here: https://github.com/jackjack-jj/pywallet
BitcoinTalk Thread here: https://bitcointalk.org/index.php?topic=34028.0
Yes, it does have dumpwallet and dumpprivkey, but I didn't think the console was available till the sync completed.  Least thats what I had in my notes... for some reason.

I'll look at getting a vintage copy of PyWallet since I'm sure the wallet format on my file is way older than it's expecting.

As always, remember to only work on COPIES of your wallet.dat ;)
Amen Brother... I have so many backups, it's a treat to try to find the real thing ;)
Not sure about old versions of Core regarding dumping the keys before the sync is complete, but I am pretty sure this can be done on the current version.

Another option is to build on your computer another copy of Core, using a pruned database, then dumpprivatekeys. That would be pretty quick to load.