Exemple #1
0
def checkPassphrase(line):
    passw = ""

    seed = util.bh2u(keystore.bip39_to_seed(line, passw))
    seed = util.bfh(seed)
    xprv, _xpub = bitcoin.bip32_root(seed, "standard")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "44'")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "0'")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "0'")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "0")
    xprv2, btc_addr = bip39(seed, xprv, 0)
    return xprv2, btc_addr
Exemple #2
0
def checkPassphrase(line):
    passw = ""

    seed = util.bh2u(keystore.bip39_to_seed(line, passw))
    seed = util.bfh(seed)
    xprv, _xpub = bitcoin.bip32_root(seed, "standard")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "44'")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "0'")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "0'")
    xprv, _xpub = bitcoin.bip32_private_derivation(xprv, "", "0")
    for i in range(MAX_ADDR_IDX):
        deriveAddresses(line, xprv, i)
Exemple #3
0
def bip39(line, xprv, i):
    xprv2, _xpub = bitcoin.bip32_private_derivation(xprv, "", str(i))
    btc_addr = xpub2btc(_xpub)
    pvkey = xprv2btc(xprv2)
    # print(line,'\n')
    # print(btc_addr,'\n')
    # print(xprv2,'\n')
    # print(pvkey,'\n')
    return btc_addr, pvkey
Exemple #4
0
def deriveAddresses(line, xprv, i):
    xprv2, _xpub = bitcoin.bip32_private_derivation(xprv, "", str(i))
    btc_addr = xpub2btc(_xpub)
    print(line, '\n', btc_addr, '\n')
    if (TARGET_ADDR.lower() == btc_addr.lower()):
        privkey = xprv2btc(xprv2)
        playsound('zen.mp3')
        print("FOUND PUZZLE PRIZE: " + privkey)
        win = open("SOLVED.txt", "a")
        win.write("WINNING SEED: " + line + "\n")
        win.write("ADDRESS: " + btc_addr + "\n")
        win.write("PRIVKEY: " + privkey + "\n")
Exemple #5
0
 def add_xprv_from_seed(self, bip32_seed, derivation):
     xprv, xpub = bip32_root(bip32_seed)
     xprv, xpub = bip32_private_derivation(xprv, "m/", derivation)
     self.add_xprv(xprv)
Exemple #6
0
 def add_xprv_from_seed(self, bip32_seed, xtype, derivation):
     xprv, xpub = bip32_root(bip32_seed, xtype)
     xprv, xpub = bip32_private_derivation(xprv, "m/", derivation)
     self.add_xprv(xprv)
Exemple #7
0
 def add_seed_and_xprv(self, seed, password, passphrase=''):
     xprv, xpub = bip32_root(self.mnemonic_to_seed(seed, passphrase))
     xprv, xpub = bip32_private_derivation(xprv, "m/", self.root_derivation)
     self.add_seed(seed, password)
     self.add_master_private_key(xprv, password)
     self.add_master_public_key(xpub)
Exemple #8
0
 def derive_xkeys(self, root, derivation, password):
     x = self.master_private_keys[root]
     root_xprv = pw_decode(x, password)
     xprv, xpub = bip32_private_derivation(root_xprv, root, derivation)
     return xpub, xprv