Bitcoin Forum
December 05, 2016, 12:52:10 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 [3] 4 »  All
  Print  
Author Topic: Bitcoin private key/wallet.dat data recovery tool!  (Read 49824 times)
petrkr
Newbie
*
Offline Offline

Activity: 3


View Profile
February 04, 2014, 02:40:54 PM
 #41

will this prgram work for a litecoin wallet instead of a bitcoin wallet?

Today I tried it, version, which you can download at 1st post didn't worked, but I dowloaded source codes from GIT and that version worked for me.

I had corrupted wallet file so any python script could not open it as long probably header was damaged so it was not valid database file...

I used file instead device as long I didn't needed find wallet at raw (deleted) drive.

Code:
./wallet-recover damagedWallet.dat newWallet.dat

after move newWallet to .litecoin and rebuild tree I've got this

http://petrkr.net/a/ltcrepaired.jpeg

All "mined" transactions appears with date and time when I ran recovery tool. I can't tell if send of them will work as I still don't have synced network, but I hope so.


1x ATI 5970, Gentoo Linux PXE, Remote Hard-Reset, LTC
1x Blade 13Gh, 10x USB Erupter, 2x NF1 Powered by Bifferboard and Raspberry Pi
BTC: 1PetrkryacDyBzrNC2TSCZAP4RjeoTVtbx LTC: LPetrkrfha1ni19APC9cdHzfKLiFrHsgzJ
1480942330
Hero Member
*
Offline Offline

Posts: 1480942330

View Profile Personal Message (Offline)

Ignore
1480942330
Reply with quote  #2

1480942330
Report to moderator
1480942330
Hero Member
*
Offline Offline

Posts: 1480942330

View Profile Personal Message (Offline)

Ignore
1480942330
Reply with quote  #2

1480942330
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
daserpent1
Sr. Member
****
Offline Offline

Activity: 308



View Profile
February 04, 2014, 05:33:56 PM
 #42

Could this tool of yours be used to recover any accidently deleted files? I accidently removed the alphacoin folder with close 100k alphacoins in it  Undecided
0Null0
Newbie
*
Offline Offline

Activity: 1


View Profile
February 17, 2014, 12:09:01 AM
 #43

Hi, I tried using the tool and it worked at first. I got this error after the first few minutes
Device read: Input/output error

Could someone please help? thanks
hilgi
Full Member
***
Offline Offline

Activity: 238


View Profile WWW
April 09, 2014, 06:52:59 PM
 #44

I was able to get a recovered wallet but it was still giving me a corrupt wallet error so I ran it with the salvagewallet=1 conf file in the appdata folder and it worked!

BenHur
Member
**
Offline Offline

Activity: 64


View Profile
May 31, 2014, 03:10:22 PM
 #45

Hi makomk,
I want to thank you for your  Bitcoin private key/wallet.dat data recovery tool.
I recover my Gridcoins with the tool.  Cheesy
I want to send you  btc,but I can't find the address. Smiley

Thanks again. Grin
derrend
Hero Member
*****
Offline Offline

Activity: 699



View Profile WWW
August 28, 2014, 06:53:35 AM
 #46

What if you scan a drive with several wallets (litecoin, bitcoin, quarkcoin), are all the keys imported into one 'wallet.dat' file which will work with all three clients or will the have to be separated somehow??

@makomk, Thanks for the tool and please post a donation address Wink
derrend
Hero Member
*****
Offline Offline

Activity: 699



View Profile WWW
September 11, 2014, 10:38:48 PM
 #47

Hello,

I'm trying to build your very useful tool form source as a member of the forum stated that they had more success when it was built on their machine.
I downloaded a .tar.gz snapshot of the master branch and ran make in the same directory as the akefile but got:

Code:
g++ -I/usr/include/db4.8 -I/usr/include/cryptopp -ggdb -Wall -O2 -o wallet-recover main.cpp -lcryptopp -ldb-4.8
main.cpp:29:0: warning: "_GNU_SOURCE" redefined [enabled by default]
 #define _GNU_SOURCE
 ^
<command-line>:0:0: note: this is the location of the previous definition
main.cpp:39:16: fatal error: db.h: No such file or directory
 #include <db.h>
                ^
compilation terminated.
make: *** [wallet-recover] Error 1

Please could you give me some directions if possible? I don't build software very often Wink

Thanks Smiley
jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
September 12, 2014, 07:23:23 AM
 #48

Hello,

I'm trying to build your very useful tool form source as a member of the forum stated that they had more success when it was built on their machine.
I downloaded a .tar.gz snapshot of the master branch and ran make in the same directory as the akefile but got:

Code:
g++ -I/usr/include/db4.8 -I/usr/include/cryptopp -ggdb -Wall -O2 -o wallet-recover main.cpp -lcryptopp -ldb-4.8
main.cpp:29:0: warning: "_GNU_SOURCE" redefined [enabled by default]
 #define _GNU_SOURCE
 ^
<command-line>:0:0: note: this is the location of the previous definition
main.cpp:39:16: fatal error: db.h: No such file or directory
 #include <db.h>
                ^
compilation terminated.
make: *** [wallet-recover] Error 1

Please could you give me some directions if possible? I don't build software very often Wink

Thanks Smiley

You may need an additional library

Also I don't want to hijack the thread but OP haven't logged for more than a year
Have you tried pywallet? I only requires python2.7

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
derrend
Hero Member
*****
Offline Offline

Activity: 699



View Profile WWW
September 18, 2014, 11:30:19 PM
 #49

You may need an additional library

Also I don't want to hijack the thread but OP haven't logged for more than a year
Have you tried pywallet? I only requires python2.7
lol, I hadn't noticed how old the thread was Smiley Thanks for the tip Smiley
kingscrown
Hero Member
*****
Offline Offline

Activity: 672


http://fuk.io - check it out!


View Profile WWW
September 19, 2014, 03:21:20 AM
 #50

u are life saver to many people!

Rashnraj
Newbie
*
Offline Offline

Activity: 1


View Profile
October 17, 2014, 11:31:13 AM
 #51

I have lost all private keys of blockchain.info wallet,
Can anyone recover it, I have nearly 50,000 btc in it.
I tried many ways but I couldn't. Help me out
Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 518


Bit-x.com - Fast & Easy Trade with Low Fees!


View Profile WWW
October 17, 2014, 12:08:35 PM
 #52

I have lost all private keys of blockchain.info wallet,
Can anyone recover it, I have nearly 50,000 btc in it.
I tried many ways but I couldn't. Help me out

I think this is a spam just to increase activity. Please don't spam, you will get banned from the forum.

Blockchain.info is an online wallet. So what do you mean by that question? What are the ways you tried?

   ~~MZ~~

DeborahGunn
Newbie
*
Offline Offline

Activity: 1


View Profile
November 10, 2014, 07:46:27 AM
 #53

Data Recovery is a wonderful and multifunctional recovery tool to retrieve your lost videos, photos, music, documents, emails, etc. from your computer's hard drive. Besides, it can also recover data from USB drives, external hard drives, mobile phones, digital cameras, iPods, MP3/MP4 players and other storage devices.

Some steps on how to recover the lost data with Data Recovery:
1. Select types of lost data. All the common file formats are generally classified into six different categories. Only choose the specific types of the files you need to retrieve will accelerate the scan speed.

2. Choose a location to start searching data. This option is suitable for the situation of a data loss caused by deleting or losing a partition, and re-partition.

3. Scan your computer or device. The process bar displays how long the scan will take.

4. Preview and recover the files. When the preview or search finishes, select the target files and press Recover button to save data again on your device.

Want to get back your lost data right now? IfCoupons.com offers you Discounts and Coupons for Data Recovery from different brands and companies. Come and get one!
dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
September 16, 2015, 05:43:41 AM
 #54

So this morning I noticed there was an outgoing transaction in my wallet that hadn't confirmed for a week. I decided I would try to send it again with a bigger fee. So I did a 'dumpprivkey' on the address that funded the unconfirmed transaction, made a new wallet, did an 'importprivkey' to import the address into the new wallet, then re-sent the transaction. There was only a single output on the address, so it used the same one again, effectively double-spending it.

Once the transaction confirmed, which it did quickly, I switched back to my main wallet, and deleted the temporary new wallet, since I was done with it. Right?

I rescanned the old wallet, using the -zapwallettxes argument to delete the old conflicting transaction, and it came up showing that I had made two spends recently, not the one that I expected. Then I remembered: the change from the new spend is only in the new temporary wallet that I just deleted.

Oops.

I looked for 'undelete' programs, but didn't find anything that looked useful. I found this thread, but the git repository seems to have died. So I wrote my own simple "privkey finder":

Code:
#include <stdio.h>

main() {
  int c, i;

  // privkeys are preceeded by: 3081 d302 0101 0420 and are 32 bytes long:
  while ((c = getchar()) != EOF)
    if (c == 0x81 &&
        getchar() == 0xd3 && getchar() == 0x02 && getchar() == 0x01 &&
        getchar() == 0x01 && getchar() == 0x04 && getchar() == 0x20) {
      for (i = 0; i < 32; i++)
        printf("%02x", getchar());
      printf("\n");
    }
}

It's much simpler than the tool this thread is about, but it did the trick. It found the deleted private keys and I was able to get my coins back.

So I figured I'd share it.

I built and ran it like this:

Code:
$ gcc -O4 -o pkgrep pkgrep.c
$ df ~/.bitcoin
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-1       901G  497G  359G  59% /
$ su
Password:
# ./pkgrep < /dev/dm-1

I was somewhat surprised to find that the private key for the change address was on the drive 5 times. It was a new wallet that I created just to double-spend that single output, then deleted. And somehow the key found itself written to disk 5 times.

CryptoSalad
Member
**
Offline Offline

Activity: 112


View Profile
September 16, 2015, 10:06:29 PM
 #55

Can this be used on other wallets other than bitcoin if so would be good as I have lost a few wallets in the past on one drive that I have not used in ages and has had deleted partitions and all sorts go wrong on it. is their any windows version to t his tool or just Linux?
dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
September 17, 2015, 07:04:18 AM
 #56

Can this be used on other wallets other than bitcoin if so would be good as I have lost a few wallets in the past on one drive that I have not used in ages and has had deleted partitions and all sorts go wrong on it. is their any windows version to t his tool or just Linux?

My code should work on any wallet and any OS with a C compiler. You may need to change the 8 bytes it looks for. Make a new wallet, load it up in a hex editor, look for the 8 bytes which precede each private key.

tspacepilot
Legendary
*
Offline Offline

Activity: 1232


I will write code in exchange for bitcoins.


View Profile
September 17, 2015, 07:20:02 AM
 #57


Code:
#include <stdio.h>

main() {
  int c, i;

  // privkeys are preceeded by: 3081 d302 0101 0420 and are 32 bytes long:
  while ((c = getchar()) != EOF)
    if (c == 0x81 &&
        getchar() == 0xd3 && getchar() == 0x02 && getchar() == 0x01 &&
        getchar() == 0x01 && getchar() == 0x04 && getchar() == 0x20) {
      for (i = 0; i < 32; i++)
        printf("%02x", getchar());
      printf("\n");
    }
}

Simple and useful program, dooglus, thanks for sharing it.  One follow up question, I can see how you're just checing for each byte and then printing if you find them.  But the code you pasted just checks for 7 bytes.  There should be a check for 0x30 before the 0x81, right?  Or what am I missing?

Not currently actively browsing this forum.  I do still respond to PMs though.
siameze
Legendary
*
Offline Offline

Activity: 1050



View Profile
September 17, 2015, 09:14:37 AM
 #58

Can this be used on other wallets other than bitcoin if so would be good as I have lost a few wallets in the past on one drive that I have not used in ages and has had deleted partitions and all sorts go wrong on it. is their any windows version to t his tool or just Linux?

My code should work on any wallet and any OS with a C compiler. You may need to change the 8 bytes it looks for. Make a new wallet, load it up in a hex editor, look for the 8 bytes which precede each private key.

I thank you so much for sharing this as well, light enough to use on my arm based node.


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
September 17, 2015, 09:21:24 AM
 #59


Code:
#include <stdio.h>

main() {
  int c, i;

  // privkeys are preceeded by: 3081 d302 0101 0420 and are 32 bytes long:
  while ((c = getchar()) != EOF)
    if (c == 0x81 &&
        getchar() == 0xd3 && getchar() == 0x02 && getchar() == 0x01 &&
        getchar() == 0x01 && getchar() == 0x04 && getchar() == 0x20) {
      for (i = 0; i < 32; i++)
        printf("%02x", getchar());
      printf("\n");
    }
}

Simple and useful program, dooglus, thanks for sharing it.  One follow up question, I can see how you're just checing for each byte and then printing if you find them.  But the code you pasted just checks for 7 bytes.  There should be a check for 0x30 before the 0x81, right?  Or what am I missing?

Suppose the disk image contains: "2930 3081 d302 0101 0420 privkey". Checking for 0x30 would cause my simple program to miss that privkey completely, since it never backtracks. I figured it was better to maybe get some false positives than to miss some private keys.

In tests, my code encountered bytes like these, and so missed the privkey:

    0081 d302 0101 0420 3081 d302 0101 0420 privkey

It output:

    3081 d302 0101 0420 privke

since the 7 bytes before the real 8 byte prefix triggered the matching code.

I'm guessing that's quite an uncommon situation.

itod
Legendary
*
Offline Offline

Activity: 1008


^ will code for bitcoins


View Profile
September 17, 2015, 10:09:09 AM
 #60


Code:
#include <stdio.h>

main() {
  int c, i;

  // privkeys are preceeded by: 3081 d302 0101 0420 and are 32 bytes long:
  while ((c = getchar()) != EOF)
    if (c == 0x81 &&
        getchar() == 0xd3 && getchar() == 0x02 && getchar() == 0x01 &&
        getchar() == 0x01 && getchar() == 0x04 && getchar() == 0x20) {
      for (i = 0; i < 32; i++)
        printf("%02x", getchar());
      printf("\n");
    }
}

Simple and useful program, dooglus, thanks for sharing it.  One follow up question, I can see how you're just checing for each byte and then printing if you find them.  But the code you pasted just checks for 7 bytes.  There should be a check for 0x30 before the 0x81, right?  Or what am I missing?

Suppose the disk image contains: "2930 3081 d302 0101 0420 privkey". Checking for 0x30 would cause my simple program to miss that privkey completely, since it never backtracks. I figured it was better to maybe get some false positives than to miss some private keys.

In tests, my code encountered bytes like these, and so missed the privkey:

    0081 d302 0101 0420 3081 d302 0101 0420 privkey

It output:

    3081 d302 0101 0420 privke

since the 7 bytes before the real 8 byte prefix triggered the matching code.

I'm guessing that's quite an uncommon situation.

IMHO your code should use nested If's instead of ANDs, that way not finding expected byte should reset search to the beginning, without ever encountering false positives or missing something:
Code:
#include <stdio.h>

main() {
  int c, i;

  // privkeys are preceeded by: 3081 d302 0101 0420 and are 32 bytes long:
  while ((c = getchar()) != EOF)
    if (c == 0x30)
        if (getchar() == 0x81)
            if (getchar() == 0xd3)
                if (getchar() == 0x02)
                    if (getchar() == 0x01)
                        if (getchar() == 0x01)
                            if (getchar() == 0x04)
                                if (getchar() == 0x20) {
      for (i = 0; i < 32; i++)
        printf("%02x", getchar());
      printf("\n");
    }
}
Pages: « 1 2 [3] 4 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!