├── Btcaddress.txt ├── Hunt.py ├── HuntBL.py └── README.md /Btcaddress.txt: -------------------------------------------------------------------------------- 1 | 34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo 2 | bc1qgdjqv0av3q56jvd82tkdjpy7gdp9ut8tlqmgrpmv24sq90ecnvqqjwvw97 3 | 3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6 4 | bc1ql49ydapnjafl5t2cp9zqpjwe6pdgmxy98859v2 5 | bc1qazcm763858nkj2dj986etajv6wquslv8uxwczt 6 | 7 | -------------------------------------------------------------------------------- /Hunt.py: -------------------------------------------------------------------------------- 1 | import os 2 | import hashlib 3 | from ecdsa import SigningKey, SECP256k1 4 | from base58 import b58encode_check 5 | 6 | def sha256(data): 7 | return hashlib.sha256(data).digest() 8 | 9 | def ripemd160(data): 10 | return hashlib.new("ripemd160", data).digest() 11 | 12 | def generate_private_key(): 13 | return os.urandom(32) 14 | 15 | def get_public_key(private_key, compressed=True): 16 | sk = SigningKey.from_string(private_key, curve=SECP256k1) 17 | vk = sk.verifying_key 18 | x, y = vk.pubkey.point.x(), vk.pubkey.point.y() 19 | if compressed: 20 | return (b'\x02' if y % 2 == 0 else b'\x03') + x.to_bytes(32, 'big') 21 | else: 22 | return b'\x04' + x.to_bytes(32, 'big') + y.to_bytes(32, 'big') 23 | 24 | def generate_bitcoin_address(public_key): 25 | extended_key = b'\x00' + ripemd160(sha256(public_key)) 26 | return b58encode_check(extended_key) 27 | 28 | def load_btc_addresses(file_path): 29 | with open(file_path, 'r') as f: 30 | return set(line.strip() for line in f.readlines()) 31 | 32 | def check_and_save_match(address, private_key, addresses): 33 | if address in addresses: 34 | with open("Found.txt", "a") as f: 35 | f.write(f"Address: {address}, Private key: {private_key.hex()}\n") 36 | 37 | def main(): 38 | btc_addresses = load_btc_addresses("btcaddress.txt") 39 | 40 | while True: 41 | private_key = generate_private_key() 42 | public_key_compressed = get_public_key(private_key, compressed=True) 43 | public_key_uncompressed = get_public_key(private_key, compressed=False) 44 | address_compressed = generate_bitcoin_address(public_key_compressed).decode('utf-8') 45 | address_uncompressed = generate_bitcoin_address(public_key_uncompressed).decode('utf-8') 46 | 47 | check_and_save_match(address_compressed, private_key, btc_addresses) 48 | check_and_save_match(address_uncompressed, private_key, btc_addresses) 49 | 50 | print(f"Checked: Compressed address: {address_compressed}") 51 | print(f"Checked: Uncompressed address: {address_uncompressed}") 52 | print(f"Private key: {private_key.hex()}") 53 | print() 54 | 55 | if __name__ == "__main__": 56 | main() 57 | -------------------------------------------------------------------------------- /HuntBL.py: -------------------------------------------------------------------------------- 1 | import os 2 | import hashlib 3 | import concurrent.futures 4 | from ecdsa import SigningKey, SECP256k1 5 | from base58 import b58encode_check 6 | from pybloom_live import BloomFilter 7 | import time 8 | 9 | 10 | 11 | def sha256(data): 12 | return hashlib.sha256(data).digest() 13 | 14 | def ripemd160(data): 15 | return hashlib.new("ripemd160", data).digest() 16 | 17 | def generate_private_key(): 18 | return os.urandom(32) 19 | 20 | def get_public_key(private_key, compressed=True): 21 | sk = SigningKey.from_string(private_key, curve=SECP256k1) 22 | vk = sk.verifying_key 23 | x, y = vk.pubkey.point.x(), vk.pubkey.point.y() 24 | if compressed: 25 | return (b'\x02' if y % 2 == 0 else b'\x03') + x.to_bytes(32, 'big') 26 | else: 27 | return b'\x04' + x.to_bytes(32, 'big') + y.to_bytes(32, 'big') 28 | 29 | def generate_bitcoin_address(public_key): 30 | extended_key = b'\x00' + ripemd160(sha256(public_key)) 31 | return b58encode_check(extended_key) 32 | 33 | def check_and_save_match(address, private_key, addresses): 34 | if address in addresses: 35 | with open("Found.txt", "a") as f: 36 | f.write(f"Address: {address}, Private key: {private_key.hex()}\n") 37 | print(f"Found matching address: {address}") 38 | 39 | 40 | 41 | def load_btc_addresses(file_path): 42 | with open(file_path, 'r') as f: 43 | addresses = [line.strip() for line in f.readlines()] 44 | bloom = BloomFilter(len(addresses)) 45 | for address in addresses: 46 | bloom.add(address) 47 | print(f"Loaded {len(addresses)} addresses into the bloom filter.") 48 | return bloom, addresses 49 | 50 | address_count = 0 51 | 52 | def process_key_pair(btc_bloom_filter, btc_addresses): 53 | global address_count 54 | private_key = generate_private_key() 55 | public_key_compressed = get_public_key(private_key, compressed=True) 56 | public_key_uncompressed = get_public_key(private_key, compressed=False) 57 | address_compressed = generate_bitcoin_address(public_key_compressed).decode('utf-8') 58 | address_uncompressed = generate_bitcoin_address(public_key_uncompressed).decode('utf-8') 59 | 60 | #print(f"Compressed Address: {address_compressed}, Private key: {private_key.hex()}") 61 | #print(f"Uncompressed Address: {address_uncompressed}, Private key: {private_key.hex()}") 62 | 63 | if address_compressed in btc_bloom_filter: 64 | check_and_save_match(address_compressed, private_key, btc_addresses) 65 | if address_uncompressed in btc_bloom_filter: 66 | check_and_save_match(address_uncompressed, private_key, btc_addresses) 67 | 68 | address_count += 2 69 | if address_count % 1000 == 0: 70 | print(f"Generated {address_count} addresses.") 71 | 72 | 73 | def main(): 74 | btc_bloom_filter, btc_addresses = load_btc_addresses("btcaddress.txt") 75 | 76 | while True: 77 | start_time = time.time() 78 | with concurrent.futures.ThreadPoolExecutor() as executor: 79 | while time.time() - start_time < 10 * 60 * 60: # Run for 10 hours 80 | futures = [executor.submit(process_key_pair, btc_bloom_filter, btc_addresses) for _ in range(10)] 81 | concurrent.futures.wait(futures) 82 | print("Resting for 2 hours.") 83 | time.sleep(2 * 60 * 60) # Rest for 2 hours 84 | 85 | if __name__ == "__main__": 86 | main() 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CryptoKeyHunter 2 | CryptoKeyHunter is a Python script that generates an unlimited number of Bitcoin addresses and keys, checks them against a list of target addresses, and saves the matched addresses along with their private keys. 3 | 4 | ## Requirements 5 | 6 | - Python 3.6 or higher 7 | - ecdsa (`pip install ecdsa`) 8 | - base58 (`pip install base58`) 9 | - Bloom filters (`pip install pybloom_live`) - HuntBL 10 | 11 | ## Usage 12 | 13 | 1. Prepare a text file named `btcaddress.txt` containing the target Bitcoin addresses, with one address per line. 14 | 2. Run the script using `python Hunt.py`. 15 | 16 | The script will generate an unlimited number of Bitcoin addresses and keys, both compressed and uncompressed, and check if they match any of the addresses in `btcaddress.txt`. If a match is found, the script will save the matched address and its corresponding private key in a file named `Found.txt`. 17 | 18 | ## Disclaimer 19 | 20 | This script is provided for educational purposes only. The use of this script for malicious purposes or activities that violate ethical guidelines is strictly prohibited. The user is solely responsible for any consequences resulting from the use of this script. 21 | 22 | 23 | --------------------------------------------------------------------------------