Bitcoin Forum
November 10, 2024, 04:10:23 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Export private keys of wallet.dat using BTCrecover  (Read 227 times)
frankescoin (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 14, 2023, 03:15:44 PM
 #1

Is there any command to be able to export privatekeys from a wallet.dat using BTCrecover?

I am not able to do it using Bitcoin-qt or pywallet with an old wallet.dat from 2018.

Thank you.
BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3168


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
August 14, 2023, 03:35:27 PM
 #2

Btcrecover is supposed to be used for recovering missing characters or seed phrases or brute-forcing passphrases. Did you forget the password of your wallet.dat?

If not, then maybe you didn't include the command for the passphrase before you use dumpprivkey from the bitcoin-qt console or PyWallet.

If you forgot the password there is documentation for BTCrecoved from this link below that you can follow you can also check the sample commands under that link.

- https://btcrecover.readthedocs.io/en/latest/

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
frankescoin (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 14, 2023, 03:40:54 PM
 #3

I used pywallet but I get this:

python3 pywallet.py --dumpwallet  --wallet=/home/pywallet/wallet.dat --passphrase=mypassword


22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'


Thank you
BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3168


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
August 14, 2023, 03:48:51 PM
 #4

I have the password. Which command I have write to use dumpprivkey with BTCrecover?

If you have then you should be able to export or dump the keys on the Bitcoin-qt console or pywallet.

What issue or errors did you get when trying to dump the keys from Qt and Pywallet?

Here are the sample commands on the Bitcoin-qt

Code:
walletpassphrase mypassword 600

And then dump the private key

Code:
dumpprivkey theaddressthatiwanttodumpprivkey

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
DaveF
Legendary
*
Offline Offline

Activity: 3654
Merit: 6664


Crypto Swap Exchange


View Profile WWW
August 14, 2023, 03:51:33 PM
 #5

Your wallet.dat is corrupted:
https://github.com/akx/walletool/issues/9

What do you get when you try to open the wallet in core itself?
Did you try salvage?
https://bitcointalk.org/index.php?topic=5330381.0

Obligatory, don't use that file make a copy and use those.

-Dave

█▀▀▀











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











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

Activity: 3430
Merit: 3168


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
August 14, 2023, 04:09:34 PM
 #6

22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'


Based on this error like the above said the wallet.dat file might be corrupted you have a similar case here "Another recovery attempt".

What I think is to use -salvagewallet but it was moved to bitcoin-wallet.exe there is a guide here on how to perform salvage wallet using bitcoin-wallet tool.

But before you salvage this wallet make sure you make a backup copy of your wallet.dat file first.

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6366


Self-proclaimed Genius


View Profile
August 15, 2023, 11:41:19 AM
 #7

Is there any command to be able to export privatekeys from a wallet.dat using BTCrecover?
I used pywallet but I get this:
22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'
There is --dump-privkeys that should be used together with --correct-wallet-password and --wallet args.
But if pywallet and Bitcoin Core didn't work in the first place which should've worked, I doubt using BTCRecover will do any difference.
And lastly, AFAIK, it only works on Blockchain(.com) "wallet.aes.json" file.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
frankescoin (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 15, 2023, 04:34:01 PM
 #8

I was asking to use BTCrecover because It was able to identify the correct password that I already know that is correct. How it was able to do that if the file is corrupted? So I think that BTCrecover may be is able to extract private keys. But, as you said, It cant do that with bitcoin core wallet.dat. I dont know why not.

I have used  --dump-privkeys with --correct-wallet-password and --wallet args, but BTCrecover said "This wallet type does not currently support dumping the decrypted private keys"  Cry Cry Cry

Thank you

BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3168


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
August 15, 2023, 04:59:20 PM
 #9

I was asking to use BTCrecover because It was able to identify the correct password that I already know that is correct. How it was able to do that if the file is corrupted?

Have you read our previous posts for a corrupted wallet.dat file above?
Please test it first and report back here.

If it doesn't work, is it possible that the "wallet.dat" file you're attempting to recover is an altcoin backup wallet rather than a Bitcoin backup wallet?

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
frankescoin (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 15, 2023, 05:29:28 PM
 #10

Yes I have read them, but I have already tried everything with pywallet and bitcoin core console and nothing works.

It is a bitcoin core wallet. This is the only program that I use.

With bitcoin core)

loadwallet wallet.dat

Wallet file verification failed. Failed to load database path '/home/.bitcoin/wallet.dat'. Data is not in recognized format. (code -18)

With pywallet)

python3 pywallet.py --dumpwallet  --wallet=/home/pywallet/wallet.dat --passphrase=mypassword

22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'

So It clear that there is something wrong with the file, but no totally wrong because BTCrecover is able to identify the correct password.

Thank you


frankescoin (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 15, 2023, 10:04:22 PM
 #11

Finally I have been able to recover a copy of the wallet from a very old usb. It works!!!!

Always always always make copies of your wallet.dat!!!!

I was pretty scared because I thought that I have lost my BTC.

thank for your help
Cricktor
Legendary
*
Offline Offline

Activity: 938
Merit: 1452


Crypto Swap Exchange


View Profile
August 27, 2023, 07:11:40 PM
 #12

I wonder why you couldn't dump or export the private keys which should be done only if you understand the risks of doing so and have a suitable and secure offline working environment.

AFAIR Bitcoin Core 0.16.0 from beginning of 2018 started to create HD wallets by default. It did read older wallet.dat files, of course. Is your wallet from 2018 a HD wallet? If yes, then private keys and addresses are derived deterministically and frequent backups can't cause an issue if a wallet backup file has to be restaured (under certain conditions restaured wallet file backups of older legacy wallet.dat files, those that contained only random private keys which weren't derived by any determinism, could lead to a loss of coins when the key pool size of backup and replaced wallet differed).

Do you have an idea what might have corrupted your wallet.dat?

█▀▀▀











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











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

Activity: 2590
Merit: 6366


Self-proclaimed Genius


View Profile
August 28, 2023, 06:58:01 AM
 #13

(under certain conditions restaured wallet file backups of older legacy wallet.dat files, those that contained only random private keys which weren't derived by any determinism, could lead to a loss of coins when the key pool size of backup and replaced wallet differed).
The good thing about pre-HD wallets after version 0.15 (Q4 2017) which OP's wallet fall into category, is the keypool size is set to a generous amount of 1000keys.
So unless OP exhausted all of those reserved after he made the backup, his coins should still be safe.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
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!