### Install Passlib from Source Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/install.rst Install Passlib by cloning the source code and running the setup script. ```bash python setup.py install ``` -------------------------------- ### Install BTCRecover and dependencies Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/linux/SKILL.md Install system prerequisites, clone the repository, set up a virtual environment, and install Python dependencies. ```bash # Prereqs (install all of these — python3-tk and libffi-dev are required) sudo apt update sudo apt install -y python3 python3-pip python3-venv python3-tk libffi-dev git # Clone git clone https://github.com/3rdIteration/btcrecover.git cd btcrecover # Virtual environment (preferred; avoids externally-managed-environment error) python3 -m venv venv source venv/bin/activate python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt # Validate (mandatory — confirms the install actually works) python3 btcrecover.py --help python3 seedrecover.py --help ``` -------------------------------- ### Install ECPy from tarball Source: https://github.com/3rditeration/btcrecover/blob/master/lib/ecpy/README.rst Install ECPy by downloading and extracting the distribution tarball, then running the setup script. ```bash tar xzvf ECPy-M.m.tar.gz ``` ```bash python3 setup.py install ``` -------------------------------- ### Install ECPy from source Source: https://github.com/3rditeration/btcrecover/blob/master/lib/ecpy/README.rst Install ECPy by cloning the git repository, rebuilding the tarball, and then installing it. ```bash python3 setup.py sdist ``` -------------------------------- ### Install Documentation Dependencies Source: https://github.com/3rditeration/btcrecover/blob/master/docs/local_mkdocs.md Installs the necessary Python packages for running the documentation locally. Ensure Python is installed first. ```bash pip3 install -r ./docs/requirements.txt ``` -------------------------------- ### Quick Start with custom_app_context Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/narr/quickstart.rst Use the preconfigured `custom_app_context` for a fast setup. It supports SHA256 and SHA512 crypt with default iterations, and a stronger setting for admin accounts. ```python from passlib.apps import custom_app_context as pwd_context hash = pwd_context.hash("somepass") ok = pwd_context.verify("somepass", hash) hash = pwd_context.hash("somepass", category="admin") ``` -------------------------------- ### Clone and install BTCRecover Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/termux/SKILL.md Download the repository and install the base Python dependencies. ```bash git clone https://github.com/3rdIteration/btcrecover.git cd btcrecover pip install --upgrade pip pip install -r requirements.txt # Validate python btcrecover.py --help python seedrecover.py --help ``` -------------------------------- ### Run Unit Tests Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/_static/manuals.install.rst Execute the library's unit tests to verify the installation and development environment setup. ```bash python setup.py test ``` -------------------------------- ### Validate installation Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/macos/SKILL.md Run the help commands or the full test suite to ensure the installation is functional. ```bash python3 btcrecover.py --help python3 seedrecover.py --help For full feature validation: python3 run-all-tests.py -vv ``` -------------------------------- ### Install BTCRecover via terminal Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/macos/SKILL.md Perform a clean installation using Homebrew, cloning the repository, and setting up a virtual environment. ```bash # Prereqs (Homebrew Python required; do not use system Python for packages) brew install python git # Clone git clone https://github.com/3rdIteration/btcrecover.git cd btcrecover # Virtual environment (REQUIRED on macOS) python3 -m venv venv source venv/bin/activate # Base requirements python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt # Validate python3 btcrecover.py --help python3 seedrecover.py --help ``` -------------------------------- ### Missing Module Warnings Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/basic_wallet_scanning.md Example warnings displayed when optional dependencies for specific wallet types are not installed. ```text [WARNING] Module missing: BitGo wallets may not be detected/loaded (pip3 install sjcl). [WARNING] Module missing: Toast wallets may not be detected/loaded (pip3 install PyNaCl). ``` -------------------------------- ### Install Full Wallet Support Packages Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md Installs additional packages for comprehensive wallet support. This may require installing extra software for building these packages. ```bash pip3 install -r requirements-full.txt ``` -------------------------------- ### Clone and install BTCRecover Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/windows/SKILL.md Standard procedure to clone the repository, create a virtual environment, and install base requirements. ```powershell # Clone git clone https://github.com/3rdIteration/btcrecover.git cd btcrecover # Virtual environment (recommended) python -m venv venv .\venv\Scripts\Activate.ps1 # Base requirements python -m pip install --upgrade pip python -m pip install -r requirements.txt # Validate python btcrecover.py --help python seedrecover.py --help ``` -------------------------------- ### Install cashaddress Library Source: https://github.com/3rditeration/btcrecover/blob/master/lib/cashaddress/README.md Install the library and its dependencies using pip. ```bash pip install cashaddress ``` -------------------------------- ### Install Scrypt on Windows Source: https://github.com/3rditeration/btcrecover/blob/master/lib/opencl_brute/README.md Install the scrypt library for Python on Windows using pip. ```bash python -m pip install scrypt ``` -------------------------------- ### Install Basic Requirements Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md Installs the core packages needed for Bitcoin and Ethereum wallet recovery. Use `--break-system-packages` if you encounter environment management errors. ```bash pip3 install -r requirements.txt ``` ```bash pip3 install -r requirements.txt --break-system-packages ``` -------------------------------- ### Install Bitcoin Library Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib/README.rst Install the necessary packages for the Bitcoin library using apt and pip. ```bash sudo apt install build-essential python3-dev libgmp3-dev ``` ```bash pip install bitcoinlib ``` -------------------------------- ### Install system prerequisites Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/termux/SKILL.md Update package lists and install essential build tools and libraries required for Python and cryptography. ```bash pkg update pkg install -y python git libsodium libffi clang ``` -------------------------------- ### Install Rust for Apple Silicon Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/macos/SKILL.md Install Rust via Homebrew if the full requirements installation fails on Apple Silicon hardware. ```bash brew install rust python3 -m pip install -r requirements-full.txt ``` -------------------------------- ### Install python-progressbar using pip Source: https://github.com/3rditeration/btcrecover/blob/master/lib/progressbar/README.md Install the module from PyPI using pip. This is the recommended method for most users. ```bash pip install progressbar33 ``` -------------------------------- ### Install PyOpenCL on Ubuntu Linux Source: https://github.com/3rditeration/btcrecover/blob/master/docs/GPU_Acceleration.md Install the PyOpenCL library using apt for Ubuntu. If APT packages are outdated, consider installing via pip. ```bash sudo apt install python3-pyopencl ``` -------------------------------- ### Install PyOpenCL on Windows Source: https://github.com/3rditeration/btcrecover/blob/master/lib/opencl_brute/README.md Install PyOpenCL using a pre-compiled wheel file for Windows. Ensure you have Python 3.7 64-bit and the correct OpenCL driver installed. ```bash python -m pip install pyopencl-2018.2.1+cl12-cp37-cp37m-win_amd64.whl ``` -------------------------------- ### Test BTCRecover Installation Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md Runs all tests to verify that BTCRecover is installed correctly and all features are ready for use. This process may take a few minutes. ```bash python run-all-tests.py -vv ``` -------------------------------- ### Install pandoc for release builds Source: https://github.com/3rditeration/btcrecover/blob/master/lib/eth_hash/README.md Install the pandoc utility on Debian-like systems, which may be required for release builds. ```sh apt install pandoc ``` -------------------------------- ### Install ECPy using pip Source: https://github.com/3rditeration/btcrecover/blob/master/lib/ecpy/README.rst Install the ECPy library from PyPI using pip. ```bash pip install ECPy ``` -------------------------------- ### Bitcoin Node Configuration Example Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/_static/manuals.setup-bitcoind-connection.rst This is an example of a bitcoin.conf file for testnet, showing necessary RPC settings. For mainnet, use port 8332 and remove 'testnet=1'. ```text [rpc] rpcuser=bitcoinrpc rpcpassword=some_long_secure_password server=1 port=18332 txindex=1 testnet=1 ``` -------------------------------- ### Check for existing installation Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/macos/SKILL.md Verify if BTCRecover is already installed by checking the help output of the main scripts. ```bash python3 btcrecover.py --help python3 seedrecover.py --help ``` -------------------------------- ### Install targeted extras Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/macos/SKILL.md Install specific dependencies based on the wallet type required for recovery. ```bash pip install "shamir-mnemonic[cli]" pip install ecdsa pip install eth-keyfile pip install groestlcoin-hash pip install py-crypto-hd-wallet ``` -------------------------------- ### Install Block.io Python Package Source: https://github.com/3rditeration/btcrecover/blob/master/lib/block_io/README.md Install the package using pip3. Using a virtual environment is recommended. ```bash pip3 install block-io ``` -------------------------------- ### Install WalletFinder Dependencies Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/basic_wallet_scanning.md Install the required Python packages for WalletFinder. Use the --break-system-packages flag if operating in an externally managed environment. ```bash pip3 install -r requirements-walletfinder.txt ``` ```bash pip3 install -r requirements-walletfinder.txt --break-system-packages ``` -------------------------------- ### Install python-progressbar from GitHub Source: https://github.com/3rditeration/btcrecover/blob/master/lib/progressbar/README.md Install the latest version directly from the GitHub repository using pip. This is useful for developers who want the most recent changes. ```bash pip install git+https://github.com/germangh/python-progressbar ``` -------------------------------- ### Install Passlib with Optional Extras Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/install.rst Install Passlib with specific optional dependencies for features like Argon2, BCrypt, or TOTP support. ```bash pip install passlib[argon2] ``` ```bash pip install passlib[bcrypt] ``` ```bash pip install passlib[totp] ``` -------------------------------- ### Example Tokenlist File Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/2020-10-06_Multi-GPU_with_vastai/Example_Multi-GPU_with_vastai.md This is a sample tokenlist file used for password recovery. Each line represents a token to be used in password combinations. The example provided is simple and designed to test all combinations towards the end of the run. ```text {% include "./tokenListTest.txt" %} ``` -------------------------------- ### Vast.ai Instance On-Start Script Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/2020-10-06_Multi-GPU_with_vastai/Example_Multi-GPU_with_vastai.md This script installs necessary dependencies, clones BTCRecover, and prepares the environment on a Vast.ai instance. ```bash apt update apt install python3 python3-pip python3-dev python3-pyopencl nano mc git python3-bsddb3 -y apt install libssl-dev build-essential automake pkg-config libtool libffi-dev libgmp-dev libyaml-cpp-dev libsecp256k1-dev -y git clone https://github.com/3rdIteration/btcrecover.git pip3 install -r ~/btcrecover/requirements-full.txt update-locale LANG=C.UTF-8 echo "set -g terminal-overrides \"xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@\"" > ~/.tmux.conf ``` -------------------------------- ### Install Staking-Deposit CLI from Source Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md This command installs the staking-deposit-cli module directly from its GitHub repository. It's necessary for Eth2 Validator Seed Recovery and may require specific Python versions if build errors occur. ```bash pip3 install git+https://github.com/ethereum/staking-deposit-cli.git@v2.5.0 ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/3rditeration/btcrecover/blob/master/docs/local_mkdocs.md Starts the MkDocs development server to view the documentation in a web browser. Access it at http://127.0.0.1:8000. ```bash mkdocs serve ``` -------------------------------- ### Wallet Scan Output Example Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/basic_wallet_scanning.md Sample console output showing detected wallet files, their types, and a summary of the scan results. ```text Scanning for wallet files in: C:\Users\You\Documents WalletBitcoinCore [definite] C:\Users\You\Documents\bitcoincore-wallet.dat WalletBlockchain [definite] C:\Users\You\Documents\blockchain-v4.0-wallet.aes.json WalletElectrum2 [definite] C:\Users\You\Documents\electrum2-wallet WalletMetamask [definite] C:\Users\You\Documents\metamask_vault Summary: Files scanned: 156 Wallets found: 4 Breakdown: WalletBitcoinCore: 1 WalletBlockchain: 1 WalletElectrum2: 1 WalletMetamask: 1 ``` -------------------------------- ### Install libffi-dev Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md If your installation fails to build cffi, you may need to install the libffi-dev package. This is a common requirement on some Linux systems. ```bash sudo apt install libffi-dev ``` -------------------------------- ### Install PyOpenCL on Windows/MacOS Source: https://github.com/3rditeration/btcrecover/blob/master/docs/GPU_Acceleration.md Use this command to install PyOpenCL and its dependencies via pip. Ensure you have the correct GPU drivers installed first. ```bash pip3 install pyopencl ``` -------------------------------- ### Initialize and Run Evaluation Suite Source: https://github.com/3rditeration/btcrecover/blob/master/utilities/skill_eval/README.md Commands to prepare a custom suite configuration and execute the evaluation runner. ```bash cp utilities/skill_eval/example_suite.json my_suite.json # edit my_suite.json: set base_url / api_key, enable the runs you want ``` ```bash python utilities/skill_eval/run_eval_suite.py my_suite.json ``` -------------------------------- ### Install Rust on MacOS Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md Installs the Rust programming language toolchain on MacOS, which is required for building some of BTCRecover's full requirements. After installation, close and reopen your terminal. ```bash curl https://sh.rustup.rs -sSf | sh ``` -------------------------------- ### Basic Usage Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/lib/passlib.hash.sha256_crypt.rst Demonstrates how to generate a new salt and hash a password using the default settings, and how to verify a password against a hash. ```APIDOC ## Basic Usage This section shows the most common use cases for `sha256_crypt`: ### Hashing a password ```python from passlib.hash import sha256_crypt # generate new salt, hash password hash = sha256_crypt.hash("password") print(hash) # Output: $5$rounds=80000$wnsT7Yr92oJoP28r$cKhJImk5mfuSKV9b3mumNzlbstFUplKtQXXMo4G6Ep5 ``` ### Hashing with explicit rounds ```python # same, but with explict number of rounds hash_custom_rounds = sha256_crypt.using(rounds=12345).hash("password") print(hash_custom_rounds) # Output: $5$rounds=12345$q3hvJE5mn5jKRsW.$BbbYTFiaImz9rTy03GGi.Jf9YY5bmxN0LU3p3uI1iUB ``` ### Verifying a password ```python # verify password print(sha256_crypt.verify("password", hash)) # Output: True print(sha256_crypt.verify("letmein", hash)) # Output: False ``` ``` -------------------------------- ### btcrecover Help Command Source: https://github.com/3rditeration/btcrecover/blob/master/docs/TUTORIAL.md Running btcrecover.py with the --help option provides a summary of all available command-line options. ```bash btcrecover.py --help ``` -------------------------------- ### Test New Provider and Service Class Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/_static/manuals.add-provider.rst This Python code demonstrates how to instantiate the Service class with the new provider and test one of its methods, 'estimatefee'. Ensure the 'install.log' file is removed for settings to be reloaded. ```python from bitcoinlib import services srv = Service(providers=['blockchair']) print(srv.estimatefee(5)) ``` -------------------------------- ### Install py_ecc Module Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md This command installs the py_ecc module, which is a dependency for the staking-deposit-cli module. ```bash pip3 install py_ecc ``` -------------------------------- ### Install coincurve for Python 3.14 Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md Manually installs coincurve version 20.0.0 before installing other requirements, to bypass a bug in coincurve 21 that prevents building from source on Python 3.14 or platforms without pre-built wheels. ```bash pip3 install coincurve==20.0.0 ``` ```bash pip3 install -r requirements.txt ``` -------------------------------- ### Install Full Requirements on Termux Source: https://github.com/3rditeration/btcrecover/blob/master/docs/INSTALL.md Installs all BTCRecover requirements, including those that need to be built from source on Termux. This process requires setting environment variables and installing `maturin` and specific packages without build isolation. ```bash export ANDROID_API_LEVEL=24 export SODIUM_INSTALL=system pip install maturin --no-binary maturin pip install py-sr25519-bindings==0.2.3 --no-build-isolation pip install -r requirements-full.txt ``` -------------------------------- ### Create or open a Bitcoin testnet wallet Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/bitcoinlib-10-minutes.ipynb Use `wallet_create_or_open()` to create a new wallet or open an existing one. This example creates a segwit wallet on the testnet network and prints a deposit address. ```python from bitcoinlib.wallets import wallet_create_or_open w = wallet_create_or_open('bitcoinlib-testnet1', network='testnet', witness_type='segwit') wk = w.new_key() print("Deposit to address %s to get started" % wk.address) ``` -------------------------------- ### Install bech32 Package Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bech32/README.md Use pip to install the bech32 package for use in your Python projects. ```bash pip install bech32 ``` -------------------------------- ### Install targeted extras Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/termux/SKILL.md Install specific dependencies for additional wallet types not covered by the base requirements. ```bash pip install "shamir-mnemonic[cli]" pip install ecdsa pip install eth-keyfile ``` -------------------------------- ### Basic Token List Example Source: https://github.com/3rditeration/btcrecover/blob/master/docs/tokenlist_file.md A simple token file with three tokens, each on a new line. btcrecover will try all combinations of these tokens. ```text Cairo Beetlejuice Hotel_california ``` -------------------------------- ### Inspect Available Settings Keywords Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/narr/hash-tutorial.rst Shows how to programmatically check the configurable settings for a given hash algorithm. ```python pbkdf2_sha256.settings_kwds ('salt', 'salt_size', 'rounds') ``` -------------------------------- ### Install Passlib with Pip Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/install.rst Use this command to install the Passlib library from the Python Package Index (PyPI). ```bash pip install passlib ``` -------------------------------- ### Install eth-hash with pycryptodome backend Source: https://github.com/3rditeration/btcrecover/blob/master/lib/eth_hash/docs/quickstart.md Install the eth-hash library with the pycryptodome backend. This is recommended if you are using PyPy3. ```shell pip install eth-hash[pycryptodome] ``` -------------------------------- ### Validate installation Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/windows/SKILL.md Run help commands or the full test suite to ensure the environment is correctly configured. ```powershell python btcrecover.py --help python seedrecover.py --help For full feature validation: python run-all-tests.py -vv ``` -------------------------------- ### Run Test with AddressDB Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Creating_and_Using_AddressDB.md Example command to run a test using a pre-generated AddressDB. Specify the path to the AddressDB, wallet type, and other recovery parameters. ```bash python seedrecover.py --no-dupchecks --addr-limit 2 --bip32-path "m/44'/28'/1'/0" --big-typos 1 --addressdb ./btcrecover/test/test-addressdbs/addresses-VTC-Test.db --wallet-type bip39 ``` -------------------------------- ### Install Python Requirements for Development Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/_static/manuals.install.rst Install Python development dependencies from the requirements-dev.txt file after cloning the repository. ```bash pip install -r requirements-dev.txt ``` -------------------------------- ### Set up Python virtual environment Source: https://github.com/3rditeration/btcrecover/blob/master/lib/eth_hash/README.md Create and activate a Python 3 virtual environment for development. This isolates project dependencies. ```sh cd eth-hash virtualenv -p python3 venv . venv/bin/activate ``` -------------------------------- ### Install BitcoinLib with pip Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/_static/manuals.install.rst Use this command to install the BitcoinLib package directly from the Python Package Index. ```none $ pip install bitcoinlib ``` -------------------------------- ### Run btcrecover on Windows Source: https://github.com/3rditeration/btcrecover/blob/master/docs/TUTORIAL.md Execute the btcrecover script from the command prompt on Windows. Ensure you are in the correct directory and specify your wallet file and token list. ```bash cd Downloads\btcrecover-master python btcrecover.py --wallet wallet.dat --tokenlist tokens.txt [other-options...] ``` -------------------------------- ### Example Tokenlist Usage Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/2020-05-23_multi_device_descrambling_12_word_seed_with_extras/Example_multi_device_descrambling_12_word_seed_with_extras.md This snippet shows how to include a tokenlist file for word suggestions during the recovery process. Ensure the path to the tokenlist is correct. ```text {% include "./tokenlist.txt" %} ``` -------------------------------- ### Check for existing BTCRecover installation Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/windows/SKILL.md Verify if the application is already installed by checking the help output of the main scripts. ```powershell python btcrecover.py --help python seedrecover.py --help ``` -------------------------------- ### Basic Usage Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/lib/passlib.hash.bcrypt.rst Demonstrates how to generate a BCrypt hash and verify a password. ```APIDOC ## Basic Usage ### Description Demonstrates how to generate a BCrypt hash and verify a password. ### Method N/A (SDK Usage) ### Code Example ```python from passlib.hash import bcrypt # generate new salt, hash password h = bcrypt.hash("password") print(h) # verify password print(bcrypt.verify("password", h)) print(bcrypt.verify("wrong", h)) ``` ### Response Example ``` $2a$12$NT0I31Sa7ihGEWpka9ASYrEFkhuTNeBQ2xfZskIiiJeyFXhRgS.Sy True False ``` ``` -------------------------------- ### Install full requirements Source: https://github.com/3rditeration/btcrecover/blob/master/skills/install-btcrecover/termux/SKILL.md Use this command when the base requirements are insufficient, ensuring libsodium is linked correctly. ```bash SODIUM_INSTALL=system pip install -r requirements-full.txt ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/README.rst Clone the bitcoinlib repository from GitHub and install development dependencies using pip. ```bash $ git clone https://github.com/1200wd/bitcoinlib.git $ cd bitcoinlib $ pip install -r requirements-dev.txt ``` -------------------------------- ### SCrypt Usage Examples Source: https://github.com/3rditeration/btcrecover/blob/master/lib/passlib/docs/lib/passlib.hash.scrypt.rst Demonstrates how to generate and verify SCrypt password hashes using the passlib.hash.scrypt module. ```APIDOC ## SCrypt Usage Examples ### Description This section provides examples of how to use the `scrypt` hash class from Passlib to generate and verify password hashes. ### Code Examples 1. **Generate a new salt and hash a password:** ```python from passlib.hash import scrypt # generate new salt, hash password h = scrypt.hash("password") print(h) # Output: $scrypt$ln=16,r=8,p=1$aM15713r3Xsvxbi31lqr1Q$nFNh2CVHVjNldFVKDHDlm4CbdRSCdEBsjjJxD+iCs5E ``` 2. **Generate a hash with explicit rounds:** ```python from passlib.hash import scrypt # the same, but with an explicit number of rounds h_explicit_rounds = scrypt.using(rounds=8).hash("password") print(h_explicit_rounds) # Output: $scrypt$ln=8,r=8,p=1$WKs1xljLudd6z9kbY0wpJQ$yCR4iDZYDKv+iEJj6yHY0lv/epnfB6f/w1EbXrsJOuQ ``` 3. **Verify a password against a hash:** ```python from passlib.hash import scrypt h = '$scrypt$ln=16,r=8,p=1$aM15713r3Xsvxbi31lqr1Q$nFNh2CVHVjNldFVKDHDlm4CbdRSCdEBsjjJxD+iCs5E' # verify password is_correct = scrypt.verify("password", h) print(is_correct) # Output: True is_wrong = scrypt.verify("wrong", h) print(is_wrong) # Output: False ``` ### Notes - It is strongly recommended to install the `scrypt` package for better performance. - The `rounds` parameter (aliased as `r`) controls the block size, and increasing it significantly impacts memory and CPU usage. ``` -------------------------------- ### Example Seedlist for Swapped Words Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/2023-04-29_Checking_Swapped_Seed_Words/example_checking_swapped_seed_words.md This is an example of a seedlist file that can be used with seedrecover.py for recovering mnemonics with swapped words. ```plaintext {% include "./seed_swaps_example_seedlist.txt" %} ``` -------------------------------- ### Command for PC 1 (2/3 Workload) Source: https://github.com/3rditeration/btcrecover/blob/master/docs/Usage_Examples/2020-05-23_multi_device_descrambling_12_word_seed_with_extras/Example_multi_device_descrambling_12_word_seed_with_extras.md Execute this command on the first PC to assign it work slices 1 and 2 out of 3. This command specifies BIP39 wallet type, mnemonic length, language, address details, and the tokenlist. ```bash python seedrecover.py --no-dupchecks --mnemonic-length 12 --language EN --dsw --wallet-type BIP39 --addr-limit 1 --addrs 17GR7xWtWrfYm6y3xoZy8cXioVqBbSYcpU --tokenlist ./docs/Usage_Examples/2020-05-23_multi_device_descrambling_12_word_seed_with_extras/tokenlist.txt --no-eta --worker 1,2/3 ``` -------------------------------- ### Connect to Bitcoind using Config File Source: https://github.com/3rditeration/btcrecover/blob/master/lib/bitcoinlib_mod/docs/_static/manuals.setup-bitcoind-connection.rst Instantiates a BitcoindClient using a specified configuration file path. This method is suitable when your configuration is stored in a non-default location. ```python from bitcoinlib.services.bitcoind import BitcoindClient bdc = BitcoindClient.from_config('/usr/local/src/.bitcoinlib/config/bitcoin.conf') txid = 'e0cee8955f516d5ed333d081a4e2f55b999debfff91a49e8123d20f7ed647ac5' rt = bdc.getrawtransaction(txid) print("Raw: %s" % rt) ```