Bitcoin Forum
July 29, 2026, 04:20:54 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Get encrypted private keys from wallet.dat  (Read 217 times)
pbies (OP)
Sr. Member
****
Offline

Activity: 430
Merit: 272



View Profile
January 22, 2023, 05:27:48 PM
 #1

Hi All,

I am getting private keys from decrypted wallets by searching the wallet.dat file with keyhunter for b'\x01\x30\x82\x01\x13\x02\x01\x01\x04\x20' bytes.

But what I want to do is dump all encrypted private keys in the same way - search for some magic bytes and then move forward/backward and dump bytes with encrypted private key.
They should be in ckey as I understand.

How can I do that? What bytes to search for and which to dump?

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
pbies (OP)
Sr. Member
****
Offline

Activity: 430
Merit: 272



View Profile
January 22, 2023, 10:36:06 PM
 #2

Got it!

Look for "ckey!", before this there are 4 bytes b'\x27\x00\x01\x04' - before that there are 48 bytes of ckey (which consists of encrypted private key).

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
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!