Author

Topic: Corrupted encrypted wallet.dat Possible to recover? (Read 2967 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
-snip-
I think you posted to the wrong thread.
Your reply seems to be a response to BitMaxz's reply in your thread: Help needed recovering old wallet from bitcoin qt (around 2016)
newbie
Activity: 9
Merit: 6
Ok I checked again.
I think I made a mistake with not formatting the usb device to fat32.
After doing so my result looks different:

Code:
Starting recovery.

Read 0.0 Go in 0.0 minutes

Found 1 possible wallets
Found 282 possible encrypted keys
Found 0 possible unencrypted keys

Possible wallet #1
    with passphrase #1  Segmentation fault: 11

and python (Version 2.7.18) crashes with this message:

Code:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Python [36037]
Path:                  /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:            org.python.python
Version:               2.7.18 (2.7.18)
Code Type:             X86-64 (Native)
Parent Process:        bash [35804]
Responsible:           Terminal [35802]
User ID:               501

Date/Time:             2022-01-12 08:26:16.2503 +0100
OS Version:            macOS 12.1 (21C52)
Report Version:        12
Bridge OS Version:     6.1 (19P647)
Anonymous UUID:        E737A5ED-65F8-A473-CED0-2E35160CE38D

Sleep/Wake UUID:       A665D445-0BFF-4476-8747-92375ADD8841

Time Awake Since Boot: 54000 seconds
Time Since Wake:       1216 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000aa56918
Exception Codes:       0x0000000000000001, 0x000000000aa56918
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [36037]

VM Region Info: 0xaa56918 is not in any region.  Bytes before following region: 4270376680
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
---> 
      __TEXT                      1092e3000-1092e7000    [   16K] r-x/r-x SM=COW  .../MacOS/Python

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libcrypto.3.dylib                     0x10a8ef0cf EVP_CIPHER_get_key_length + 4
1   libcrypto.3.dylib                     0x10a8eda1b EVP_BytesToKey + 73
2   libffi.8.dylib                       0x109fc1ee2 ffi_call_unix64 + 82
3   libffi.8.dylib                       0x109fc179e ffi_call_int + 745
...

In my recovery Folder after this I can find a json file named
Code:
pywallet_partial_recovery_1641972376.json

I guess it is really related with my pywallet installation or python itself.
Already tried reinstalling and foloowing the guides I could find. But no solution yet.

Thanks again for helping Wink

newbie
Activity: 20
Merit: 4
Yey! I did it  Grin

Today found out that pywallet has recovery feature, and it worked:
Created 1GB FAT32 partition on flash drive, copied corrupted wallet.dat on it and

Code:
nyaa@ubuntu:~/github/pywallet$ sudo ./pywallet.py --recover --recov_device /dev/sdb1 --recov_size 1Gio --recov_outputdir /home/nyaa/
Enter the passphrase for the wallet that will contain all the recovered keys: 123

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: Some-Passphrase
Possible passphrase:

Starting recovery.
0.10 Go read
0.20 Go read
0.30 Go read
0.40 Go read
0.50 Go read
0.60 Go read
0.70 Go read
0.80 Go read
0.90 Go read
1.00 Go read

Read 1.1 Go in 0.2 minutes

Found 1 possible wallets
Found 103 possible encrypted keys
Found 0 possible unencrypted keys

Possible wallet #1
    with passphrase #1  ..........

All the found encrypted private keys have been decrypted.
The wallet is encrypted and the passphrase is correct


Importing:

Importing key    1/100:
...

And one of change addresses with all bitcoins on it was there!

Thanks jackjack for the awesome tool
newbie
Activity: 20
Merit: 4
My only one backup of encrypted wallet is corrupted (last time when backed it up i probably didn't shutdown bitcoin-qt), with hex editor i found in it:
   
  • mkey
  • ckey (117 of them, that looks fine)

Does this enough for recovering my private keys? at least 117 of them?

How can i do this?
Thanks for any help!

PS
Already tried pywallet without success:
Code:
ERROR:root:Couldn't open wallet.dat/main
Bitcoin-qt:
Code:
wallet.dat corrupt, salvage failed
Jump to: