https://github.com/ayrat555/foogold
A tool for trying your luck with random bitcoin mnemonics
https://github.com/ayrat555/foogold
bitcoin bitcoin-wallet mnemonic mnemonic-generator mnemonic-phrase
Last synced: 26 days ago
JSON representation
A tool for trying your luck with random bitcoin mnemonics
- Host: GitHub
- URL: https://github.com/ayrat555/foogold
- Owner: ayrat555
- License: unlicense
- Created: 2023-02-09T16:51:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T14:38:15.000Z (about 2 years ago)
- Last Synced: 2025-05-07T06:06:10.587Z (26 days ago)
- Topics: bitcoin, bitcoin-wallet, mnemonic, mnemonic-generator, mnemonic-phrase
- Language: Rust
- Homepage: https://www.badykov.com/rust/bitcoin/foogold/
- Size: 10.6 MB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
foogold (Fool's Gold)
------------Fool's gold is a tool for trying your luck with bitcoin mnemonics
### Description
Bitcoin user addresses are generated using 2048 words defined in [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). If words are selected randomly, it's impossible to figure them out. For example, the number of 12 words mnemonics is 2048¹² (2¹³²). But if a user decided to use a fixed number of words, it may be possible to learn them.
Foogold is a tool to try different mnemonics hoping one of them will generate a used address on the bitcoin chain.
It has the following features:
- index all bitcoin user addresses (segwit, nested segwit and legacy). This data is used to check if an address generated by a mnemonic was used in a bitcoin transaction on the chain.
- check a single mnemonic using different derivation paths
- check combinations of 1 and 2 words
- run foogold forever on your server, checking random mnemonics hoping one of them unlocks something### Indexing the chain
Setup database by running:
```
diesel database setup
```For this step, you'll need access to a bitcoin node.
```rust
cargo run --release -- index --node-url "https://mynode.com" --sync-start-block 0 --sync-end-block 700000
```The number of addresses is more than 1 billion and it may take from a couple of days to a couple of weeks for the whole chain to sync. Ideally, several instances of this command should be run indexing different block ranges

##### Docs
```bash
Usage: foogold index [OPTIONS] --database-url --node-url --sync-start-block --sync-end-blockOptions:
--database-url
[env: DATABASE_URL=postgres://postgres:postgres@localhost:5432/foogold]
--database-pool-size
[env: DATABASE_POOL_SIZE=] [default: 10]
--node-url
[env: NODE_URL=]
--node-request-header-name
[env: NODE_REQUEST_HEADER_NAME=]
--node-request-header-value
[env: NODE_REQUEST_HEADER_VALUE=]
--sync-start-block
[env: SYNC_START_BLOCK=]
--sync-end-block
[env: SYNC_END_BLOCK=]
-h, --help
Print help
```### Checking a single mnemonic
```rust
cargo run --release -- mnemonic-checker --derivation-paths "m/44'/0'/0'/0/0" "m/44'/0'/0'/0/1" "m/49'/0'/0'/0/0" "m/49'/0'/0'/0/1" "m/84'/0'/0'/0/0" "m/84'/0'/0'/0/1" --mnemonic "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon"
```
##### Docs
```bash
Usage: foogold mnemonic-checker [OPTIONS] --database-url --mnemonicOptions:
--telegram-token
[env: TELEGRAM_API_TOKEN=]
--telegram-chat-id
[env: TELEGRAM_CHAT_ID=]
--database-url
[env: DATABASE_URL=postgres://postgres:postgres@localhost:5432/foogold]
--database-pool-size
[env: DATABASE_POOL_SIZE=] [default: 10]
--derivation-paths ...
[env: DERIVATION_PATHS=]
--mnemonic
[env: MNEMONIC=]
-h, --help
Print help
```### Checking combinations
```rust
RUST_LOG=info RUST_BACKTRACE=1 cargo run --release -- combination-checker --mnemonic-size 12 --combination-size 2 --derivation-paths "m/44'/0'/0'/0/0" "m/44'/0'/0'/0/1" "m/49'/0'/0'/0/0" "m/49'/0'/0'/0/1" "m/84'/0'/0'/0/0" "m/84'/0'/0'/0/1"
```
##### Docs
```bash
Usage: foogold combination-checker [OPTIONS] --database-url --mnemonic-size --combination-sizeOptions:
--telegram-token
[env: TELEGRAM_API_TOKEN=]
--telegram-chat-id
[env: TELEGRAM_CHAT_ID=]
--database-url
[env: DATABASE_URL=postgres://postgres:postgres@localhost:5432/foogold]
--database-pool-size
[env: DATABASE_POOL_SIZE=] [default: 10]
--derivation-paths ...
[env: DERIVATION_PATHS=]
--mnemonic-size
[env: MNEMONIC_SIZE=]
--combination-size
[env: COMBINATION_SIZE=]
-h, --help
Print help
```### Checking random mnemonics
```rust
RUST_LOG=info RUST_BACKTRACE=1 cargo run --release -- random-checker --mnemonic-size 12 --derivation-paths "m/44'/0'/0'/0/0" "m/44'/0'/0'/0/1" "m/49'/0'/0'/0/0" "m/49'/0'/0'/0/1" "m/84'/0'/0'/0/0" "m/84'/0'/0'/0/1"
```
### Docs
```bash
Usage: foogold random-checker [OPTIONS] --database-url --mnemonic-sizeOptions:
--telegram-token
[env: TELEGRAM_API_TOKEN=]
--telegram-chat-id
[env: TELEGRAM_CHAT_ID=]
--database-url
[env: DATABASE_URL=postgres://postgres:postgres@localhost:5432/foogold]
--database-pool-size
[env: DATABASE_POOL_SIZE=] [default: 10]
--derivation-paths ...
[env: DERIVATION_PATHS=]
--mnemonic-size
[env: MNEMONIC_SIZE=]
-h, --help
Print help
```