tz-brute
tz-brute copied to clipboard
Can only concatenate str (not("bytes") to str
Hello!
I'm trying to use the check function: ` def check(address, mnemonic, email, password): salt = unicodedata.normalize("NFKD", (email + password)).encode("utf8")
try:
seed = bitcoin.mnemonic_to_seed(mnemonic, salt)
except:
return -1
pk, sk = pysodium.crypto_sign_seed_keypair(seed[0:32])
pkh = blake2b(pk,20).digest()
decrypted_address = tezos_pkh(pkh)
if address == decrypted_address:
return 1
else:
return 0
`
But I only get -1 as a retrurn. When removing the try / except, this is waht I get:
Traceback (most recent call last): File "G:/My Drive/code/main3.py", line 33, in <module> print(check(address, mnemonic, email, c+password_base)) File "G:/My Drive/code/main3.py", line 9, in check seed = bitcoin.mnemonic_to_seed(mnemonic, salt) File "C:\Users\pierr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\bitcoin\mnemonic.py", line 99, in mnemonic_to_seed return pbkdf2_hmac_sha256(password=mnemonic_phrase,salt='mnemonic'+passphrase) TypeError: can only concatenate str (not "bytes") to str
Any idea?