Search content
Sort by

Showing 3 of 3 results by magnux
Post
Topic
Board Bitcoin Technical Support
Re: PYWallet Help - Dumping encrypted private key
by
magnux
on 27/05/2014, 06:28:48 UTC
Check the solution I posted in this thread:
https://bitcointalk.org/index.php?topic=398155.msg6964230#msg6964230

Give it a try, it was really hard to do it.
Post
Topic
Board Bitcoin Technical Support
Re: Recovered Private Keys with Pywallet but Passphrase is Wrong
by
magnux
on 27/05/2014, 06:21:19 UTC
Check the solution I posted in this thread:
https://bitcointalk.org/index.php?topic=398155.msg6964230#msg6964230

Give it a try, it was really hard to do it.
Post
Topic
Board Altcoin Discussion
Re: [Help] [Bounty] Recovering LTC Wallet using Pywallet
by
magnux
on 27/05/2014, 06:14:33 UTC
Dood, I feel your pain, I just went through it. I lost my keys, I recovered them from hard drive surface, but I couln't do anything with the recovered wallet, why? well, I detected a bug in pywallet, it is not behaving well for litecoin.

Anyway, I managed after a lot of debugging to sort it out, and fixed it, partially.
Here is my repo on github https://github.com/magnux/pywallet, it is exactly the same as the original, except for the line 1231, where I changed "prefix = chr(128)" for "prefix = chr(176)". This small fix will let you dump your keys correctly.

You're not screwed, if you still have those recovered .dat of course.

So, the recipe:
1) Download MY pywallet https://github.com/magnux/pywallet.

2) Recover it:
If you have already recovered your wallet:, you can use your recovered .dat. It might issue a warning later, in the dumping phase, because of the chr mismatch, ignore it.
If you haven't:
Code:
python pywallet.py --otherversion 48 --recover --recov_size= --recov_outputdir=recovered/ --recov_device=
(I discovered that a .db file recovered by photorec works just as fine as recovering from the surface of the disk directly with pywallet)

3) Dump it(the info):
Code:
python pywallet.py --otherversion 48 --datadir=recovered/ --wallet=recovered_wallet_.dat --dumpwallet --passphrase=  > litewallet.dump

4) Extract it:
Code:
cat litewallet.dump | grep "\"sec\":*" | sed 's/.*: \"//g' | sed 's/\",.*$//g' > liteprivatekeys.txt

This will extract all your keys in lines.

5) Import it:
Using litecoind, you can import it, this process is painstakingly slow, it has to rescan each time imports a key into the wallet.
Run the server and let it sync the block, after that you can use this line:

Code:
while read i; do echo "Importing Key: $i"; //litecoind importprivkey $i; done < liteprivatekeys.txt

6) Enjoy:
This process will allow you recover your keys, guaranteed, I just done so with mine.
All your keys will be associated with the "" account, and you'll be able to get your coins out via litecoind sendtoaddress

I hope this helps the mankind. Smiley

tips: LeNXP1KhagNUFfy9XKq1wn5quK6du2LX1R