Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: french on January 21, 2021, 09:30:01 PM



Title: Recovering wallet.dat from 2011
Post by: french on January 21, 2021, 09:30:01 PM
Hello Everyone,

After 10 years I was able to recover a wallet.dat from a HD that has been partially erased and the board then caught fire. I now have a wallet.dat file that I believe is my original but I am trying to find a way to load it, find the address, anything to see if this is the correct wallet.

When I create a new wallet in Bitcoin Core, replace the new wallet.dat with my recovered one I get an error that it is an invalid format.

When I tried using pywallet I am receiving ":Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again." Any help to get me closer would be very much appreciated.

Below is an image of what opening the wallet.dat looks like in a hex editor

https://i.imgur.com/uHLtp7M.png


Title: Re: Recovering wallet.dat from 2011
Post by: HCP on January 22, 2021, 10:06:49 AM
It honestly doesn't look like any wallet.dat I've looked at. Most likely the wallet file is either totally corrupted or you don't actually have a valid wallet.dat... especially given that Bitcoin Core and PyWallet refuse to read it.

Try opening it in a plain text editor and see if you can search for: name

If there are any that show up, you should see something that looks like a Bitcoin (or other cryptocurrency) address immediately following the word "name"... and if you find that, then you might actually have a wallet.dat that is just corrupted and you might be able to recover some data from it.


Title: Re: Recovering wallet.dat from 2011
Post by: keychainX on January 22, 2021, 12:25:35 PM
Hello Everyone,

After 10 years I was able to recover a wallet.dat from a HD that has been partially erased and the board then caught fire. I now have a wallet.dat file that I believe is my original but I am trying to find a way to load it, find the address, anything to see if this is the correct wallet.

When I create a new wallet in Bitcoin Core, replace the new wallet.dat with my recovered one I get an error that it is an invalid format.

When I tried using pywallet I am receiving ":Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again." Any help to get me closer would be very much appreciated.

Below is an image of what opening the wallet.dat looks like in a hex editor


Your best shot is to use pywallet and scan to see if it finds any keys. Encrypted or unencrypted.

What software did you use to recover the file? maybe you should make an image of the drive and scan it with pywallet as well.

You can find the software on github here:https://github.com/jackjack-jj/pywallet

/KX


Title: Re: Recovering wallet.dat from 2011
Post by: jackjack on January 22, 2021, 09:12:08 PM
You can try using the recovery feature of Pywallet
Code:
mkdir test_recovery ; python pywallet.py --recover --recov_device=/path/to/wallet.dat  --recov_size=10Mio --recov_outputdir=./test_recovery

If there are private keys left with some header+footer bytes, it will find them

Output example:
Code:
Enter the passphrase for the wallet that will contain all the recovered keys (can't be empty): ***********************

Enter the possible passphrases used in your deleted wallets.
Don't forget that more passphrases = more time to test the possibilities.
Write one passphrase per line and end with an empty line.
Possible passphrase:

Starting recovery.

Read 0.0 Go in 0.0 minutes

Found 0 possible wallets
Found 0 possible encrypted keys
Found 138 possible unencrypted keys
The wallet is encrypted and the passphrase is correct


Title: Re: Recovering wallet.dat from 2011
Post by: odolvlobo on January 24, 2021, 10:21:38 PM
Below is an image of what opening the wallet.dat looks like in a hex editor

https://i.imgur.com/uHLtp7M.png

Sorry to say it, but that data looks like random garbage. It might be encrypted, but there is no identifiable metadata that would indicate it except for bytes 02-03, which might be the size of the data, assuming that the size of the metadata is 16 bytes.


Title: Re: Recovering wallet.dat from 2011
Post by: TheBeardedBaby on January 25, 2021, 09:25:07 AM
I thought you said you have recover it.  (https://twitter.com/jonesusHchrist/status/1352707902415499264) At least that story sounds a lot like yours.

Any chance to have saved any info like pr.keys or seeds in the text files/pic on that drive, you should have made a backup somewhere.