A simple, cross-platform wallet.dat scanner for Bitcoin-family wallets. It is intended for users to scan wallet files on their own machine to gain basic information on the contents of the wallet; balance is displayed where possible. It tries PyWallet for structured dumps when available, and safely falls back to read-only address discovery (Base58 + Bech32 + ETH 0x strings).
- Scans folders recursively for
.dat
and skips duplicate backups by content hash - PyWallet integration with JSON parsing and optional WSL fallback on Windows
- Read-only fallback detection for BTC, LTC, DOGE, PPC, GRC, and ETH
- Balance lookups (best-effort):
- BTC via bitcoinlib services
- LTC/DOGE via chain.so
- PPC via chainz/cryptoid
- Bech32 support for BTC (
bc1…
) and LTC (ltc1…
) - CSV export including balance, dedup count, and first wallet path
From source (recommended for latest fixes):
Windows (PowerShell):
python -m venv .venv
\.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
Linux/macOS (bash):
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
Run the scanner:
python .\Basic_Wallet_Scanner.py --dir <path-to-backups> --csv scan_results.csv
From release zip (prebuilt): download the latest release, extract, create a venv, install requirements, then run the command above.
- Create a virtual environment and install dependencies
Windows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
Linux/macOS (bash):
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
- Run the scanner
python .\Basic_Wallet_Scanner.py --dir \\path\\to\\your\\backups --csv scan_results.csv
If --dir
is omitted, the script will prompt for a folder.
- Review results
- Console output shows discovered addresses grouped by coin
- A
scan_results.csv
is saved (by default to the current working directory)
--dir <folder>
: Folder to scan (recursively) for.dat
--csv <path>
: Output CSV path (default:scan_results.csv
in CWD)--no-balances
: Skip all balance lookups--max-per-coin <N>
: Limit per-coin addresses printed to console per wallet (default 25)--no-wsl
: Disable WSL fallback for running pywallet on Windows
Examples:
# Minimal, prompt for folder
python .\Basic_Wallet_Scanner.py
# Specify folder and write CSV
python .\Basic_Wallet_Scanner.py --dir D:\Backups\Wallets --csv D:\out\scan.csv
# Faster console scanning; skip balances
python .\Basic_Wallet_Scanner.py --dir D:\Backups\Wallets --no-balances
- BTC: Base58 P2PKH/P2SH, Bech32
bc1…
- LTC: Base58 P2PKH/P2SH, Bech32
ltc1…
- DOGE: Base58 P2PKH/P2SH
- PPC (Peercoin): Base58 P2PKH/P2SH
- GRC (Gridcoin): Base58 P2PKH
- ETH: Hex
0x
addresses (detection only; no balances)
Columns:
wallet
: Source file path where the address was first seencoin
: BTC/LTC/DOGE/PPC/GRC/ETHtype
: P2PKH/P2SH/BECH32/HEXaddress
: The discovered address stringbalance
: Numeric when looked up (BTC/LTC/DOGE/PPC); empty otherwisecount
: Number of times this (coin, address) was encountered across all filesfirst_wallet
: The first wallet file in which this address appeared
PyWallet needs Berkeley DB (bsddb). On Windows this is tricky; the script will auto-try WSL if a local run fails with a bsddb error.
Inside WSL (Ubuntu/Debian):
sudo apt update
sudo apt install -y python3-bsddb3
No extra setup is required beyond having WSL installed; the script converts paths and invokes python3
within WSL for the pywallet step.
Developer tests live in tests/
and can be run with pytest:
python -m pip install -r requirements-dev.txt
pytest -q
- PyWallet JSON parse errors: Make sure WSL +
python3-bsddb3
is installed on Windows, or run natively on Linux. - Public API limits: LTC/DOGE/PPC balances use public endpoints and may rate-limit or return empty data. Rerun later or use
--no-balances
. - Very old/alt forks: Address version bytes vary. The fallback will label as
UNKNOWN
if it can’t map a version byte. - No addresses found: Some backups store keys encrypted or in non-standard formats; try the pywallet path on Linux.
- Read-only: The scanner never writes to wallet files or transacts on any network.
- Offline usage: For maximum privacy, run with
--no-balances
to avoid network calls; you’ll still get address discovery and CSV export.
PRs welcome for:
- Additional coin/version mappings and bech32 checksum verification
- More reliable balance providers and optional API key support
- Performance improvements and better CSV/reporting options
Prebuilt zips are published on the GitHub Releases page when a tag like v1.0.0
is pushed.
Contents:
Basic_Wallet_Scanner.py
pywallet/
(as shipped in this repo)README.md
,LICENSE
,requirements.txt
(andrequirements-dev.txt
if present)
Quick run from a release zip:
# 1) Extract zip and open a terminal in its folder
# 2) Create venv and install runtime deps
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
# 3) Run
python .\Basic_Wallet_Scanner.py --dir D:\Backups\Wallets --csv scan_results.csv
- PyWallet by joric — Public Domain (includes portions under MIT and Apache-2 licenses). Repository: https://github.com/joric/pywallet. We vendor
pywallet/pywallet.py
and invoke it for structured wallet dumps when available. See headers inpywallet/pywallet.py
for details.
This project vendors PyWallet (Public Domain) which itself includes components under permissive licenses:
- BitcoinTools (wallet.dat handling) — MIT License — https://github.com/gavinandresen/bitcointools
- python-ecdsa (EC_KEY implementation) — MIT License — https://github.com/warner/python-ecdsa
- SlowAES (AES implementation) — Apache License 2.0 — https://code.google.com/p/slowaes/ (archived)
- Bech32/SegWit reference — Copyright (c) 2017 Pieter Wuille — https://github.com/sipa/bech32
See the attribution comments at the top of pywallet/pywallet.py
for the authoritative list and license notes.
This tool is provided “as is,” without warranty of any kind. Use at your own risk.