GithubHelp home page GithubHelp logo

walletool's People

Contributors

akx avatar cclauss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

walletool's Issues

Migrate bsddb3 -> berkeleydb

Hi, Thanks for your work on this. Wanted to report that

  • bsddb3 is deprecated; Python 3.9 is the final minor release line of Python that it'll support
  • bsddb3's final release, 6.2.9, was only tested to work with Berkeley DB 6.2, and empirically fails (see below) with Berkeley DB 18.1.40.
  • Only bsddb3's successor, berkeleydb (also at the page linked above), supports Berkeley DB versions 18.1.x (the current release line)
  • => walletool is difficult to use on systems that "need" to have installed Berkeley DB 18.1.x (e.g., in Homebrew world, 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.

checksum error

\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?

i got a result in other format

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'}>

I still error, can you help me, sir

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

bsddb3.db.DBError: (14, 'Bad address')

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

Wallet.dat compilation

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?

Problem

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

Wont Run

I cant get this to run at all. installed zipfile and bsdd3 and wont run.

i am get error

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?

help me for error -h and -v

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

No Modules named wallet.tool

Running on my m1 Macbook pro OSX 12.5.

Gives a Modules not found error. tested on Python 2.7 and python 3.9 and same error.

Screen Shot 2022-08-03 at 10 16 39 AM

Please help :)

Different outputs

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!

No Response

did run python3 wt_extract_keys.py -d WAL1.dat -v 0 and nothing happend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.