Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 21 Feb 2017 15:53:06 +0100
From: magnum <john.magnum@...hmail.com>
To: john-users@...ts.openwall.com
Subject: Re: How to Specify a Specific Password Pattern

On 2017-02-21 13:16, Albert Veli wrote:
> On 02/20/2017 11:08 PM, Mike Laufer wrote:
>> The password I'm trying to recover has a very specific pattern.  What
>> is the best way to specify this pattern to john to minimize the time
>> it takes to find the password?  For example, if I want to specify that
>> the first character of the password is an upper case letter, followed
>> by a lower case letter, followed by 2-3 upper or lower case letters
>> followed by 1-2 digits, how do you configure this?
>>
>> Thanks!
>
> You could do it in four runs:
>
> john ... -mask=?u?d?u?u?d?d
> john ... -mask=?u?d?l?l?d?d
> john ... -mask=?u?d?u?l?d?d
> john ... -mask=?u?d?l?u?d?d
>
> You could probably use some syntax to squeeze this into one single mask.
> Not sure how. Check out the doc/MASKS file. It should be possible to use
> a mask like:
>
> ?u?d[a-zA-Z][a-zA-Z]?d?d

That last notation is supported too. Another way to say the same is 
using a custom placeholder, here declared with -4=(...) and referenced 
with ?4, (1..9 are supported) for upper/lower:

./john ... -4=?l?u -mask=?u?d?4?4?d?d

Also, if the mask is shorter than needed, last placeholder will be 
repeated. So this will do 1 *or* 2 digits in the end:

./john ... -4=?l?u -mask=?u?d?4?4?d -min-len=5 -max-len=6

But you'll still need a separate run for 3 upper/lower-case letters 
before the digits:

./john ... -4=?l?u -mask=?u?d?4?4?4?d -min-len=6 -max-len=7

Mask mode requires Jumbo though, and I recommend a build from recent 
GitHub source rather than Jumbo-1 release, which is way old.

magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.