Bitcoin Forum
May 28, 2024, 06:58:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Get encrypted private keys from wallet.dat  (Read 156 times)
pbies (OP)
Full Member
***
Offline Offline

Activity: 254
Merit: 126



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
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 12900K and RTX 4090
pbies (OP)
Full Member
***
Offline Offline

Activity: 254
Merit: 126



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
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 12900K and RTX 4090
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!