PySeedRecover: Find correct seed phrase in case of missing words, typos, wrong orders

I just published PySeedRecover 1.0.1:

It can be used to find correct seed phrases if a word is missing or a word was misread or misspelled. Partly, it can also help if the order of the words is wrong. (It just checks for exchanges of rows and columns in rectangular notations, because checking all permutations of the words is far too much.)

It can probably not help much if you can restore with a seed phrase, but get to a wrong/empty wallet. In this case, other errors (mixed-up with other seed phrase, missing or wrong passphrase on Ledgers and Trezors, …) are far more likely.

If you have Python 3.7+ and pip, it can simply be installed by: pip install PySeedRecover

Then, seedrecover -h gives you a usage information.

The basic modes of operation are:

seedrecover word1 … wordN

If words are not in the word list of BIP-39, the closest match(es) in the word list are tried. If words are missing (from the next number that could be a valid seed phrase), all 2048 words of the word list are tried in all possible positions.

seedrecover -m 1 24 -- word1 … wordN

If you know or suspect that you have only missed a word in first or last position of a 24 word seed phrase (for example), you can give the positions you suspect with -m to drastically reduce the number of checked seed phrases.

seedrecover -a stake1...abcdef stake1...ghijkl stake1...mnopqr -- word1 … wordN

If you get too many results to manually check, the script can check against a number of given stake addresses. You can leave out part of the stake address(es) and replace them by .... Just in case, give all stake addresses you know of all of your wallets. We quite often have that they were mixed up and the seed phrase is, in fact, for another wallet.

seedrecover -s 1 word1 … wordN

Also check all words that have an edit distance of 1 to the given words. Sometimes typos may lead to other words also on the BIP-39 word list. These cannot be found by the validation of the single words done in most wallet apps.

seedrecover -b mainnetAPIKEY word1 … wordN

Check stake addresses on blockfrost.io for previous activity. This can be used if you do not know the stake address you are looking for. You need to get an API key on blockfrost.io and should keep in mind that the daily requests are limited (50 000 for the free accounts).

Also check the examples in the README linked above.

8 Likes

after using -b API, and i got :

Length not set. Using smallest length for given phrase.
1 of 15 words missing.
Seed phrases checked:     61_440 total,      1_881 fulfilled checksum,      1_881 without repetitions

where these checksums saved in windows?

If -b doesn’t give you an output, it means that none of the checked seed phrases lead to a wallet which has ever been used according to Blockfrost.

You can nevertheless put the stake addresses and the corresponding seed phrases into a text file with seedrecover … > seedphrases.txt, where you leave out the -b option, but keep all the other options as they are. It should give you a file with exactly the 1881 lines of valid seed phrases.

1 Like

sir you are awesome. thanks

:white_check_mark: :white_check_mark: @everyone (GUYS) :white_check_mark: :white_check_mark: this man is the best human ever I met in crypto environment!

he is true genius, 100% trustworthy and humble person.

he helped me to recover my wallet(s) and this message is the tiniest thing i could do to him.

Thanks again sir :saluting_face: @HeptaSean :heart: :innocent:

1 Like

This worked like a charm.
I was missing a word because my dog chew the corner of my notebook.
I was able to find the missing word using this.
I probably could have found it even if I was missing two words or 3. And knowing the positions it is really important.
Thank you lots @HeptaSean

1 Like

bro how did you do it , mine is not working .i’m missing 2 words from my phrase.

Do you know at which position in the phrase the two words are missing?

Do you know the stake address (or another address) of the wallet you are trying to open?

I have my wallet address and the 12 words . missing out two words . yes i believe i know the position of the words .

can you pls guide me through the steps

You are giving very little information on where exactly you are stuck.

Did you already install it and are you able to run seedrecover?

Installation instructions are on: https://github.com/HeptaSean/PySeedRecover#installation

So, you have 10 and two of the 12 are missing? Which wallet app did you use? There are no native Cardano apps that ever used 12 word seed phrases.

Or do you mean you have 12 plus the missing ones. But then, it would be three missing words, since the shortest that were ever used in Cardano were the 15 of Yoroi. (14 words is not even possible with BIP-39. It always have to be multiples of 3.)

Or is it possible that what you are looking at is not the seed phrase for a Cardano wallet, but for Metamask, Atomic, Exodus, …? And the seed phrase for the Cardano wallet is somewhere else?

So, for your case the call would be something like:

seedrecover -a stake1u9t04dtwptk5776eluj6ruyd782k66npnf55tdrp6dvwnzs24r8yq -l 15 -m 13 14 15 -- word01 word02 word03 word04 word05 word06 word07 word08 word09 word10 word11 word12

where you replace the stake address with your stake address, -l 15 says that we are searching for a 15 word seed phrase, -m 13 14 15 that we are missing the last three words (13, 14, and 15) and the 12 words after the -- are the ones that we know.

(But three missing words are already a lot, will take quite some time to try.)

Sorry for late response bro . its for my metamask wallet . i have the 12 words but ever since i lost my device if i try to import my wallet i find out two of the words are incorrect. and i don’t know how to setup the recovery . what do i need to using mac .Thank you for the assistance

Now, I am sorry for the late reply.

My tool is for Cardano, but it sounds like maybe it could help, since they all use the same word list and the same checksum algorithm.

If you just give it the option -s 1 (for checking all variants with an edit distance of 1) and the twelve words you have, it will give all possibilities for a valid seed phrases it finds:

$ seedrecover -s 1 ladder long kangaroo inherit unknown price else second enter addict mystery valve
ladder => ladder
long => long, song
kangaroo => kangaroo
inherit => inherit
unknown => unknown
price => price, pride, prize, rice
else => else
second => second
enter => enter
addict => addict
mystery => mystery
valve => valve
Length not set. Using smallest length for given phrase.
0 of 12 words missing.
Seed phrases checked:          3 total,          1 fulfilled checksum
stake1uyzfhchqg3yffusxlm22az3g4sc9287qt7axa394q479pgcwn0343: ladder long kangaroo inherit unknown prize else second enter addict mystery valve
Seed phrases checked:          8 total,          1 fulfilled checksum

The stake1… address won’t help you much, since it’s Cardano specific, but the seed phrase after it might be yours. There might be more than one possibility. You can also go to -s 2 to search for typos with two edits, but that can already lead to hundreds of possibilities.

If that does not help, https://btcrecover.readthedocs.io/en/latest/ has functionality to search for Ethereum seed phrases given their address, but I can’t really help you with that.

thanks bro . pls is there any medium of texting you or probably a video link to guide me through sorry i’m slow

Sorry, no video available.

Where are you stuck?

It is really just three steps:

  1. Install Python (if you don’t have it).
  2. pip install PySeedRecover on a command line.
  3. seedrecover -s 1 ladder long kangaroo inherit unknown price else second enter addict mystery valve also on a command line.

If you want, you can also DM me here, or on Telegram https://t.me/HeptaSean, or on Twitter https://twitter.com/HeptaCardano.

Hi sir, I am having two wallets A and B and wallet B I have my password but I think I wrongly type one of the 15 words … I can not recover it I am lost on how to do … I need help … please

Hoping for some help here. I have a 24 word seed that i am trying to recover.
I have all 24 words written down. I know the order of the first 12 words, but not of the final 12 words. Is this tool able to help?
I also know the public key to my wallet, but not the stake address of my wallet. Even if i end up with 2000 valid seeds here to try that is absolutely fine, as long as i can get back in eventually.
Any help here is greatly appreciated,
Thanks!

Not out of the box. Fixing positions of half the words and just permutating the other half is a very unique requirement. Probably best to just write a one-off script for that.

Which one? The account extended public key? The payment address public key? The stake address public key?

Apologies - it is the extended public key.

Okay, maybe it’s not even necessary to modify my script.

Account public key can be generated from seed phrase can be done by cardano-address. So, a simple bash script could go through possible seed phrases and compare to the given public key.

But: All permutations of 12 words still lead to 1.8 million valid seed phrases that have to be checked. That will take a long time! Do you really no nothing more about the order of those?

1 Like