gurnec / btcrecover

An open source Bitcoin wallet password and seed recovery tool designed for the case where you already know most of your password/seed, but need assistance in trying different possible combinations.
GNU General Public License v2.0
1.28k stars 685 forks source link

Way to avoid repeated characters #2 #146

Open deloxd opened 6 years ago

deloxd commented 6 years ago

Hi!

Referring to problem #139

You can filter these out via a command line option. To never try passwords which contain three identical characters in a row: --regex-never "(.)\1\1" To never try passwords which contain two identical characters in a row: --regex-never "(.)\1" Is this what you're looking for? Note that this won't speed things up much (if any) for "fast" wallets (ones without key stretching) like Electrum (before 3.0) or MultiBit Classic.

How can i avoid repeat all letters and numbers like [a-zA-Z0-9] ? And for example: no repeat: aabc -aAaaab aA I try --regex-never "([a-zA-Z0-9])\1 but it does not work for "aA" only work for "aa" "AA"

How can i do it ?:)

gurnec commented 6 years ago

Here's what you want: --regex-never "(?i)([a-z0-9])\1". The (?i) at the beginning doesn't match anything, but instead enables case-insensitive mode for the rest of the regex.

If you're interested, the full syntax for Python regular expressions can be found here: https://docs.python.org/2/library/re.html#regular-expression-syntax

deloxd commented 6 years ago

Thank's for y response.

But i tested on 2 computers. If i start this option with 1-6 (will work) but start form 7 characters not work ;/

gurnec commented 6 years ago

I'm sorry but I don't understand. Can you be more specific about what does "not work"? What happens when you try, and how does that differ from what you were expecting?

deloxd commented 6 years ago

Yes of course! If i set more than 8 characters, the program does not work and is 0 kP / s. Procesor usage is 90% (It looks like it will work) but always 0 kP/s Normally with 6 letter i have around 500-700 kP/s

Maybe problem with buq in python ?

gurnec commented 6 years ago

As I said in that other issue:

Note that this won't speed things up much (if any) for "fast" wallets (ones without key stretching) like Electrum (before 3.0) or MultiBit Classic.

It sounds like you're trying to use something like %1,8[a-zA-Z0-9] in a tokens file, and then --regex-never "(?i)([a-z0-9])\1" to filter out enough of the combinations (and probably also --no-dupchecks --no-eta) to make this feasible, correct?

This will never work with btcrecover. The --regex-never won't filter out a significant % of the total, and trying 8-long passwords with 62 characters will take between 5 and 10 years with your PC (if I'm guessing your situation right).

It might be feasible to do this using John the Ripper, but even then you're probably looking at 6-12 months or so.

There's no "quick start" for JtR, but you can look here for OS X or here for Ubuntu (you can skip all the optional steps). For Windows 10, you can download Ubuntu from the Windows Store, and then follow the Ubuntu directions. After that you'll want to google how to use "mask" mode.

That's probably your best bet... good luck!

ghost commented 6 years ago

@gurnec is there are way to avoid repeats entirely in the password not just for adjacent characters? If this included a way to avoid testing for an 'A' anywhere else in the password if an 'a' has already appeared that would be particularly helpful.

sigkill commented 3 years ago

I tried out '(?i)([a-z0-9])(?i)([a-z0-9])(?i)([a-z0-9])\1' which has been helpful.