Pages:
Author

Topic: Pywallet 2.2: manage your wallet [Update required] - page 23. (Read 208227 times)

legendary
Activity: 1974
Merit: 1029
I've now tested with my main wallet and the hexadecimal representations of the privkeys match indeed, so keys are properly recovered. However there's still a withstanding issue: even when the wallet fille is as little fragmented as possible on disk, pywallet doesn't recover all the keys:

Code:
Found 1 possible wallets
Found 359 possible encrypted keys
Found 0 possible unencrypted keys

Possible wallet #1
    with passphrase #1  ...................................

All the found encrypted private keys have been decrypted.
The wallet is encrypted and the passphrase is correct


Importing:

Key    1/255 imported:

There seems to be a limit of 255 keys. Plus, pywallet finds 359 possible keys, but the wallet has way more:

Code:
$ python pywallet.py --passphrase="$P" --dumpwallet |grep -wc sec            ## total
530
$ python pywallet.py --passphrase="$P" --dumpwallet |grep -c reserve.:.1     ## reserve (just in case this matters)
202
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
The "p" in pebkac is either non-existent or really serious Smiley. Let me know if your tests run fine, so I'll make a new wallet and recover it, then I'll send you both files.
I still can't look at this in the following days I keep that in mind.

Tried with a new wallet. It had compressed keys but the recovered ones are uncompressed so my method of intersecting privkeys isn't good.
Nice find!
I'm looking at the code and it looks like I never check the compressedness.
That's a bit less critical as you at least recover the private keys. I'm going to make pywallet import both compressed and uncompressed addresses for each private keys. Then once I have access to my dev computer I'll make this less q&d.

Edit: I just tested and it indeed recovered the corresponding uncompressed addresses. Doing the change right now.
Edit2: I pushed the new version, it's working for me with a wallet full of compressed keys
legendary
Activity: 1974
Merit: 1029
The "p" in pebkac is either non-existent or really serious Smiley. Let me know if your tests run fine, so I'll make a new wallet and recover it, then I'll send you both files.
I still can't look at this in the following days I keep that in mind.

Tried with a new wallet. It had compressed keys but the recovered ones are uncompressed so my method of intersecting privkeys isn't good.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
The "p" in pebkac is either non-existent or really serious Smiley. Let me know if your tests run fine, so I'll make a new wallet and recover it, then I'll send you both files.
I still can't look at this in the following days I keep that in mind.

(American) English is my mother tongue, and I agree that JackWallet carries a negative connotation.  I don't want someone to jack my wallet.  "WalletJack" seems less negative, but I'd still stay away from it,
Thanks for your input, I definitely dismiss *jack*

When i try to recover my wallet (comes from thread https://bitcointalksearch.org/topic/recover-corrupted-encrypted-wallet-291333) i get the next error on the web interface:

"Error in dump page"

i have installed python 2.7 and pywallet, i made the web interface working by opening a command mode, and placing my pywallet.py and pywallet.bat files on my desktop (where my wallet.dat is too) and running the next command  from the windows cmd console: "pywallet --info wallet.dat"

i am probably doing something wrong i known Sad
To run the web interface it's "pywallet --web".
Should work then. Otherwise tell me what is written in the console.

JackJackWallet.
Grin
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
JackJackWallet.
legendary
Activity: 1792
Merit: 1008
/dev/null
EDIT: nvm
full member
Activity: 194
Merit: 100
JackWallet sounds nice.  It sounds catchy. Also it's sort of like a car jack is to a car. You use JackWallet to repair your wallet!
I don't think people will value a software to deal with their private keys if its name makes them think about car-jacking.
I'm not an English native though so maybe it's catchy and not scary. If so, could native speakers tell me so?

I don't see a problem with JackWallet but English is not my mother tongue, so you might want to wait for more people to provide you with an answer to your question.


(American) English is my mother tongue, and I agree that JackWallet carries a negative connotation.  I don't want someone to jack my wallet.  "WalletJack" seems less negative, but I'd still stay away from it,
newbie
Activity: 19
Merit: 0
When i try to recover my wallet (comes from thread https://bitcointalksearch.org/topic/recover-corrupted-encrypted-wallet-291333) i get the next error on the web interface:

"Error in dump page"

i have installed python 2.7 and pywallet, i made the web interface working by opening a command mode, and placing my pywallet.py and pywallet.bat files on my desktop (where my wallet.dat is too) and running the next command  from the windows cmd console: "pywallet --info wallet.dat"

i am probably doing something wrong i known Sad
legendary
Activity: 1974
Merit: 1029
Well I'll repeat everything to discard a pebkac.

Done.

Code:
Found 1 possible wallets
Found 472 possible encrypted keys
Found 0 possible unencrypted keys

Private keys not decrypted: 1

Key    1/254 imported:

So now there are 472 - 254 - 1 = 217 keys in limbo. Again, none of the recovered keys matches any of the existing ones. bitcoind doesn't accept the password again.

The "p" in pebkac is either non-existent or really serious Smiley. Let me know if your tests run fine, so I'll make a new wallet and recover it, then I'll send you both files.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Thanks dserrano5 for these tests.
That's strange because it worked on my dev computer. I'll run some tests too as soon as I have access to it again.
It's kinda worrying though.
legendary
Activity: 1974
Merit: 1029
Later I'll do an intersection on the sets keys-in-my-good-wallet versus keys-in-the-recovered-wallet and will report back

Interestingly, this intersection yields 0 keys. pywallet seems to have "recovered" some keys that I've never had in my wallet. Dang, it could have chosen keys with some funds in them! Smiley. Well I'll repeat everything to discard a pebkac.

Ah, another thing worth mentioning:

Code:
$ bitcoind walletpassphrase foobar 10
error: {"code":-14,"message":"Error: The wallet passphrase entered was incorrect."}
$ python pywallet.py --passphrase=foobar --dumpwallet |head
'ecdsa' package is not installed, pywallet won't be able to sign/verify messages
The wallet is encrypted and the passphrase is correct
{
    "bestblock": […]
legendary
Activity: 1974
Merit: 1029
Guessing not many people would test this, I wanted to do it since I read this post. Finally I did it today.


Deleted wallets recovery (encrypted+unencrypted wallet, on Linux+Windows)

Pywallet will go through these steps:
 1. read every byte on the disk to look for keys (sloooooooooow, ~600Mo/min)
 2. create a partial file (in outputdir) so that if you forgot a passphrase but remember it later you don't have to go through step 1 again
 3. test all the passphrases for the most possible (encrypted private key / encryption parameters) pairs
 4. if there are some private keys still not decrypted, YOU chose whether or not you want to test all passphrase with all encryption parameters with all undecrypted private keys

Note that recov_size must be higher than the size of recov_device and that recov_outputdir must exist

Usage examples for Linux and Windows:
Code:
python pywallet_2.1.0b13.py --recover --recov_device /dev/sda --recov_size 30Gio --recov_outputdir /home/jackjack
Code:
python pywallet_2.1.0b13.py --recover --recov_device c: --recov_size 30Gio --recov_outputdir c:\recoveredwalletsfolder

So let's set up a filesystem:

Code:
# dd if=/dev/zero of=/tmp/fs bs=1M count=20
# mkfs.ext3 /tmp/fs
# mount -o loop /tmp/fs /mnt
# chown btc:btc /mnt

Fill it with a bunch of small files, make some room for the wallet, finally copy the wallet inside. This is to increase the chances of it being fragmented:

Code:
$ cp -a $(find /usr/bin -size -30k) /mnt/
cp: writing `/mnt/xwd': No space left on device
[...]
$ rm -f /mnt/{a,c,e,s}*
$ df /mnt/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/loop1               19827     14487      4316  78% /mnt
$ cp .bitcoin/wallet.dat /mnt/
$ df /mnt
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/loop1               19827     17894       909  96% /mnt

Code:
# umount /mnt

Using debugfs I check that in fact the wallet is scattered over a bunch of separated blocks. 30 lines of output in my terminal only to enumerate the blocks Smiley. Well now the fun begins!

Code:
$ cd pywallet
$ grep ^pywversion pywallet.py
pywversion="2.1.4"
$ mkdir /home/btc/enc/pywallet-recov
$ python pywallet.py --recover --recov_device /mnt/fs --recov_size 20Mio --recov_outputdir /home/btc/enc/pywallet-recov
Enter the passphrase for the wallet that will contain all the recovered keys: wow the password is displayed as I type!
Enter the possible passphrases used in your deleted wallets.
Don't forget that more passphrases = more time to test the possibilities.
Write one passphrase per line and end with an empty line.
Possible passphrase: this is displayed too
Possible passphrase:

Starting recovery.

Read 0.0 Go in 0.0 minutes

Found 1 possible wallets
Found 355 possible encrypted keys
Found 0 possible unencrypted keys

Possible wallet #1
    with passphrase #1  ...................................

Private keys not decrypted: 4
Trying all the remaining possibilities (4) might take up to 0 minutes.
Do you want to test them? (y/n): y

Private keys not decrypted: 4
Try another password, check the size of your partition or seek help
The wallet is encrypted and the passphrase is correct


Importing:

Key    1/248 imported:
Address (Bitcoin): 1HvPpmKxmjs…
Privkey (Bitcoin): 5JG5smj…
[…]

The new wallet /home/btc/enc/pywallet-recov/recovered_wallet_1379174268.dat contains the 248 recovered keys

Seems that some keys couldn't be recovered. Maybe they were fragmented but in this case, it's remarkable that only 4 keys were affected.

Code:
$ cd
$ cp enc/pywallet-recov/recovered_wallet_1379174268.dat .bitcoin/wallet.dat
$ nice bitcoind &
$ bitcoind getbalance
0.00000000

Uh oh, this wasn't expected… or maybe was it? My original wallet.dat is 3 Mb while the recovered one is around 100 Kb.

Code:
$ bitcoind stop
$ nice bitcoind -rescan &
$ bitcoind getbalance
0.00000000

The resulting wallet.dat is still 100 Kb. Currently 5 of my keys have some balance so if only 4 were lost I should have at least something, 0.15 BTC in the worst case.

Later I'll do an intersection on the sets keys-in-my-good-wallet versus keys-in-the-recovered-wallet and will report back, but for now I'm done. Here are a couple of suggestions:

  • Passwords are displayed as I type. This shouldn't happen!
  • The output says "Found 355 possible encrypted keys". What's up with the 355(total) - 248(recovered) - 4(lost) = 103 missing ones?
  • The output contains private keys. I'd prefer to have them (partially) censored.
  • pywallet doesn't create the recov_outputdir if it doesn't exist. It should create it, maybe giving a choice to the user.
legendary
Activity: 3472
Merit: 1722
JackWallet sounds nice.  It sounds catchy. Also it's sort of like a car jack is to a car. You use JackWallet to repair your wallet!
I don't think people will value a software to deal with their private keys if its name makes them think about car-jacking.
I'm not an English native though so maybe it's catchy and not scary. If so, could native speakers tell me so?

I don't see a problem with JackWallet but English is not my mother tongue, so you might want to wait for more people to provide you with an answer to your question.

How about JacquesWallet then?

JWallet is already taken and could imply your fork is written in Java so I'm not going to suggest it.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Fixwallet (Gavin's bitcointools) already exists, that's too close IMO

Do you think the organization of the current WUI is logical/easy to use/practical? I mean the division in Dump/Import/Delete/etc tabs
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
WalletFixer
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
why the sudden need for a name change? pywallet is totaly fine and alot of ppl know it this way Wink
https://bitcointalksearch.org/topic/m.3058829 Smiley

JackWallet sounds nice.  It sounds catchy. Also it's sort of like a car jack is to a car. You use JackWallet to repair your wallet!
I don't think people will value a software to deal with their private keys if its name makes them think about car-jacking.
I'm not an English native though so maybe it's catchy and not scary. If so, could native speakers tell me so?
legendary
Activity: 1792
Merit: 1008
/dev/null
why the sudden need for a name change? pywallet is totaly fine and alot of ppl know it this way Wink
legendary
Activity: 3682
Merit: 1580
JackWallet sounds nice.  It sounds catchy. Also it's sort of like a car jack is to a car. You use JackWallet to repair your wallet!
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
If you don't want to name it after yourself, you may name it after me. Hehehe. DabsWallet.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
I don't see what can happen
If the passphrase is bad or if pywallet incorrectly imported the private key, bitcoin-qt will say "corrupt wallet"
But if it doesn't say that and if you rescanned I don't see where could be the problem
Could you post a screenshot of the error?
What does the debug.log say?

Ok - job done but what actually worked was this -

I deleted the wallet.dat and let bitcoin-qt make a new one

I imported the key with pywallet and turned pywallet off

I ran bitcoin-qt -rescan this time - didn't do that last time thanks for reminding me.

After the rescan it came up with the paper wallet balance and I sent the BTC.

I turned off bitcoin-qt and zipped the wallet with crypto and restored the original wallet.

This is a workaround...

I'm glad it worked out!
The new version will allow to create transactions by hand
Pages:
Jump to: