blockchain2john.py handling of old Base64 wallets is prone to user error
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
See #4872
$ ../run/blockchain2john.py -h
usage: ../run/blockchain2john.py [blockchain wallet files]
optional arguments:
-h, --help show this help message and exit
--json is the wallet using v2 format?
--base64 does the wallet contain only a base64 string?
The problem with the --base64 option (for very old version wallets) is that if you don't give it where needed, you still get output that looks like a perfectly fine hash, but is uncrackable.
We don't seem to have any blockchain wallets in https://github.com/openwall/john-samples, maybe a first step is adding some (hopefully from https://github.com/gurnec/btcrecover/tree/master/btcrecover/test/test-wallets).
Then, see if we can implement a trivial check for whether a file is 100% Base-64 (while also not a too small subset of it) and either automagically infer the --base64 option, or at least print a warning.
While at it, we could possibly implement logic for auto-detecting json as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with run/blockchain2john.py and the behavior described in #4872, then review available wallet samples from john-samples and the referenced btcrecover test-wallets. Determine how old Base64 wallets and JSON wallets can be identified, and make completion observable through correct handling or a clear warning when --base64 is omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- blockchain, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100