Pages:
Author

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

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Yeah much clearer, I'll add that to the next version!
Maybe you didn't understand how to use the arguments and I couldn't blame you
Quote
--datadir=./w --wallet=wallet.dat
This looks for the file ./w/wallet.dat, is it really there?
If it is in the pywallet folder then that would be --datadir=.
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
Got it
Code:
(2, 'No such file or directory')
Now we are getting somewhere Grin
But the file exists in the same folder as pywallet. I'll try messing with some permissions...
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Yes indeed, try this instead
Code:
	try:
r = db.open(walletfile, "main", DB_BTREE, flags)
except DBError as e:
print(e)
r = True
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
Yes, I tried deleting those files and tried the command again, still fails the same (and creates the files again). Now I found out that it behaves the same (and also creates the db files in working folder Shocked) even when I pass a non-existing filename to the --wallet argument.
I see this in the code
Code:
	try:
r = db.open(walletfile, "main", DB_BTREE, flags)
except DBError:
r = True
I don't know python, but is it possible to display any more detailed information about the exception, what exactly failed?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Did you try deleting the __db.00x files?
If pywallet still won't work after deleting those then I don't know what's happening

What you can try is downloading an old Bitcoin-Qt/bitcoin-core release like 0.8, 0.9 or 0.10 from what I can see here: https://en.bitcoin.it/wiki/Bitcoin_Core or https://bitcoin.org/en/version-history
https://github.com/bitcoin/bitcoin/releases?after=v0.11.0
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
Yes, it worked, thank you Smiley
Code:
VERSION=3
format=bytevalue
database=main
type=btree
db_pagesize=8192
HEADER=END
...some hexadecimal lines...
DATA=END
no errors. What should I do next? Smiley
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
The __db.00x files are only internal files for Berkeley DB so not helpful
But yeah you can try the db_dump command (db-utils in apt) on your wallet, it should output a bunch of (sensitive!) hexadecimal data without errors
I just tested with an old wallet of mine, maybe from something like 2013, and it worked as expected
If it works for you then try deleting (backup them if you want but they aren't needed) the __db.00x files
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
I am root and performing these commands in my home folder. I have a subfolder named "w" there, and I am passing it as a datadir to pywallet.
After the command mentioned in my first post errors out, I can see three files appeared inside the "w" folder: __db.001 to __db.003
Maybe I can extract the addresses from them without pywallet?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Ok do you have __db.00x files in the same folder?
Or are you in a read only folder?
I think I remember those can break things
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
Yes, output is:
Code:
wallet.dat: Berkeley DB (Btree, version 9, native byte-order)
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
ň
The actual error is this:
Quote
ERROR:root:Couldn't open wallet.dat/main
And this should not happen if your wallet file is not corrupted, are you sure bitcoin-core can load it?
Or maybe your client is not bitcoin-core but if pywallet worked for you before then I guess it is
The wallet file is really old, from 2014. Back then, I think there was only the full Bitcoin software with full blockchain, no Bitcoin Core. I haven't tried Bitcoin Core with this wallet, as I think it would download entire blockchain which would take a few weeks or so...
I thought they were the same, just renamed, isn't that the case?

Can you run this command to be sure it's the correct format?
Quote
file path/to/wallet.dat
Should be something like "Berkeley DB"
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
ň
The actual error is this:
Quote
ERROR:root:Couldn't open wallet.dat/main
And this should not happen if your wallet file is not corrupted, are you sure bitcoin-core can load it?
Or maybe your client is not bitcoin-core but if pywallet worked for you before then I guess it is
The wallet file is really old, from 2014. Back then, I think there was only the full Bitcoin software with full blockchain, no Bitcoin Core. I haven't tried Bitcoin Core with this wallet, as I think it would download entire blockchain which would take a few weeks or so...
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Hello,
I'd like to dump addresses (not keys) from a wallet.dat file I provide on a command line. The wallet is not encrypted. I don't want to install Bitcoin or download the blockchain.
Pywallet has worked for me in the past, but doesn't now.
Code:
./pywallet.py --dumpwallet --datadir=./w --wallet=wallet.dat
'ecdsa' package is not installed, pywallet won't be able to sign/verify messages
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
I see that jackjack-jj/pywallet is now very, very old - last commit 7 years before.
How to install ecdsa package? The obvious "solutions" from google don't work - pip3 or pip is unrecognized command, and I'm not sure which package from apt to install (but I think this will not solve my problem).
Python version:
Code:
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Any suggestions?
The ecdsa message is only a warning, you don't need to install it
The actual error is this:
Welcome back!!
Thanks  Grin

I created a somewhat "hacky" fork here: https://github.com/HardCorePawn/pywallet

It suppresses the "keymeta" output spam... and ignores other errors in more modern wallet.dat files (from the top of my head, "bestblock" and "hdchain" cause issues, there may be others). Fairly sure that it would break the "recovery" feature, but it makes --dumpwallet work Tongue

Given the large increase in price of BTC, and the obvious surge of "help I have old wallet.dat, how do I get keys/bitcoins!!" type posts that inevitably accompany a bullrun
That's great, I was hoping someone would do this!
All the help needed is actually part of the reason why I'm back, I was getting more and more emails asking for help

it would be useful to have:
- updated Pywallet that works "properly" with newer wallet.dat files and doesn't just suppress/ignore errors
- Python 3 compatibility would be a bonus, as Python 2 is now completely unsupported
These 2 are a must, plus these:
- clean that crazy source code, there's no reason for it to be 5000 lines long and to be that ugly
- change the --datadir and --wallet arguments
- kill (for now) the web interface and remove the twisted dependency (that would help reducing the code by the way)
- be more explicit about ecdsa being only optional

HCP
legendary
Activity: 2086
Merit: 4363
Hi all
I've been away for some time, many things have changed since then and Pywallet doesn't work anymore with wallets that are too recent
Are there still some users and is a fixed version needed?
I also remember that some things were broken or at least ugly, I may tidy things up if the demand is there
I created a somewhat "hacky" fork here: https://github.com/HardCorePawn/pywallet

It suppresses the "keymeta" output spam... and ignores other errors in more modern wallet.dat files (from the top of my head, "bestblock" and "hdchain" cause issues, there may be others). Fairly sure that it would break the "recovery" feature, but it makes --dumpwallet work Tongue

Given the large increase in price of BTC, and the obvious surge of "help I have old wallet.dat, how do I get keys/bitcoins!!" type posts that inevitably accompany a bullrun, it would be useful to have:
- updated Pywallet that works "properly" with newer wallet.dat files and doesn't just suppress/ignore errors
- Python 3 compatibility would be a bonus, as Python 2 is now completely unsupported
Mek
jr. member
Activity: 72
Merit: 6
mtc.mekweb.eu - mega transistor clock
Hello,
I'd like to dump addresses (not keys) from a wallet.dat file I provide on a command line. The wallet is not encrypted. I don't want to install Bitcoin or download the blockchain.
Pywallet has worked for me in the past, but doesn't now.
Code:
./pywallet.py --dumpwallet --datadir=./w --wallet=wallet.dat
'ecdsa' package is not installed, pywallet won't be able to sign/verify messages
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
I see that jackjack-jj/pywallet is now very, very old - last commit 7 years before.
How to install ecdsa package? The obvious "solutions" from google don't work - pip3 or pip is unrecognized command, and I'm not sure which package from apt to install (but I think this will not solve my problem).
Python version:
Code:
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Any suggestions?
FNT
jr. member
Activity: 75
Merit: 6
I've been away for some time, many things have changed since then and Pywallet doesn't work anymore with wallets that are too recent

Welcome back!!
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Hi all
I've been away for some time, many things have changed since then and Pywallet doesn't work anymore with wallets that are too recent
Are there still some users and is a fixed version needed?
I also remember that some things were broken or at least ugly, I may tidy things up if the demand is there
HCP
legendary
Activity: 2086
Merit: 4363
Could you please advice without passphrase how can recover "secret" key.
You've been told several times... This is impossible!

If a passphrase was set, the "secret" wallet data (ie. private keys) has been encrypted using AES-256-CBC. If the passphrase was relatively complex (ie. 10+ 'random' chars using characters+numbers+symbols) and you have no idea what it was, then you can't possibly hope to bruteforce it.

However, if you have "some" idea of what the passphrase may have been (or you know 100% that it was relatively short or "simple"), you could potentially use "hashcat" and try to bruteforce the passphrase...

I would suggest using google to search for "hashcat bitcoin core"... alternatively, contact Dave @ walletrecoveryservices.com. They've been doing that sort of thing for a long time, have had a lot of success and have a good reputation. I believe that their standard fee is 20%. You can read their forum post here: https://bitcointalksearch.org/topic/bitcoin-wallet-recovery-services-for-forgotten-wallet-password-240779
newbie
Activity: 24
Merit: 0
Yes, i know, but how i can see the Code? I use otherversion =30, in other forums they said os dogecoin, but the results is the same
Maybe is another code dogecoin?
Are you sure you did it right? What is the commandline you are typing in? I just did this:

Code:
pywallet.py --dumpwallet --datadir=E:\PyTest --otherversion=30 --passphrase=my5uper5ecretP@55w0rd > walletdump.txt

A copy of my dogecoin wallet.dat was in "E:\PyTest" directory... aside from a bunch of "Wallet data not recognized: {'__type__': 'keymeta', '__value__': '" errors dumped at the beginning... walletdump.txt contained all my Dogecoin addresses like this:

Quote
        {
            "addr": "DCAA7yVbqr4THDXGQ2tXJecjshSJ2JVrnr",
            "compressed": true,
            "encrypted_privkey": "BIG_LONG_HEX_STRING1",
            "hexsec": "BIG_LONG_HEX_STRING2",
            "label": "",
            "pubkey": "BIG_LONG_HEX_STRING3",
            "reserve": 0,
            "sec": "BIG_LONG_HEX_STRING4",
            "secret": "BIG_LONG_HEX_STRING5"
        },

You can see that the addr value starts with "D" like Dogecoin addresses are supposed to... and it dumped the "sec" (aka the private key) as a "Q" which is the right format for a "compressed" Dogecoin address.

Or are you having issues with the --recover mode? Huh


Dear Sir,
I would like to inform you that as per your command line 100% correct. Could you please advice without passphrase how can recover "secret" key. Any solution yet; if you find the solution I will donate my 50% BTC to your account. So please reply as following email: [email protected]
newbie
Activity: 24
Merit: 0
Pages:
Jump to: