Bitcoin Forum
July 07, 2024, 11:36:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: wallet.dat corrupt salvage failed  (Read 114 times)
nosdi26 (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100


View Profile
May 15, 2022, 04:42:10 PM
 #1

Hi to all, i have a wallet.dat file that when i insert it in bitcoin core it sayw wallet.dat corrupt salvage failed. I tried guides from this forum with python, but no private keys.I also tried with blockchain.com with no luck.
Please comment on this as its important to extract the private keys
Thanks in advance
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1568
Merit: 7691


Protocols over bureaucrats


View Profile
May 15, 2022, 05:54:41 PM
Last edit: May 16, 2022, 11:19:05 AM by BlackHatCoiner
 #2

Try running daemon/bitcoin-wallet with the salvage command.
Code:
bitcoin-wallet -wallet=<wallet-name> salvage

It tries to recover the keys from the broken wallet's database. Alternatively, try pywallet:
Code:
python pywallet.py --dumpwallet --wallet=wallet.dat > wallet.txt

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2464
Merit: 5784


Self-proclaimed Genius


View Profile
May 16, 2022, 04:13:18 AM
Last edit: May 16, 2022, 08:57:31 AM by nc50lc
 #3

Take note that bitcoin-wallet's salvage command above will default to the 'wallets' folder of the data directory if the wallet's absolute path isn't provided.
So if it's in any other folder, provide the full path to the wallet.dat.

e.g.: -wallet="E:\AppData\bitcoin\test_wallet.dat"

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1652
Merit: 6973


In memory of o_e_l_e_o


View Profile WWW
May 16, 2022, 05:00:10 AM
 #4

If the wallet is password-protected, and this will not be the case if its from a *very* old Core version before this was implemented, you will need to pass a particular password argument to pywallet so it can decrypt the encrypted private keys.

I swear I saw that option somewhere, but now I can't find it anymore in the README. Else the private keys will all be encrypted with an AES256 intermediate secret contained inside the wallet (also) that can only be decrypted with the wallet.dat password.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 2926
Merit: 7632


Crypto Swap Exchange


View Profile
May 16, 2022, 11:10:15 AM
Merited by BlackHatCoiner (2)
 #5

Alternatively, try pywallet:
Code:
python pywallet.py --dumpwallet --wallet=wallet.dat > wallet.txt

Did you include wrong link? That link leads to pywallet library which meant to create HD/BIP 32 wallet. Pywallet for wallet recovery is available at https://github.com/jackjack-jj/pywallet.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!