akx / walletool Goto Github PK
View Code? Open in Web Editor NEWa tool for reading wallet.dat files
a tool for reading wallet.dat files
Hi, Thanks for your work on this. Wanted to report that
vim
depends on perl
depends on berkeley-db
)Workaround for macOS homebrew: brew install berkeley-db@4
, a different formula that can be installed alongside berkeley-db
. Then do something like
% BERKELEYDB_DIR=/usr/local/Cellar/berkeley-db@4/4.8.30 pip install bsddb3===6.2.9
Collecting bsddb3===6.2.9
Using cached bsddb3-6.2.9.tar.gz (230 kB)
Using legacy 'setup.py install' for bsddb3, since package 'wheel' is not installed.
Installing collected packages: bsddb3
Running setup.py install for bsddb3 ... done
Successfully installed bsddb3-6.2.9
Example below, from my attempts on running on macOS:
% pip install bsddb3===6.2.9
Collecting bsddb3===6.2.9
Using cached bsddb3-6.2.9.tar.gz (230 kB)
ERROR: Command errored out with exit status 1:
command: /Users/ssw/.pyenv/versions/3.9.4/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-eanky500/bsddb3_16d389d6a4d44d0fa5267086b17faeec/setup.py'"'"'; __file__='"'"'/private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-eanky500/bsddb3_16d389d6a4d44d0fa5267086b17faeec/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-pip-egg-info-g_pi460g
cwd: /private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-eanky500/bsddb3_16d389d6a4d44d0fa5267086b17faeec/
Complete output (2 lines):
Can't find a local Berkeley DB installation.
(suggestion: try the --berkeley-db=/path/to/bsddb option)
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f0/24/92034482656945fc6ceb10551222b43a0ff8d0c87e15839120487820067e/bsddb3-6.2.9.tar.gz#sha256=70d05ec8dc568f42e70fc919a442e0daadc2a905a1cfb7ca77f549d49d6e7801 (from https://pypi.org/simple/bsddb3/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement bsddb3===6.2.9
ERROR: No matching distribution found for bsddb3===6.2.9
Then I googled a bit, and found how to effectively pass that option via environment variable:
% BERKELEYDB_DIR=/usr/local/Cellar/berkeley-db/18.1.40 pip install bsddb3===6.2.9
Collecting bsddb3===6.2.9
Using cached bsddb3-6.2.9.tar.gz (230 kB)
ERROR: Command errored out with exit status 1:
command: /Users/ssw/.pyenv/versions/3.9.4/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-8e8zt5db/bsddb3_a8250a56b2774fd697c0d453d1bd8b89/setup.py'"'"'; __file__='"'"'/private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-8e8zt5db/bsddb3_a8250a56b2774fd697c0d453d1bd8b89/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-pip-egg-info-e5951msm
cwd: /private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-8e8zt5db/bsddb3_a8250a56b2774fd697c0d453d1bd8b89/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-8e8zt5db/bsddb3_a8250a56b2774fd697c0d453d1bd8b89/setup.py", line 42, in <module>
import setup3
File "/private/var/folders/bb/zz6yzy3154b3py7_qq2xv5kc0000gn/T/pip-install-8e8zt5db/bsddb3_a8250a56b2774fd697c0d453d1bd8b89/setup3.py", line 354, in <module>
db_ver = (int(fullverstr[0]), int(fullverstr[2]))
ValueError: invalid literal for int() with base 10: '.'
Trying to use the Berkeley DB you specified...
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f0/24/92034482656945fc6ceb10551222b43a0ff8d0c87e15839120487820067e/bsddb3-6.2.9.tar.gz#sha256=70d05ec8dc568f42e70fc919a442e0daadc2a905a1cfb7ca77f549d49d6e7801 (from https://pypi.org/simple/bsddb3/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement bsddb3===6.2.9
ERROR: No matching distribution found for bsddb3===6.2.9
Final note: I'm unsure if my workaround is actually working, because when running
python wt_extract_keys.py -d ~/Desktop/wallet.dat -v 30
nothing is being written to stdout or stderr, and exit status is 0. TBD what the problem is.
\Python36\walletool-master\walletool\wallet_files.py", line 16, in read_wallet_dat
d.open(filename, 'main', db.DB_BTREE, db.DB_THREAD | db.DB_RDONLY)
bsddb3.db.DBInvalidArgError: (22, 'Invalid argument -- BDB0210 E:\Python36\walletool-master\R.DAT: metadata page checksum error')
reason there is a checksum error?
how to resolve thisi am getting this after running walletool <ckey item: {'public_key': b'\x02\x10\xf2\xf8\xfdH\xe0P\x89>\xfa\x05\xf6\x80w=|\xdc\xeb/q.\x9b\xf0\xec\xb1\xe0k\x1a\xa3\xab\x81\xad', 'encrypted_private_key': b'P67\xe8=u\x06\xb9Os+\x92\xe6\xf3TU\xcfn,b\xc2\xf8\xa7\x84d\x02\xf79#n\x8b\x9fZ\x8a\x16a\xed\x1d\xc6\xa4q\xbf\xc1\xaab\xa6\x12\xa6'}>
C:\Users\xxx\AppData\Local\Programs\Python\Python37\python.exe: Error while finding module specification for 'wt_extract_keys.py' (ModuleNotFoundError: path attribute not found on 'wt_extract_keys' while trying to find 'wt_extract_keys.py')
tks
Traceback (most recent call last):
File "D:\Personal\bitcoin\walletool-master\walletool-master\wt_extract_keys.py", line 31, in
main()
File "D:\Personal\bitcoin\walletool-master\walletool-master\wt_extract_keys.py", line 19, in main
w_data = read_wallet_dat(args.filename)
File "D:\Personal\bitcoin\walletool-master\walletool-master\walletool\wallet_files.py", line 16, in read_wallet_dat
d.open(filename, 'main', db.DB_BTREE, db.DB_THREAD | db.DB_RDONLY)
bsddb3.db.DBError: (14, 'Bad address')
Getting the following error. please help
Is it possible to set my DeriveIterations value, and not the random generated Bitcoin Core from the passphrase, and which string is responsible for this in the wallet.dat?
Traceback (most recent call last):
File "/home/kali/walletool/wt_extract_keys.py", line 31, in
main()
File "/home/kali/walletool/wt_extract_keys.py", line 19, in main
w_data = read_wallet_dat(args.filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/walletool/walletool/wallet_files.py", line 7, in read_wallet_dat
from bsddb3 import db
ModuleNotFoundError: No module named 'bsddb3'
please give solution
I cant get this to run at all. installed zipfile and bsdd3 and wont run.
kali@kali:~/Desktop/walletool-master$ python wt_extract_keys.py -d wallet.dat -v 0
Traceback (most recent call last):
File "wt_extract_keys.py", line 3, in
from walletool.wallet_items import parse_wallet_dict, KeyWalletItem
File "/home/kali/Desktop/walletool-master/walletool/wallet_items.py", line 5, in
from walletool.bc_data_stream import BCDataStream
File "/home/kali/Desktop/walletool-master/walletool/bc_data_stream.py", line 4, in
assert sys.version_info[0] == 3 # TODO: Use six for 2/3 compat
AssertionError
Why not work?
D:\walletool-master>wt_extract_keys.py -d wallet.dat -v 0
usage: wt_extract_keys.py [-h] -d FILENAME -v VERSION
wt_extract_keys.py: error: the following arguments are required: -d/--dat, -v/--
version
help me sir,
when I run it appears an error
Hi,
Thanks for this tool!
There's one thing I don't quite get. When I dump wallet.dat using Bitcoin Core, the resulting addresses and keys start, respectively, with bc1 (address) and L (privkey). However, when I extract privkeys from the same .dat file using Walletool, the corresponding addresses and private keys all start with 1 (address) and 5 (privkey).
Can somebody explain this mismatch to me? Is there some kind of conversion going on? Does it affect anything?
Thanks!
Can you give a sample code for extracting the master key from unencrypted bitcoin core wallet
did run python3 wt_extract_keys.py -d WAL1.dat -v 0
and nothing happend
Hi,
is there an option to add feature to read Smartcash wallet.dat file?
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.