The error message:
btcrecover.py: error: ambiguous option: --password could match --password-repeats-pretypos, --password-repeats-posttypos, --passwordlist
Appears because `btcrecover` is a
recovery tool, not a simple
decryption tool. It's designed to
search for an unknown password from a list of possibilities.
When you type `--password`, the program doesn't know which of its password-searching functions you want to use. Your instruction is a prefix for several more complex recovery commands, like `--passwordlist`. Since it can't guess your intent, it stops and displays the error to avoid running the wrong operation.
You are trying to use a decryption command (providing the known password) on a tool whose default mode is recovery (searching for the password).
The Quick Solution: The Correct Command to DecryptFor what you want to do—decrypt a `wallet.aes.json` file with a password you
already know—you need to use a different set of flags that are specific and unambiguous.
Here is the correct command:
python btcrecover.py --wallet-file wallet.aes.json --dump-wallet wallet_decrypted.txt --correct-wallet-password "your-recovered-password"
Let's break it down:
- --wallet-file wallet.aes.json: Specifies your encrypted wallet file.
- --dump-wallet wallet_decrypted.txt: Tells `btcrecover` to save the decrypted contents (your private keys!) to a new text file named `wallet_decrypted.txt` upon success.
- --correct-wallet-password "your-recovered-password": This is the crucial flag. It explicitly tells the program, "Use this single, exact password to decrypt," bypassing the entire search and recovery engine.
Replace `"your-recovered-password"` with your actual password, and the command will work perfectly.
Step-by-Step Guide for Secure DecryptionIt is
EXTREMELY IMPORTANT to follow good security practices (OpSec) when handling private keys.
1. Go Offline (Air-Gap):The most critical step. Run this process on a computer that is
not connected to the internet (an "air-gapped system"). The moment your wallet is decrypted, your private keys will exist in plain text in the computer's memory and on its disk. If the machine is online, they are vulnerable.
2. Work on a Copy:Never work on your original `wallet.aes.json` file. Always make a copy and work with that copy. This prevents any accidental corruption of your original backup.
3. Run the Command:On your secure, offline computer, transfer `btcrecover` and the
copy of your wallet. Open the terminal/command prompt in the `btcrecover` directory and run the command I provided above.
4. Secure Your Keys:After a successful run, you will have the file `wallet_decrypted.txt`. This file contains your private keys. Import these keys into a new, secure, and functional wallet immediately. After you have confirmed the funds are safe, permanently delete the `wallet_decrypted.txt` file.
For Future Reference: The Real Power of `btcrecover`Now that your immediate problem is solved, it's worth knowing what the commands that caused the confusion are actually for:
- --passwordlist: Is used for dictionary attacks. You provide a text file with thousands of potential passwords, and `btcrecover` tests each one.
- --tokenlist: Is even more powerful. You provide password fragments ("tokens") that you remember, and `btcrecover` combines them into millions of permutations.
- --typos: This flag, combined with others like `--typos-swap` or `--typos-delete`, applies common typing errors (swapping letters, deleting a character, etc.) to your test passwords, massively expanding your search.
These are the
recovery tools that make `btcrecover` so effective when you aren't sure of the password.
Hope this helps solve your issue and gives you a better understanding of this powerful tool!
Good luck!